{"id":54,"date":"2016-03-24T14:29:49","date_gmt":"2016-03-24T14:29:49","guid":{"rendered":"http:\/\/blog.datentraeger.li\/?p=54"},"modified":"2017-12-07T10:41:26","modified_gmt":"2017-12-07T10:41:26","slug":"post-to-gnu-social-via-terminal","status":"publish","type":"post","link":"https:\/\/blog.datentraeger.li\/?p=54","title":{"rendered":"Post to GNU Social via terminal"},"content":{"rendered":"<p>Just made an alias to queet to my GnuSocial instance from bash<\/p>\n<pre class=\"wrap:true lang:default decode:true\">alias queet='function _queet() { echo -e status=\"$@\" | curl -u user:passwd --data-binary @- https:\/\/gnusocial-url\/api\/statuses\/update.xml; }; _queet'\r\n<\/pre>\n<p>posting is now just that simple:<\/p>\n<pre line=\"1\" lang=\"bash\">peter@peanut:~$ queet Test-Queet via bash\r\n<\/pre>\n<p>Another option is to use the <a href=\"https:\/\/github.com\/2mb-solutions\/gasher\" target=\"_blank\">gasher-shellscript<\/a>. It\u2019s easy to setup and has lots of options like posting, replying or just reading the timeline&#8230;<\/p>\n<pre class=\"\" line=\"1\" lang=\"bash\">peter@peanut:~$ gasher -t\r\nPeter V. Beck [0]: Test-Queet via bash\r\nPosted: Thu Mar 24 02:00:58 +0100 2016 by peter@pfoeh.li from api\r\n\r\nPeter V. Beck [1]: Peter V. Beck deleted notice\r\n{{tag:pfoeh.li,2016-03-24:noticeId=2540:objectType=note}}.\r\nPosted: Thu Mar 24 01:49:42 +0100 2016 by peter@pfoeh.li from unknown\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Just made an alias to queet to my GnuSocial instance from bash alias queet=&#8217;function _queet() { echo -e status=&#8221;$@&#8221; | curl -u user:passwd &#8211;data-binary @- https:\/\/gnusocial-url\/api\/statuses\/update.xml; }; _queet&#8217; posting is now just that simple: peter@peanut:~$ queet Test-Queet via bash Another option is to use the gasher-shellscript. It\u2019s easy to setup&hellip;\n","protected":false},"author":2,"featured_media":562,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,6],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cli","category-gnusocial"],"_links":{"self":[{"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":3,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":465,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/465"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=\/wp\/v2\/media\/562"}],"wp:attachment":[{"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.datentraeger.li\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}