Coder Social home page Coder Social logo

restedblogger's Introduction

RestedBlogger

RestedBlogger is a command line application that can publish a reStructuredText to Blogger. It will also upload images that are included in your document.

To install from sources

$ git clone git://github.com/vadimgu/restedblogger
$ cd restedblogger
$ python setup.py install
  • Create or Update a post
  • Publish a post.
  • Preview a post.
  • Automatically upload images in a post to Picasa Web
  • Set the labels.

First you have to make a folder where you will be editing your posts.

$ mkdir myblog
$ cd myblog
$ reb init

The init command will ask you your google email, your password and will also ask you to choose a blog, if you have more then one. Then, that information is saved in reb.conf file. The password IS NOT stored and will be prompted on each interaction with the Blogger site.

The next step, is to write a blog post by editing a text file myPost.rst

My ReStructuredText Post
========================

Text is power. I'm using this image to prove it:

.. image:: proof.jpg

You can preview the post with the reb view command

$ reb view myPost.rst

This will open the default browser with the generated html. It will NOT post to Blogger.

RestedBlogger can fetch your last post and make it into a template for preview

$ reb template

Once you're satisfied with the results you can send the piece

$ reb draft myPost.rst

This will create a new post in draft mode or update an existing one. It can be executed many times.

Attention!

The posts are identified by their titles. If the title of a post is changed it will be considered as a new post.

To publish the post:

$ reb publish myPost.rst

This will create or update the post and set off the draft mode. Setting the draft mode back to on is not implemented.

All the features of reStructuredText an more...

Highlight source code using Pygments

.. sourcecode:: python

  def count(start=0):
    yield start
    while 1:
      start += 1
      yield start

The css styles are inlined.

You can reference Wikipedia articles like this:

I played a game of :wkp:`chess` yesterday.

To include plots in a post you must install gnuplot and make it available on your PATH.

.. gnuplot:: sincos.png

  set yrange [-2:2]
  plot sin(x), cos(x)

This will write the plot to sincos.png file and include it in the post.

To set the post labels use the meta directive:

.. meta::
  :keywords: Text, Power

Note

The meta directive is a standard reStructuredText directive.

You can write your own plugins. Plugins are python modules extending the reStructuredText functionality. To enable a plugin put it into ~/.restedblogger/plugins/. There is an example in the sources plugins/lilypond-directive.py. It allows to write music using Lilypond.

$ mkdir -p ~/.restedblogger/plugins
$ cp restedblogger/plugins/lilypond_directive.py ~/.restedblogger/plugins

This will enable the lilypond directive. The dependencies for plugins are not managed and any additional package used by a plugin must be installed manually.

restedblogger's People

Contributors

vadimgu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.