On the Images markup examples page I explain how to use the reStructuredText image directive to include images hosted on a remote server. Flickr2rst automatically generates the markup for images hosted at Flickr. The script takes a Flickr photo-id as an argument. If no argument is given a default photo-id is used. See for information about the Flickr photo-id.

Usage: <> [options] [arg]

-h, --help show this help message and exit
-s size [square, thumbnail, small (default), medium, large, orginal]
-a align [left, right (default), middle]

Example. Running python -a left -s small 2419641800 prints the following to stdout:

.. image::
       :height: 160px
       :width: 240px
       :alt: The flag of Milan
       :align: left

When I edit a reStructuredText text I run the script from inside vim like this: :r! python /path_to/ [photo-id].

Flickr2rst is python script. It uses the flickrapi module. You can get it from

Download click here. Flickr2rst is released under the MIT X licence. Please read my software notice.

Published:Mon Dec 20 2010