• This repository has been archived on 05/Sep/2018
  • Stars
    star
    282
  • Rank 146,549 (Top 3 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 14 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line interface and Ruby client for the Tumblr API (v2)

tumblr

Command line interface and Ruby client for the Tumblr API

It's been rewritten from the ground up to support v2 of the api.

Like the v1, the current version reads files with a special front-matter block, like Jekyll. In addition, this new version offers the ability to post photos, videos, and audio.

Unlike the previous version, this new command line utility uses OAuth to authenticate and authorize the user.

Installation

If you're on a Mac using Homebrew and are just interested in the cli:

	brew install https://raw.github.com/mwunsch/tumblr/master/share/tumblr-rb.rb

Or with gem:

	gem install tumblr-rb

Alternatively, you can clone the repo, and run rake install -- this will build the gem, place it in the pkg directory, and install the gem to your system. You should then be able to require 'tumblr' and/or run tumblr from the command line.

Authorization

Run tumblr authorize to boot up a small application to manage the fancy OAuth handshake with tumblr. You'll be prompted for a consumer key and secret you get from registering an app.

Getting Started

Like Jekyll, and Mustache, Tumblr gem will transform documents preceded by a YAML frontmatter block.

YAML frontmatter beings with --- on a single line, followed by YAML, ending with another --- on a single line, e.g.

---
type: quote
source: Billy Shakespeare
state: draft
tags: hamlet, shakespeare
---
"To be or not to be."

Understood YAML parameters are taken from the Tumblr API: http://www.tumblr.com/docs/en/api/v2#posting

All Posts

type				text, photo, link, quote, chat, video, audio
					will take a guess if ommitted.

state				published, queue, draft, private

format				html or markdown

tags				comma-separated list of tags

date    			post date

slug				A custom string to appear in the post's URL

tweet				Manages the autotweet (if enabled) for this post

See tumblr(5) for more info.

Configuration

The gem has some configuration options – API keys are kept in ~/.tumblr and can be changed if needed. It will also use a $TUMBLRHOST environment variable if specified. These are usually placed in your .bashrc or .zshrc, or specified on running the tumblr command: TUMBLRHOST=foo.tumblr.com tumblr post "Hello world!"

TODO

  • Photoset support

Copyright

The Tumblr gem is Copyright (c) 2010 - 2013 Mark Wunsch and is licensed under the MIT License.

Tumblr is Copyright (c) Tumblr, Inc. The Tumblr gem is NOT affiliated with Tumblr, Inc.

More Repositories

1

weary

A framework and DSL for building RESTful web service clients
Ruby
482
star
2

rumoji

Encode and decode emoji unicode characters into emoji-cheat-sheet form.
Ruby
182
star
3

thimble

[No Longer Maintained] Tumblr theme development tool. Protects your fingers from tedious copy-pasting.
PHP
165
star
4

handlebars.scala

A Scala implementation of the Handlebars templating language (a superset of Mustache).
Scala
112
star
5

prism

A Ruby microformat parser and HTML toolkit powered by Nokogiri
Ruby
63
star
6

overscan

A live coding environment for live streaming video
Racket
36
star
7

osxsub

Use OS X Text Substitution Preferences in your *nix pipeline
Ruby
30
star
8

hive-city

The hives of Necromunda rise from the ash wastes like sheer mountain peaks.
Elm
22
star
9

redwood

Simple Ruby trees
Ruby
18
star
10

gilt

Ruby client for the Gilt public API (dev.gilt.com)
Ruby
17
star
11

jquery-renewal

Enter the Carousel. This is the time of renewal. Be strong and you will be renewed.
HTML
15
star
12

sonic-sketches

Studies in Overtone
Clojure
7
star
13

emacs.d

'(wut)
Emacs Lisp
4
star
14

sublime

Settings for Sublime Text 2
4
star
15

mwunsch.github.io

steg der wunsch
Ruby
3
star
16

congrefs

Congrefs puts the long S into your text, according to the typographic rules of the 18th century.
JavaScript
3
star
17

collegiate-bowl

Meet the flamboyant players of the East/West Collegiate Bowl.
Ruby
3
star
18

dotfiles

~
Vim Script
3
star
19

redeye

An experimental CoffeeScript implementation atop the Rubinius VM
Ruby
2
star
20

twitcher

A tiny JavaScript library for consuming the Twitter Search API
JavaScript
1
star
21

mechwarper

Powering up... Portals online!
Shell
1
star
22

tellmountain

Send a notification to a HipChat room from stdin
Shell
1
star