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

Open RandomJournalEntry

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

Open-RandomJournalEntry

SYNOPSIS

Opens a randomly selected journal entry using the system's default markdown editor.

Alias: orj

SYNTAX

Open-RandomJournalEntry [-From <DateTime>] [-To <DateTime>] -Year <Int32> [-Tags <String[]>]
 [-Location <String>] [<CommonParameters>]

DESCRIPTION

Opens a journal entry, randomly selected from either the entire journal or from a subset. The collection of possible entries can be limited by date range, tags, or both.

EXAMPLES

Example 1

PS C:\> Open-RandomJournalEntry -Tags vacation,germany

Opens a randonly selected journal entry that is tagged either vacation or germany.

Example 2

PS C:\> Open-RandomJournalEntry -From '2019.01.01' -To (Get-Date)

Opens a randonly selected journal entry from January 1st 2019 to the current date.

Example 3

PS C:\> Open-RandomJournalEntry

Randomly selects an entry from any time in the journal.

PARAMETERS

-From

Filters the index to journal entries that were written on or after the specified date.

Type: DateTime
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

One or more tags to filter the collection of possible journal entries. Multiple tags are applied as a boolean OR, not AND. Looking at Example 1 above, running that command will return all entries that include vacation OR germany. AND operations will be added in a later release.

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

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

-To

Filters the index to journal entries that were written on or before the specified date.

Type: DateTime
Parameter Sets: (All)
Aliases:

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

-Year

Limits the pool of possible journal entries to the specified year.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
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