-
Notifications
You must be signed in to change notification settings - Fork 6
Get JournalEntriesByTag
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0
Returns a journal index consisting only of entries that contain specified tags and, optionally, falls within a specific date range.
Alias: gjt
Get-JournalEntriesByTag -Tags <String[]> [-IncludeBodies] [-All] [-From <DateTime>] [-To <DateTime>]
[-Location <String>] [<CommonParameters>]
In contrast with Get-JournalIndex which returns an index of all entries, this cmdlet returns an index that only consists of entries containing specific tags and, optionally, filters out entries that were written outside a specific date range. By default, this cmdlet returns the headers from each included entry. The complete journal entry content is returned if the IncludeBodies switch is used. See the recipes page for examples of paginating through the full text content of each entry.
> Get-JournalEntriesByTag -Tags work,vacation
Tag Count Entries
--- ----- -------
work 141 {2018.01.08, 2018.01.09, 2018.01.10, 2018.01.11…}
vacation 1 {2019.10.11}Returns all journal entries that are tagged either work or vacation.
> Get-JournalEntriesByTag -Tags work,vacation -All
Tag Count Entries
--- ----- -------
big-event 1 {2019.10.11}
coding 1 {2019.10.11}
work 1 {2019.10.11}
vacation 1 {2019.10.11}Returns all journal entries that are tagged both work and vacation. In this example, there is only one matching entry, but the results are still indexed by tag which is why 4 results are listed - one for each tag contained in that entry.
> Get-JournalEntriesByTag -Tags work,vacation -All |
select entries |
unique
Entries
-------
{2019.10.11}Building on Example 2, this filters the results to only unique entries.
> Get-JournalEntriesByTag -Tags work -From '2019.1.1' -To '2019.6.7'Returns all journal entries that are tagged work and were written between January 1st 2019 and June 7th 2019.
Filters included journal entries to those which include all specified tags.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseFilters included journal entries to those which 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: FalseIncludes the full text content of each returned journal entry.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe root directory for the journal.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn array of tags used to filter the list of journal entries.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseFilters included journal entries to those which 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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.