Add command to create custom types
[shpub.git] / README.rst
index d2255be69e533a11bb16d89a70f071c96f82ea1b..410cdcbdb7a39dee2ac1bfbf064aa88898122bf0 100644 (file)
@@ -9,8 +9,13 @@ Command line `micropub <https://micropub.net/>`_ client written in PHP.
 ========
 Download
 ========
-The `github releases page <https://github.com/cweiske/shpub/releases>`_
-has self-contained ``.phar`` files that have all dependencies included.
+shpub is released as self-contained ``.phar`` file that includes
+all dependencies.
+
+.. LATESTRELEASE
+
+See `shpub downloads page <http://cweiske.de/shpub-download.htm>`_
+for all released versions.
 
 
 Dependencies
@@ -19,6 +24,7 @@ When using the git version, you need to have the following dependencies
 installed on your system:
 
 - PHP 5.4+
+- PEAR's `Console_CommandLine <http://pear.php.net/package/Console_CommandLine>`_
 - PEAR's `HTTP_Request2 <http://pear.php.net/package/HTTP_Request2>`_
 - PEAR's `MIME_Type <http://pear.php.net/package/MIME_Type>`_
 - PEAR's `NET_URL2 <http://pear.php.net/package/Net_URL2>`_
@@ -109,6 +115,23 @@ URL image upload::
     http://known.bogo/2016/img-url
 
 
+Custom post types
+=================
+You may create custom post types with the ``x`` command.
+This is useful if your micropub endpoint supports additional types,
+like known's ``annotation`` type (comments and likes for posts).
+
+Create a comment to a known post::
+
+    $ ./bin/shpub.php x annotation\
+        -x url=http://known.bogo/2016/example-domain-1\
+        -x type=reply\
+        -x username=barryf\
+        -x userurl=http://example.org/~barryf\
+        -x userphoto=http://example.org/~barryf/avatar.jpg\
+        -x content="There is a typo in paragraph 1. 'Fou' should be 'Foo'"
+
+
 ===============
 Delete/Undelete
 ===============
@@ -134,6 +157,19 @@ Existing posts can be modified if the `server supports this`__::
 __ https://indieweb.org/Micropub/Servers#Implementation_status
 
 
+===================
+Syndication targets
+===================
+You may list the syndication targets defined on the server::
+
+    $ ./bin/shpub.php targets
+    IndieNews
+     https://news.indieweb.org/en
+
+Then specify it when creating a post::
+
+    $ ./bin/shpub.php article -x mp-syndicate-to=https://news.indieweb.org/en title text
+
 ============
 File uploads
 ============
@@ -174,6 +210,8 @@ to see ``curl`` command equivalents to the shpub HTTP requests::
 ===========
 About shpub
 ===========
+shpub's homepage is http://cweiske.de/shpub.htm
+
 
 Source code
 ===========