GithubHelp home page GithubHelp logo

isabella232 / tumblr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thoughtbot/tumblr

0.0 0.0 0.0 1.98 MB

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

License: MIT License

Ruby 100.00%

tumblr's Introduction

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.

tumblr's People

Contributors

elstudio avatar jcsackett avatar joeellis avatar kazupon avatar kristianfreeman avatar mike-burns avatar mwunsch avatar pengwynn avatar rrthomas 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.