Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Add JournalEntryContent

Nick Spreitzer edited this page Feb 21, 2020 · 2 revisions
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0

Add-JournalEntryContent

SYNOPSIS

Adds content to a journal entry, directly from the command line.

Alias: aje

SYNTAX

Add-JournalEntryContent [-Date <DateTime>] [-DateOffset <Int32>] [-Header <String>] [[-Body] <String[]>]
 [[-Tags] <String[]>] [-Location <String>] [<CommonParameters>]

DESCRIPTION

Use this cmdlet to write journal entries directly from the command line. If an entry does not exist for the target date, one will be created. If one does exist, the specified content will be appended. Content will be inserted under the date-based default H1 header, unless a custom header is provided using the -Header parameter.

EXAMPLES

Example 1

PS C:\> Add-JournalEntryContent "I went to work today, and it was swell."

Adds the specified text to today's journal entry. If an entry doesn't yet exist for today, one is created. The text is inserted under the default date-based H1 header that is automatically inserted by journal-cli.

Example 2

PS C:\> Add-JournalEntryContent "Ned and I discussed developing a new widget"
  -Tags 1:1
  -Header "## 1:1 with Ned"

Adds the specified text to today's journal entry. If an entry doesn't yet exist for today, one is created. The text is inserted under the custom H2 header ## 1:1 with Ned. If the header doesn't already exist, it will be added. The tag 1:1 is also added, if it doesn't already exist.

Example 3

PS C:\> Add-JournalEntryContent "- Wrote some code
>> - Updated Jira
>> - Caught up on email."

Adds the specified multi-line text to today's journal entry. If an entry doesn't yet exist for today, one is created. The text is inserted under the default date-based H1 header that is automatically inserted by journal-cli.

Example 4

PS C:\> Add-JournalEntryContent "Someone made really weak coffee at the office today. Very disappointing", 
  "On the other hand, lunch was catered today and it was really tasty." 
  -Header "### Today" 
  -Tags work

Adds the specified multi-line text to today's journal entry, with each element of the array corresponding to a new paragraph. If an entry doesn't yet exist for today, one is created. The text is inserted under the custom H3 header ## Today. If the header doesn't already exist, it will be added. The tag work is also added, if it doesn't already exist.

Example 5

PS C:\> Add-JournalEntryContent "Meeting with execs regarding move to AWS next year" 
  -DateOffset -1

Adds the specified text to yesterday's journal entry. If an entry doesn't yet exist for yesterday, one is created. The text is inserted under the default date-based H1 header that is automatically inserted by journal-cli.

PARAMETERS

-Body

The content to add to the specified journal entry.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Date

If provided, the Body content will be appended to the journal entry for this date. If an entry does not yet exist, it will be created. The default date is today.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DateOffset

An integer representing the number of days to offset the journal entry date. The starting point is today, unless overridden by the -Date parameter. Use a negative number to offset backwards, and a positive number to offset forward.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Header

By default, body content is appended to the default date-based H1 header journal-cli automatically adds to all new journal entries. Use -Header to override this behavior and add new content under a specified header. If the header already exists, the content is appended to it. Otherwise, a new header is appended to the bottom of the entry. The header text must be preceded with 1 to 6 # characters, which indicates the header level. For example, ### Test! will create an H3 header with the text "Test!".

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location

The root directory for the journal to search for entries. This is only required if no default journal location has been set, or to search a non-default location.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tags

An array of tags used to filter the list of journal entries.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS