Git Product home page Git Product logo

asc2wp-asciidoc-to-wordpress's Introduction

asc2wp

Asc2wp is Asciidoc format file base post solution for Wordpress.

Requirement

  • Asciidoctor

  • python-wordpress-xmlrpc

  • pyyaml

Installation

You can install the Asc2wp using the pip command:

$ pip install asc2wp

Usage

Initialize

Make setting file (setting.yaml).

$ asc2wp init
Example
url: http://abcdefg.abc
xmlrpc_url: http://abcdefg.abc/xmlrpc.php
username: admin
password: admin
remove_div: False
remove_p: False
remove_p_tableblock: False

Please write your informations.
Don’t use "https://", Please write "http://".

Options

  • remove_div

  • remove_p

  • remove_p_tableblock

Can you remove DIV, P tags. If you want these tags, please input "True". Default setteing is "Fales".

Make template file

Make Post type or Page type Template file.

$ asc2wp makefile

The extension will be added automatically. (.adoc)

Example
:wp_type: post
:wp_status: publish ( draft / private / pending / publish )
:wp_date: (automatically)
:wp_modified: (automatically)
:wp_id: (automatically)
:wp_title:
:wp_slug:
:wp_category: cat1, cat2, cat3 (separated by commas)
:wp_tag: tag1, tag2, tag3 (separated by commas)
:wp_excerpt:
:wp_thumbnail: (input attachments id)

:toc:
:imagesdir: https://abcdefg.abc/wp-content/uploads/

//asciidoc contents

You can also use Asciidoctor Document headers.
If you have new posts, posts id’s will be added after ":wp_id: ".
So, If already have id’s in the file, it is treated as editing post.

Post to Wordpress

$ asc2wp {asciidoc-files}

You can also use wild card.

Example
$ asc2wp 2016-05-*.adoc

After upload, displayed Post informations on console.

Media Upload

$ asc2wp -m {image-files}

You can also use wild card.

Example
$ asc2wp -m /images/*.jpg

After upload, displayed attachments ID and file name and file’s URL on console.

asc2wp-asciidoc-to-wordpress's People

Contributors

karelie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.