mirror of
https://github.com/go-shiori/shiori.git
synced 2025-01-16 12:57:58 +08:00
21 lines
643 B
Go
21 lines
643 B
Go
|
package cmd
|
||
|
|
||
|
import "github.com/spf13/cobra"
|
||
|
|
||
|
func printCmd() *cobra.Command {
|
||
|
cmd := &cobra.Command{
|
||
|
Use: "print [indices]",
|
||
|
Short: "Print the saved bookmarks",
|
||
|
Long: "Show the saved bookmarks by its DB index. " +
|
||
|
"Accepts space-separated list of indices (e.g. 5 6 23 4 110 45), " +
|
||
|
"hyphenated range (e.g. 100-200) or both (e.g. 1-3 7 9). " +
|
||
|
"If no arguments, all records with actual index from database are shown.",
|
||
|
Aliases: []string{"list", "ls"},
|
||
|
}
|
||
|
|
||
|
cmd.Flags().BoolP("json", "j", false, "Output data in JSON format")
|
||
|
cmd.Flags().BoolP("index-only", "i", false, "Only print the index of bookmarks")
|
||
|
|
||
|
return cmd
|
||
|
}
|