-
Notifications
You must be signed in to change notification settings - Fork 5
Open JournalEntry
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0
Opens the specified journal entry using system's default editor for .md
files.
Alias: oje
Open-JournalEntry [[-Date] <DateTime>] [-Location <String>] [<CommonParameters>]
Open-JournalEntry [[-Entry] <IJournalEntry>] [-Location <String>] [<CommonParameters>]
Open-JournalEntry [-Last] [-Location <String>] [<CommonParameters>]
Open-JournalEntry [[-EntryName] <String>] [-Location <String>] [<CommonParameters>]
Open-JournalEntry [[-DateOffset] <Int32>] [-Location <String>] [<CommonParameters>]
Opens a specific journal entry for editing or reading using the system's default markdown editor. Entries can be referenced by relative or specific date, file name, or by piping in journal entry objects from other cmdlets.
PS C:\> Open-JournalEntry '2019.01.02'
# Or...
PS C:\> Open-JournalEntry '2019.01.02.md'
Opens the entry for January 1, 2019. If an entry does not exist for that date, an error is returned.
PS C:\> Open-JournalEntry (Get-Date -Year 2019 -Month 7 -Day 19)
Opens the entry for July 19th, 2019 or throws an error if it doesn't exist. Pro Tip: You can use Get-Date
to swap out the day, year, or month value in order to easily produce the desired date. For example, if today's date is November 11th 2019 and I run Get-Date -Day 5
, PowerShell will return November 5th 2019.
PS C:\> Open-JournalEntry -DateOffset -1
Opens yesterday's entry.
PS C:\> Get-JournalEntriesByTag -Tags insomnia |
Select-Object -ExpandProperty entries |
Open-JournalEntry
Opens every entry tagged insomnia
. Careful here. If a large number of entries are returned by Get-JournalEntriesByTag
, you may find yourself quickly overwhelmed by markdown editor instances.
The date of the entry to open.
Type: DateTime
Parameter Sets: Date
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
An integer representing the number of days to offset from today's date. For example, -1 represents yesterday. The default is 0, meaning today.
Type: Int32
Parameter Sets: DateOffset
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An IJournalEntry
object, generated from Get-JournalIndex
or Get-JournalEntriesByTag
. See Reading Entries With A Markdown Editor for additional information.
Type: IJournalEntry
Parameter Sets: Entry
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The file name for a specific entry, with or with out the .md
file extension.
Type: String
Parameter Sets: Name
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Opens the most recent journal entry.
Type: SwitchParameter
Parameter Sets: Last
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.