Code Shop

A bit of Ruby, a bit of JavaScript, a bit of love...

    • Edit
    • Delete
    • Autopost

    Simple Vim Posterous Plugin

    I like writing in Vim! It is one of those things that I am so used to
    that every other text editor feels unnatural and going against the
    grain. So I thought I'd write a small plugin to post to Posterous. Add
    the following code to your .vimrc. Also make sure you have python
    enabled in vim as well as have markdown2 for python installed.

    The following need to be changed: blog_email, blog_password, and
    site_id. site_id can be grabbed by running the following on the
    terminal:

     
    curl -u my@email.com:mYpA$$W0RD http://posterous.com/api/getsites 
    

    Substitute the email and password. You will get a list of your blogs
    so choose the id of the blog you want to post to.

    The format of the text should be as follows: the first line is the
    title and the proceeding lines are the body:

     
    This is the title of the post 
     
    This is the body of the post. 
    

    This code is pretty straightforward and sparse because I am using this
    to post code snippets to a private blog. Check out the Posterous API to add more
    options and whatnot. Also take this as a start and expand upon it.

    Tags » code plugin posterous vim
    • 1 October 2009
    • Views
    • 3 Comments
    • Permalink
    • Favorited 0 Times
    • Tweet

    Comments 3 Comments

    Oct 11, 2009
    Health Freedom Activists said...
    Can a plugin for LiveWriter or ScribeFire be possible with this API?
    Mar 22, 2010
    mitry said...
    :w !mutt -s "Subject here" post@posterous.com
    Mar 22, 2010
    Abhi Yerra said...
    Not all of us use command line email clients. ;)

    Leave a Comment

  • Abhi Yerra's Posterous

    An entity composed of reality and pseudo-reality. Enjoys coding, news, history, photography.

  • About Abhi Yerra

    An entity composed of reality and pseudo-reality. Enjoys coding, news, history, photography.

  • Subscribe

    Subscribe to this posterous
    Unsubscribe
    Follow this posterous RSS
  • Follow Me

             

Theme created for Posterous by Obox