blogpost media processing

blogpost 0.9.0 adds lots of new features to the previous 0.1.0 release. The most important feature in the blogpost 0.9.0 release is WordPress media file management:

  • Media files (images, videos, audio, document) referenced in your AsciiDoc (or HTML) documents are automatically uploaded and linked to the uploaded blog.
  • Only new or modified media files are uploaded (changes detected using cached MD5 checksums).
  • Metadata caching means post options are remembered and don’t need to be repeated every time you update your posts.
  • WordPress Pages can be posted and updated (blogpost includes a patched wordpresslib.py containing Page methods).

This blog post along with this inline image smallnew.png and this block image:

tiger.png

Were uploaded by using this blogpost create command:

$ blogpost.py create blogpost_media_processing.txt

uploading: /home/srackham/doc/blogs/smallnew.png...
url: https://srackham.files.wordpress.com/2008/05/smallnew.png
uploading: /home/srackham/doc/blogs/tiger.png...
url: https://srackham.files.wordpress.com/2008/05/tiger1.png
creating published post 'blogpost media processing'...
id: 93
url: https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/

The info command lists locally cached information:

$ blogpost.py info blogpost_media_processing.txt

title:   blogpost media processing
id:      93
url:     https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/
status:  published
type:    post
doctype: article
created: Thu May 22 17:45:34 2008
updated: Thu May 22 17:45:40 2008
media:   https://srackham.files.wordpress.com/2008/05/tiger1.png
media:   https://srackham.files.wordpress.com/2008/05/smallnew.png

Note how the update command skips uploading the unchanged image files:

$ blogpost.py update blogpost_media_processing.txt

skipping: /home/srackham/doc/blogs/smallnew.png
skipping: /home/srackham/doc/blogs/tiger.png
updating published post 'blogpost media processing'...
id: 93
url: https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/

Here’s the AsciiDoc blog file that generated this weblog entry:

blogpost_media_processing.txt

blogpost media processing
=========================

//
// Blog outlining blogpost media processing.
//

'blogpost' 0.9.0 adds lots of new features to the previous 0.1.0
release.  The most important feature in the 'blogpost' 0.9.0 release
is WordPress media file management:

- Media files (images, videos, audio, document) referenced in your
  AsciiDoc (or HTML) documents are automatically uploaded and linked
  to the uploaded blog.
- Only new or modified media files are uploaded (changes detected
  using cached MD5 checksums).
- Metadata caching means post options are remembered and don't need to
  be repeated every time you update your posts.
- WordPress Pages can be posted and updated (blogpost includes a
  patched wordpresslib.py containing Page methods).

pass::[<!--more-->]

This blog post along with this inline image image:smallnew.png[] and
this block image:

image::tiger.png[]

Were uploaded by using this 'blogpost' create command:

$ blogpost.py create blogpost_media_processing.txt

uploading: /home/srackham/doc/blogs/smallnew.png… url: https://srackham.files.wordpress.com/2008/05/smallnew.png uploading: /home/srackham/doc/blogs/tiger.png… url: https://srackham.files.wordpress.com/2008/05/tiger1.png creating published post blogpost media processing… id: 93 url: https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/

The 'info' command lists locally cached information:

$ blogpost.py info blogpost_media_processing.txt

title: blogpost media processing id: 93 url: https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/ status: published type: post doctype: article created: Thu May 22 17:45:34 2008 updated: Thu May 22 17:45:40 2008 media: https://srackham.files.wordpress.com/2008/05/tiger1.png media: https://srackham.files.wordpress.com/2008/05/smallnew.png

Note how the update command skips uploading the unchanged image files:

$ blogpost.py update blogpost_media_processing.txt

skipping: /home/srackham/doc/blogs/smallnew.png skipping: /home/srackham/doc/blogs/tiger.png updating published post blogpost media processing… id: 93 url: https://srackham.wordpress.com/2008/05/22/blogpost-media-processing/

Here's the http://www.methods.co.nz[AsciiDoc] blog file that generated
this weblog entry:

.blogpost_media_processing.txt

include::blogpost_media_processing.txt[depth=1]

The how's and why's are explained on the
https://srackham.wordpress.com/blogpost1/[blogpost(1) man page].

The how’s and why’s are explained on the blogpost(1) man page.

Advertisements

3 Responses to “blogpost media processing”

  1. alfredo Says:

    this is freaking awesome

    I came here via wordpress.org

    and this is written in python! woo-hoo!

  2. cal Says:

    dude you are way way way too cool

  3. Raam Dev Says:

    This is awesome! Thanks a ton Stuart!

    I wrote a quick shell script to help automate posting asides on my blog using blogpost. I wrote about it here if anyone is interested:

    http://blog.raamdev.com/2009/01/24/blogging-from-the-command-line

Comments are closed.


%d bloggers like this: