wppost - DEPRECATED post to wordpress blog
I like the wordpress gui for users and for ocassional management. However, what if I want to populate a million entries at once? Or upload a set of galleries with descriptions totaling 1000 images? That would "intake rear". This is a small tool to help with taking care of this problem.
-c category, can be a list separated by commas, no spaces -t title -i description, main body of post, if it has a slash, it is interpreted as a file to slurp like a text or html file -D iso formatted date for post, can be left out
If these are not provided, they will be sought in ~/.wppost -U username -P password -p address of xmlrpc.php file, http://yoursite/wpinstalldir/xmlrpc.php
-T if there are image attachments, place them as thumbnails only, with link, not just resized
Most basic of usage, (provided you have a ~/.wppost file)
wppost -t 'hi everyone' -i 'i just wanted to say hello'
If you want to specify two different categories:
wppost -t 'Another Apple' -i 'Apples are really great. I do love them so.' -c food,rant -D 20071231
If the body of the post is in a file
wppost -t 'title here' -i ./content.txt
If the content of the post is in a file and you want to use the file name as the title
wppost -i ./Title_Here.txt
If you want to have file attachments:
wppost -t 'recent photos' -i 'these are recent pictures i took' ./*jpg
It can be exhaustive to pass username, password,and proxy every time. Also, it's a risk on certain machines, because commands can be seen in the system by ps xau, so, it would show your parameters in the process list, thus showing your password.
you should have a config file that is YAML formatted in ~/.wppost, and then you can ommit the -U -P and -p parameters when you post.
--- U: username P: password p: 'http://proxy.address'
If you provide a -D date, it will be checked for iso compliance. If you provide categories, it is checked that the category exists. You must provide -t title and -i description.
supported struct is...
title - post's title, must be string description - main body of post, must be string mt_excerpt mt_text_more mt_allow_comments mt_allow_pings mt_tb_ping_urls dateCreated - can be empty, auto filled out for current time if empty, must be iso8601 categories - list, array of categories to post into
WordPress::CLI - replacement