tumblr
- publish to tumblr.com
tumblr
COMMAND [ARGS]
tumblr
is a command line utility and Ruby library for working with Tumblr.com. It can read plain-text and binary files and publish them to Tumblr.
tumblr
is driven through a group of COMMANDS (similar to git
or rbenv
).
If you preface your plaintext file with a bit of YAML (<yaml.org>) frontmatter, you can give tumblr
more explicit instructions for how to publish your post. See tumblr(5) for available YAML parameters.
tumblr post
POST | FILE | URL Post to tumblr.
A POST is a piece of plaintext, assumed to be formatted as tumblr(5)
.
FILE is a path to a POST. If FILE has a binary extension, that file will be uploaded as an image, audio, or video post.
URL will create a link-type post, or a video or audio post, depending on the location of the url.
tumblr pipe
Read from STDIN and post to tumblr.
tumblr edit
POST_IDEdit POST_ID on tumblr. Will open the serialized post in the foreground with $TUMBLREDITOR then $EDITOR.
tumblr fetch
POST_IDFetch POST_ID from tumblr and write out its serialized form.
tumblr delete
POST_IDDelete POST_ID from tumblr.
tumblr list
Print a YAML listing of Post IDs to Post URLs.
tumblr help
[TASK]Print the help message and the description for TASK.
tumblr authorize
Start a web server and application to authenticate to tumblr and authorize the cli. See AUTHORIZATION
tumblr version
Print the tumblr
version and quit.
These options are used when posting to tumblr, i.e. when using tumblr post
or tumblr pipe
.
-p
,--publish
Publish this post (ignoring the state
parameter set in the post).
-q
,--queue
Add this post to the queue.
-d
,--draft
Save this post as a draft.
--credentials
=PATHThe file where your OAuth keys are stored. When authenticating, this path is where the keys should be stored.
--host
=HOSTThe hostname of the Tumblr account your posting to. Posting and fetching posts require the hostname.
Most actions of the cli require authorization to Tumblr. tumblr authorize
provides a mechanism to authenticate and authorize the cli.
In order to use tumblr
, you first need to register an OAuth application with tumblr.
Run tumblr authorize
to start up server, and type in the consumer key and secret. You'll then be asked to authorize the app.
These keys are saved to the file noted in --credentials
, defaulting to ~/.tumblr
.
If you choose not to use this default, you will need to enter the --credentials
option every time you post.
Alternatively, use the $TUMBLRCRED
environment variable.
Publish a file to Tumblr.com:
$ tumblr post my_post.txt
Or from standard input:
$ cat data.yml my_post.txt | tumblr --host=mwunsch.tumblr.com
Make a Link post:
$ tumblr post http://github.com/mwunsch/tumblr
Or a Video post:
$ tumblr post http://www.youtube.com/watch?v=CW0DUg63lqU
Save it as a draft:
$ tumblr post -d http://www.youtube.com/watch?v=CW0DUg63lqU
Tumblr (the gem) is Copyright (C) 2010 - 2012 Mark Wunsch
Tumblr is Copyright (c) Tumblr, Inc. The Tumblr gem is NOT affiliated with Tumblr, Inc.
tumblr(5), gem(1)