Repository navigation
Show XKCDExplanation
Displays a comic's title, image, and explanation in the console.
Show-XKCDExplanation [[-Number] <Int32[]>] [-Explanation] [-Transcript] [-Discussion] [-Full] [-HighQuality]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The Show-XKCDExplanation cmdlet gets a comic's explanation from the explain xkcd wiki (via Get-XKCDExplanation) and displays it in the console: the title above, the image (if your terminal supports the Sixel, Kitty, or iTerm2 inline image graphics protocol), and the retrieved sections below.
By default, only the explanation is displayed. Use -Explanation, -Transcript, and/or -Discussion to choose exactly which section(s) to display instead -- e.g. -Transcript on its own displays just the transcript, not the explanation -- or use -Full to always display all three. Each displayed section is shown under its own heading.
By default, Show-XKCDExplanation also displays the comic itself (its title, image, and alt text) above the section(s) shown. Use -Explanation, -Transcript, and/or -Discussion (without -Full) to display text sections only, without fetching or showing the comic image -- the title and a link to the explanation are still shown. Use -Full to always display the comic image alongside every section.
By default, Show-XKCDExplanation displays the explanation of the latest available comic. When you use the -Number parameter (aliased as -Num) you can specify one or more specific comics to display.
Show-XKCDExplanation
Displays the explanation of the latest comic.
Show-XKCDExplanation 2000
Displays the explanation of comic number 2000.
Get-XKCD -Random | Show-XKCDExplanation
Gets a random comic and displays its explanation in the console.
Show-XKCDExplanation 2000 -Full
Displays the comic image, explanation, transcript, and reader discussion of comic number 2000, each under its own heading.
Show-XKCDExplanation 2000 -Explanation
Displays just the explanation of comic number 2000 as text, along with its title and a link, without fetching or displaying the comic image.
Show-XKCDExplanation 2000 -Discussion
Displays just the reader discussion of comic number 2000 as text, along with its title and a link, without fetching or displaying the comic image or the explanation.
Show-XKCDExplanation 2000 -Explanation -Discussion
Displays the explanation and reader discussion (but not the transcript) of comic number 2000 as text, along with its title and a link, without fetching or displaying the comic image.
Get-XKCDExplanation -Show
Shorthand equivalent of: Get-XKCDExplanation | Show-XKCDExplanation
Displays the explanation of the specified comics. Accepts array input. By default the latest comic is displayed.
Type: Int32[]
Parameter Sets: (All)
Aliases: Num
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseDisplays the comic's "Explanation" section. Combine with -Transcript and/or -Discussion to display more than one section; on its own (without -Full), no comic image is fetched or displayed -- the title and a link to the explanation are still shown. Defaults to the value saved with Set-XKCDDefault -Explanation, if any.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-XKCDDefaultValue -Name 'Explanation' -Value $false)
Accept pipeline input: False
Accept wildcard characters: FalseDisplays the comic's "Transcript" section. Combine with -Explanation and/or -Discussion to display more than one section; on its own (without -Full), no comic image is fetched or displayed. Defaults to the value saved with Set-XKCDDefault -Transcript, if any.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-XKCDDefaultValue -Name 'Transcript' -Value $false)
Accept pipeline input: False
Accept wildcard characters: FalseDisplays the comic's reader "Discussion", from its explain xkcd talk page. Combine with -Explanation and/or -Transcript to display more than one section; on its own (without -Full), no comic image is fetched or displayed. Defaults to the value saved with Set-XKCDDefault -Discussion, if any.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-XKCDDefaultValue -Name 'Discussion' -Value $false)
Accept pipeline input: False
Accept wildcard characters: FalseDisplays all of the explanation, transcript, and discussion sections. Defaults to the value saved with Set-XKCDDefault -Full, if any.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-XKCDDefaultValue -Name 'Full' -Value $false)
Accept pipeline input: False
Accept wildcard characters: FalseDisplays the higher resolution (_2x) version of the image, where available. Comics that do not have a higher resolution version are displayed at the standard quality instead. Defaults to the value saved with Set-XKCDDefault -HighQuality, if any.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-XKCDDefaultValue -Name 'HighQuality' -Value $false)
Accept pipeline input: False
Accept wildcard characters: False{{Fill ProgressAction Description}}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
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 (http://go.microsoft.com/fwlink/?LinkID=113216).
https://github.com/markwragg/Powershell-XKCD/wiki/Show-XKCDExplanation