App-pod2wp

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    App::pod2wp - Publish POD document to WordPress as blog post

VERSION
    This document describes version 0.005 of App::pod2wp (from Perl
    distribution App-pod2wp), released on 2021-05-25.

FUNCTIONS
  pod2wp
    Usage:

     pod2wp(%args) -> [$status_code, $reason, $payload, \%result_meta]

    Publish POD document to WordPress as blog post.

    This is like org2wp except that instead of Org as the document format,
    this program uses POD.

    To use this program, first create "~/pod2wp.conf" containing the API
    credentials, e.g.:

     proxy=https://YOURBLOGNAME.wordpress.com/xmlrpc.php
     username=YOURUSERNAME
     password=YOURPASSWORD

    You can also put multiple credentials in the configuration file using
    profile sections, e.g.:

     [profile=blog1]
     proxy=https://YOURBLOG1NAME.wordpress.com/xmlrpc.php
     username=YOURUSERNAME
     password=YOURPASSWORD
 
     [profile=blog2]
     proxy=https://YOURBLOG2NAME.wordpress.com/xmlrpc.php
     username=YOURUSERNAME
     password=YOURPASSWORD

    and specify which profile you want using command-line option e.g.
    "--config-profile blog1".

    To create a blog post, write your POD document (e.g. in "post1.pod")
    using this format:

     =for pod2wp TITLE: Blog post title
 
     =for pod2wp CATEGORY: cat1, cat2
 
     =for pod2wp TAGS: tag1,tag2,tag3
 
     =head1 Some header
 
     Text of your post ...
     ...

    then:

     % pod2wp post1.pod

    this will create a draft post. To publish directly:

     % pod2wp --publish post1.pod

    Note that this will also modify your POD file and insert this paragraph
    at the top:

     =for pod2wp POSTID: 1234

    where 1234 is the post ID retrieved from the server when creating the
    post.

    After the post is created, you can update using the same command:

     % pod2wp post1.pod

    You can use "--publish" to publish the post, or "--no-publish" to revert
    it to draft.

    To set more attributes:

     % pod2wp post1.pod --comment-status open \
         --extra-attr ping_status=closed --extra-attr sticky=1

    Another example, to schedule a post in the future:

     % pod2wp post1.pod --schedule 20301225T00:00:00



( run in 0.708 second using v1.01-cache-2.11-cpan-39bf76dae61 )