Blogpost ======== A simple wrapper for blogging on LiveJournal. (May also work with compatible services like GreatJournal, DeadJournal etc.) What It Does ------------ The program reads in a text file provided from the command line and converts the contents to HTML. It then posts the result to your LJ blog. It can also show you a preview of the post in your terminal, which can be useful for proofreading purposes. It will also include the name of whatever music you are currently listening to (via external script). How It Works ------------ Create a blog post using whatever text editor you prefer, using Markdown notation. This is essentially the markup you would use in an email: blank line between paragraphs, asterisks for *emphasis*, blockquotes prefixed with the '>' character, etc. If you want, save the file with a '.todo' extension: it'll rename it as '.done' when you submit the post. I find this helps to tell which posts I still have pending, but still keep them all together. The first line of the text file is used as the subject title; if you don't want one, leave it blank. If you want to include LJ markup you can. There is also a special technique for cuts: This creates a new LJ cut with that title, which continues to the end of the post. Show a preview of the post in the terminal window: $ blogpost show path/to/blogpost.todo The preview will show LJ usernames in bold, to give you an idea of how they'll appear on the final page. LJ cuts are omitted for previews. Submit the post to your blog $ blogpost post path/to/blogpost.todo [args...] If all is successful, it should tell you the entry has been posted, and the file extension may be renamed to '.done' (if it was initially '.todo'; otherwise it remains the same). If you want to fine-tune the posting a bit, you can supply arguments to the charm package at the end of the command list (after the file name). For example, to change the user icon for that post: $ blogpost post path/to/blogpost.todo --pic lambda See the 'charm' manual for more details on the options you can use. That's it, really. Everything after that relies on your own ability to write! What It Needs ------------- As stated, this is a wrapper program. In fact, it's a whole blogging workflow in one. It doesn't do any dependency checks at the moment, so make sure you've got all these points covered before complaining that it doesn't work. 1. Charm A command line LJ client. You need to set this up to automatically authenticate for you (read this program's manual). 2. nowplaying Something that will return a text string with whatever you're currently listening to. I use a bash script that queries mpd; your mileage will no doubt vary. If you're not interested you don't need it. 3. links Terminal-based web browser, used for local previews. Presence of the original links is not required - anything that you can symlink to 'links' will be fine.