cmd/toot.go
changeset 71 67e3234c26a9
parent 70 155fdea254c3
child 79 bca27c55be9f
--- a/cmd/toot.go	Sat May 06 18:16:08 2017 +0200
+++ b/cmd/toot.go	Sat May 06 18:28:24 2017 +0200
@@ -24,6 +24,7 @@
 	tootAliasCmd.Flags().StringVarP(&statusOpts.mediaFilePath, "file", "f", "", "Media attachment file name")
 	tootAliasCmd.Flags().StringVar(&statusOpts.textFilePath, "text-file", "", "Text file name (message content)")
 	tootAliasCmd.Flags().Int64VarP(&statusOpts.inReplyToID, "in-reply-to", "r", 0, "Status ID to reply to")
+	tootAliasCmd.Flags().BoolVar(&statusOpts.stdin, "stdin", false, "Read message content from standard input")
 
 	// Flag completion
 	annotation := make(map[string][]string)
@@ -40,7 +41,8 @@
   madonctl toot --spoiler Warning "Hello, World"
   madonctl status post --media-ids ID1,ID2 "Here are the photos"
   madonctl post --sensitive --file image.jpg Image
-  madonctl toot --text-file message.txt`,
+  madonctl toot --text-file message.txt
+  echo "Hello from #madonctl" | madonctl toot --visibility unlisted --stdin`,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		if err := madonInit(true); err != nil {
 			return err