{"action":"created","issue":{"url":"https://api.github.com/repos/ssbc/scuttlebot/issues/307","repository_url":"https://api.github.com/repos/ssbc/scuttlebot","labels_url":"https://api.github.com/repos/ssbc/scuttlebot/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/ssbc/scuttlebot/issues/307/comments","events_url":"https://api.github.com/repos/ssbc/scuttlebot/issues/307/events","html_url":"https://github.com/ssbc/scuttlebot/issues/307","id":137008650,"number":307,"title":"`sbot publish` not reading from stdin","user":{"login":"clehner","id":95347,"avatar_url":"https://avatars.githubusercontent.com/u/95347?v=3","gravatar_id":"","url":"https://api.github.com/users/clehner","html_url":"https://github.com/clehner","followers_url":"https://api.github.com/users/clehner/followers","following_url":"https://api.github.com/users/clehner/following{/other_user}","gists_url":"https://api.github.com/users/clehner/gists{/gist_id}","starred_url":"https://api.github.com/users/clehner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clehner/subscriptions","organizations_url":"https://api.github.com/users/clehner/orgs","repos_url":"https://api.github.com/users/clehner/repos","events_url":"https://api.github.com/users/clehner/events{/privacy}","received_events_url":"https://api.github.com/users/clehner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ssbc/scuttlebot/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"pfraze","id":1270099,"avatar_url":"https://avatars.githubusercontent.com/u/1270099?v=3","gravatar_id":"","url":"https://api.github.com/users/pfraze","html_url":"https://github.com/pfraze","followers_url":"https://api.github.com/users/pfraze/followers","following_url":"https://api.github.com/users/pfraze/following{/other_user}","gists_url":"https://api.github.com/users/pfraze/gists{/gist_id}","starred_url":"https://api.github.com/users/pfraze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfraze/subscriptions","organizations_url":"https://api.github.com/users/pfraze/orgs","repos_url":"https://api.github.com/users/pfraze/repos","events_url":"https://api.github.com/users/pfraze/events{/privacy}","received_events_url":"https://api.github.com/users/pfraze/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-02-28T05:17:48Z","updated_at":"2016-03-06T21:30:26Z","closed_at":null,"body":"Docs say:\r\n```\r\ncat ./message-content.json | publish\r\n```\r\n\r\nObserved behavior:\r\n```\r\n$ cat msg.json | sbot publish\r\nUsageError: Param 0 is required\r\n...\r\n```\r\n\r\nWhen passing in a type parameter, it seems the stdin is ignored:\r\n```\r\n$ echo '{\"bar\":true}' >bar.json\r\n$ ssb_appname=ssb-test sbot publish --type foo <bar.json\r\n{\r\n  \"key\": \"%Ep2AYzdzZl+/O9u4QV27GD7q5fSnDnR+xOt7dDBtoKA=.sha256\",\r\n  \"value\": {\r\n    \"previous\": \"%zvgFcKXenlB6nmvu1g0hwlPuugFVlXLa2mjsos92rxg=.sha256\",\r\n    \"author\": \"@3HO6R2i60XNR3h6XCHAWCdt1k9Dwy+gaa2rVs6LzZ6Y=.ed25519\",\r\n    \"sequence\": 107,\r\n    \"timestamp\": 1456637046513,\r\n    \"hash\": \"sha256\",\r\n    \"content\": {\r\n      \"type\": \"foo\"\r\n    },\r\n    \"signature\": \"Jvi3ZR2Bj3yHb7fdjXJYh70Scu0iihIYf/9TT8AvaPwqj+DwLwMzBcW6IUDHjZ3nx+Zo25neYP4RA+Vw7yo9Dw==.sig.ed25519\"\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/ssbc/scuttlebot/issues/comments/193001264","html_url":"https://github.com/ssbc/scuttlebot/issues/307#issuecomment-193001264","issue_url":"https://api.github.com/repos/ssbc/scuttlebot/issues/307","id":193001264,"user":{"login":"pfraze","id":1270099,"avatar_url":"https://avatars.githubusercontent.com/u/1270099?v=3","gravatar_id":"","url":"https://api.github.com/users/pfraze","html_url":"https://github.com/pfraze","followers_url":"https://api.github.com/users/pfraze/followers","following_url":"https://api.github.com/users/pfraze/following{/other_user}","gists_url":"https://api.github.com/users/pfraze/gists{/gist_id}","starred_url":"https://api.github.com/users/pfraze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfraze/subscriptions","organizations_url":"https://api.github.com/users/pfraze/orgs","repos_url":"https://api.github.com/users/pfraze/repos","events_url":"https://api.github.com/users/pfraze/events{/privacy}","received_events_url":"https://api.github.com/users/pfraze/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T21:30:26Z","updated_at":"2016-03-06T21:30:26Z","body":"The docs are wrong. It should be:\r\n\r\n```\r\ncat ./message-content.json | publish .\r\n```\r\n\r\nWithout the `.`, it doesn't know to use stdin. We either need to change that, or fix the docs.\r\n\r\nIn the second part, the message that's streamed in, is not currently merged with any flags. You're either using stdin or the cli flags. We can change that, as well, if we think we should."}}