Code Monkey home page Code Monkey logo

cli-poster's Introduction

CLI POSTER Command Line WordPress Blog Posting

A simple Bash script to post your files/content to WordPress blogs

Download the latest stable release for use on your desktop or server.

  • To install, download CLI POSTER and put it in a place you find fit. Next, simply create an alias to run cli-poster.sh as a bash script
    In Ubuntu, for example, you can add this entry to your ~/.bash_aliases file: alias cliposter='bash /path/to/your/cli-poster.sh'
  • You can get available commands by typing: cliposter -h, or examples by typing cliposter -e

cli-poster's People

Contributors

nikhgupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

cli-poster's Issues

How do you put paragraphs and an image in a post?

I've been googling how to post to a wordpress blog from a bash script all day, and this script is the best I found. Thank you!

I did the following: ./cli-poster.sh -T "My Title" < myfile.txt, where myfile.txt has paragraphs of text (separated by 2 newlines). All the paragraphs run together and any html code shows up instead of being processed by the browser.

How can I keep my paragraphs?

I'd also like to put an image into a post.

Unescaped XML-Reserved Symbols in XML-RPC Requests

I think this may be the cause of some or all of the "parse error. not well formed" errors you refer to in the FIXME list at the start of the script.

XML breaks if there are any unescaped "&" symbols (among other symbols like ">", "<", etc.). Your original script used a PHP method to escape these: I didn't test this, so I don't know if it worked well or not. With my alterations to your code, I'm using a python script to do the same thing.

If you edit the script to dump "WPTITLE" and "WP_POST" right before use, you can see whether they are escaped correctly. Mine were, but upon sending to the server they appear to be unescaped again (I used wireshark to capture the packets and look at the XML), leading to the error.

Oddly, if you manually enter "&" you get no errors; I guess the leading "&" gets converted to "&", then back again, leading to a correctly formatted message to the server. This suggests to me that double-encoding the symbols with my python script is a cheap hack to fix the bug.. but clearly inferior to actually solving the problem.

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.