tumblr-rb 1.3.0 → 2.0.0.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +7 -0
- data/Gemfile +15 -8
- data/Gemfile.lock +65 -65
- data/LICENSE +4 -2
- data/README.md +31 -84
- data/Rakefile +8 -68
- data/bin/tumblr +3 -133
- data/lib/tumblr.rb +7 -184
- data/lib/tumblr/authentication.rb +71 -0
- data/lib/tumblr/client.rb +148 -0
- data/lib/tumblr/command_line_interface.rb +222 -0
- data/lib/tumblr/credentials.rb +31 -0
- data/lib/tumblr/post.rb +253 -171
- data/lib/tumblr/post/answer.rb +17 -0
- data/lib/tumblr/post/audio.rb +22 -10
- data/lib/tumblr/post/chat.rb +25 -0
- data/lib/tumblr/post/link.rb +22 -9
- data/lib/tumblr/post/photo.rb +29 -10
- data/lib/tumblr/post/quote.rb +17 -10
- data/lib/tumblr/post/text.rb +18 -0
- data/lib/tumblr/post/video.rb +26 -11
- data/lib/tumblr/version.rb +3 -0
- data/lib/tumblr/views/error.erb +6 -0
- data/lib/tumblr/views/form.erb +11 -0
- data/lib/tumblr/views/layout.erb +41 -0
- data/lib/tumblr/views/success.erb +6 -0
- data/man/tumblr.1 +67 -65
- data/man/tumblr.1.html +131 -108
- data/man/tumblr.1.ronn +76 -57
- data/man/tumblr.5 +48 -68
- data/man/tumblr.5.html +106 -114
- data/man/tumblr.5.ronn +38 -51
- data/spec/fixtures/posts.json +10 -0
- data/spec/fixtures/typical_animated_gif.gif +0 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/tumblr/authentication_spec.rb +57 -0
- data/spec/tumblr/client_spec.rb +223 -0
- data/spec/tumblr/credentials_spec.rb +63 -0
- data/spec/tumblr/post_spec.rb +125 -0
- data/tumblr-rb.gemspec +16 -89
- metadata +101 -102
- data/lib/tumblr/authenticator.rb +0 -18
- data/lib/tumblr/post/conversation.rb +0 -15
- data/lib/tumblr/post/regular.rb +0 -14
- data/lib/tumblr/reader.rb +0 -191
- data/lib/tumblr/writer.rb +0 -39
- data/test/fixtures/vcr_cassettes/authenticate/authenticate.yml +0 -39
- data/test/fixtures/vcr_cassettes/read/all_pages.yml +0 -34
- data/test/fixtures/vcr_cassettes/read/authenticated.yml +0 -40
- data/test/fixtures/vcr_cassettes/read/authentication_failure.yml +0 -33
- data/test/fixtures/vcr_cassettes/read/like.yml +0 -31
- data/test/fixtures/vcr_cassettes/read/mwunsch.yml +0 -101
- data/test/fixtures/vcr_cassettes/read/optional.yml +0 -48
- data/test/fixtures/vcr_cassettes/read/pages.yml +0 -36
- data/test/fixtures/vcr_cassettes/read/tumblrgemtest.yml +0 -42
- data/test/fixtures/vcr_cassettes/read/unlike.yml +0 -31
- data/test/fixtures/vcr_cassettes/write/delete.yml +0 -31
- data/test/fixtures/vcr_cassettes/write/edit.yml +0 -31
- data/test/fixtures/vcr_cassettes/write/reblog.yml +0 -31
- data/test/fixtures/vcr_cassettes/write/write.yml +0 -31
- data/test/helper.rb +0 -44
- data/test/test_tumblr.rb +0 -710
    
        data/man/tumblr.1.html
    CHANGED
    
    | @@ -2,164 +2,187 @@ | |
| 2 2 | 
             
            <html>
         | 
| 3 3 | 
             
            <head>
         | 
| 4 4 | 
             
              <meta http-equiv='content-type' value='text/html;charset=utf8'>
         | 
| 5 | 
            -
              <meta name='generator' value='Ronn/v0. | 
| 6 | 
            -
              <title>tumblr(1)  | 
| 7 | 
            -
              <style type='text/css'>
         | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
                  float:left; width:33%; list-style-type:none;
         | 
| 44 | 
            -
                  text-transform:uppercase; font-size:18px; color:#999;
         | 
| 45 | 
            -
                  letter-spacing:1px;}
         | 
| 46 | 
            -
                #man ol.man { width:100%; }
         | 
| 47 | 
            -
                #man ol.man li.tl { text-align:left }
         | 
| 48 | 
            -
                #man ol.man li.tc { text-align:center;letter-spacing:4px }
         | 
| 49 | 
            -
                #man ol.man li.tr { text-align:right }
         | 
| 50 | 
            -
                #man ol.man a { color:#999 }
         | 
| 51 | 
            -
                #man ol.man a:hover { color:#333231 }
         | 
| 5 | 
            +
              <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
         | 
| 6 | 
            +
              <title>tumblr(1) - publish to tumblr.com</title>
         | 
| 7 | 
            +
              <style type='text/css' media='all'>
         | 
| 8 | 
            +
              /* style: man */
         | 
| 9 | 
            +
              body#manpage {margin:0}
         | 
| 10 | 
            +
              .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
         | 
| 11 | 
            +
              .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
         | 
| 12 | 
            +
              .mp h2 {margin:10px 0 0 0}
         | 
| 13 | 
            +
              .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
         | 
| 14 | 
            +
              .mp h3 {margin:0 0 0 4ex}
         | 
| 15 | 
            +
              .mp dt {margin:0;clear:left}
         | 
| 16 | 
            +
              .mp dt.flush {float:left;width:8ex}
         | 
| 17 | 
            +
              .mp dd {margin:0 0 0 9ex}
         | 
| 18 | 
            +
              .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
         | 
| 19 | 
            +
              .mp pre {margin-bottom:20px}
         | 
| 20 | 
            +
              .mp pre+h2,.mp pre+h3 {margin-top:22px}
         | 
| 21 | 
            +
              .mp h2+pre,.mp h3+pre {margin-top:5px}
         | 
| 22 | 
            +
              .mp img {display:block;margin:auto}
         | 
| 23 | 
            +
              .mp h1.man-title {display:none}
         | 
| 24 | 
            +
              .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
         | 
| 25 | 
            +
              .mp h2 {font-size:16px;line-height:1.25}
         | 
| 26 | 
            +
              .mp h1 {font-size:20px;line-height:2}
         | 
| 27 | 
            +
              .mp {text-align:justify;background:#fff}
         | 
| 28 | 
            +
              .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
         | 
| 29 | 
            +
              .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
         | 
| 30 | 
            +
              .mp u {text-decoration:underline}
         | 
| 31 | 
            +
              .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
         | 
| 32 | 
            +
              .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
         | 
| 33 | 
            +
              .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
         | 
| 34 | 
            +
              .mp b.man-ref {font-weight:normal;color:#434241}
         | 
| 35 | 
            +
              .mp pre {padding:0 4ex}
         | 
| 36 | 
            +
              .mp pre code {font-weight:normal;color:#434241}
         | 
| 37 | 
            +
              .mp h2+pre,h3+pre {padding-left:0}
         | 
| 38 | 
            +
              ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
         | 
| 39 | 
            +
              ol.man-decor {width:100%}
         | 
| 40 | 
            +
              ol.man-decor li.tl {text-align:left}
         | 
| 41 | 
            +
              ol.man-decor li.tc {text-align:center;letter-spacing:4px}
         | 
| 42 | 
            +
              ol.man-decor li.tr {text-align:right;float:right}
         | 
| 52 43 | 
             
              </style>
         | 
| 53 44 | 
             
            </head>
         | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 45 | 
            +
            <!--
         | 
| 46 | 
            +
              The following styles are deprecated and will be removed at some point:
         | 
| 47 | 
            +
              div#man, div#man ol.man, div#man ol.head, div#man ol.man.
         | 
| 56 48 |  | 
| 57 | 
            -
             | 
| 49 | 
            +
              The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
         | 
| 50 | 
            +
              .man-navigation should be used instead.
         | 
| 51 | 
            +
            -->
         | 
| 52 | 
            +
            <body id='manpage'>
         | 
| 53 | 
            +
              <div class='mp' id='man'>
         | 
| 58 54 |  | 
| 59 | 
            -
            < | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
            </ | 
| 55 | 
            +
              <div class='man-navigation' style='display:none'>
         | 
| 56 | 
            +
                <a href="#NAME">NAME</a>
         | 
| 57 | 
            +
                <a href="#SYNOPSIS">SYNOPSIS</a>
         | 
| 58 | 
            +
                <a href="#DESCRIPTION">DESCRIPTION</a>
         | 
| 59 | 
            +
                <a href="#COMMANDS">COMMANDS</a>
         | 
| 60 | 
            +
                <a href="#POSTING-OPTIONS">POSTING OPTIONS</a>
         | 
| 61 | 
            +
                <a href="#COMMON-OPTIONS">COMMON OPTIONS</a>
         | 
| 62 | 
            +
                <a href="#AUTHORIZATION">AUTHORIZATION</a>
         | 
| 63 | 
            +
                <a href="#EXAMPLES">EXAMPLES</a>
         | 
| 64 | 
            +
                <a href="#COPYRIGHT">COPYRIGHT</a>
         | 
| 65 | 
            +
                <a href="#SEE-ALSO">SEE ALSO</a>
         | 
| 66 | 
            +
              </div>
         | 
| 64 67 |  | 
| 65 | 
            -
            < | 
| 66 | 
            -
            < | 
| 68 | 
            +
              <ol class='man-decor man-head man head'>
         | 
| 69 | 
            +
                <li class='tl'>tumblr(1)</li>
         | 
| 70 | 
            +
                <li class='tc'>Tumblr Manual</li>
         | 
| 71 | 
            +
                <li class='tr'>tumblr(1)</li>
         | 
| 72 | 
            +
              </ol>
         | 
| 67 73 |  | 
| 68 | 
            -
            <h2> | 
| 74 | 
            +
              <h2 id="NAME">NAME</h2>
         | 
| 75 | 
            +
            <p class="man-name">
         | 
| 76 | 
            +
              <code>tumblr</code> - <span class="man-whatis">publish to tumblr.com</span>
         | 
| 77 | 
            +
            </p>
         | 
| 69 78 |  | 
| 70 | 
            -
            < | 
| 79 | 
            +
            <h2 id="SYNOPSIS">SYNOPSIS</h2>
         | 
| 71 80 |  | 
| 72 | 
            -
            < | 
| 81 | 
            +
            <p><code>tumblr</code> COMMAND [ARGS]</p>
         | 
| 73 82 |  | 
| 74 | 
            -
            < | 
| 83 | 
            +
            <h2 id="DESCRIPTION">DESCRIPTION</h2>
         | 
| 75 84 |  | 
| 76 | 
            -
            <p | 
| 85 | 
            +
            <p><code>tumblr</code> 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.</p>
         | 
| 77 86 |  | 
| 78 | 
            -
            <p> | 
| 87 | 
            +
            <p><code>tumblr</code> is driven through a group of <a href="#COMMANDS" title="COMMANDS" data-bare-link="true">COMMANDS</a> (similar to <code>git</code> or <code>rbenv</code>).</p>
         | 
| 79 88 |  | 
| 80 | 
            -
            < | 
| 89 | 
            +
            <p>If you preface your plaintext file with a bit of YAML (<yaml.org>) frontmatter, you can give <code>tumblr</code> more explicit instructions for how to publish your post. See <a class="man-ref" href="tumblr.5.html">tumblr<span class="s">(5)</span></a> for available YAML parameters.</p>
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            <h2 id="COMMANDS">COMMANDS</h2>
         | 
| 81 92 |  | 
| 82 93 | 
             
            <dl>
         | 
| 83 | 
            -
            <dt><code | 
| 84 | 
            -
               | 
| 85 | 
            -
               | 
| 86 | 
            -
            < | 
| 87 | 
            -
               | 
| 88 | 
            -
            <dt><code | 
| 89 | 
            -
             | 
| 90 | 
            -
            <dt><code | 
| 91 | 
            -
            <dt><code | 
| 92 | 
            -
            <dt><code | 
| 94 | 
            +
            <dt><code>tumblr post</code> <var>POST</var> | <var>FILE</var> | <var>URL</var></dt><dd><p>  Post to tumblr.
         | 
| 95 | 
            +
              A <var>POST</var> is a piece of plaintext, assumed to be formatted as <code>tumblr(5)</code>.
         | 
| 96 | 
            +
              <var>FILE</var> is a path to a <var>POST</var>. If <var>FILE</var> has a binary extension, that file will be uploaded as an image, audio, or video post.
         | 
| 97 | 
            +
              <var>URL</var> will create a link-type post, or a video or audio post, depending on the location of the url.</p></dd>
         | 
| 98 | 
            +
            <dt><code>tumblr pipe</code></dt><dd><p>  Read from STDIN and post to tumblr.</p></dd>
         | 
| 99 | 
            +
            <dt><code>tumblr edit</code> <var>POST_ID</var></dt><dd><p>  Edit <var>POST_ID</var> on tumblr.
         | 
| 100 | 
            +
              Will open the serialized post in the foreground with $TUMBLREDITOR then $EDITOR.</p></dd>
         | 
| 101 | 
            +
            <dt><code>tumblr fetch</code> <var>POST_ID</var></dt><dd><p>  Fetch <var>POST_ID</var> from tumblr and write out its serialized form.</p></dd>
         | 
| 102 | 
            +
            <dt><code>tumblr delete</code> <var>POST_ID</var></dt><dd><p>  Delete <var>POST_ID</var> from tumblr.</p></dd>
         | 
| 103 | 
            +
            <dt><code>tumblr help</code> [<var>TASK</var>]</dt><dd><p>  Print the help message and the description for <var>TASK</var>.</p></dd>
         | 
| 104 | 
            +
            <dt><code>tumblr authorize</code></dt><dd><p>  Start a web server and application to authenticate to tumblr and authorize the cli.
         | 
| 105 | 
            +
              See <a href="#AUTHORIZATION" title="AUTHORIZATION" data-bare-link="true">AUTHORIZATION</a></p></dd>
         | 
| 106 | 
            +
            <dt><code>tumblr version</code></dt><dd><p>  Print the <code>tumblr</code> version and quit.</p></dd>
         | 
| 93 107 | 
             
            </dl>
         | 
| 94 108 |  | 
| 95 109 |  | 
| 96 | 
            -
            < | 
| 110 | 
            +
            <h2 id="POSTING-OPTIONS">POSTING OPTIONS</h2>
         | 
| 111 | 
            +
             | 
| 112 | 
            +
            <p>These options are used when posting to tumblr, i.e. when using <code>tumblr post</code> or <code>tumblr pipe</code>.</p>
         | 
| 97 113 |  | 
| 98 114 | 
             
            <dl>
         | 
| 99 | 
            -
            <dt><code>- | 
| 100 | 
            -
            <dt><code>- | 
| 115 | 
            +
            <dt><code>-p</code>,<code>--publish</code></dt><dd><p>  Publish this post (ignoring the <code>state</code> parameter set in the post).</p></dd>
         | 
| 116 | 
            +
            <dt><code>-q</code>,<code>--queue</code></dt><dd><p>  Add this post to the queue.</p></dd>
         | 
| 117 | 
            +
            <dt><code>-d</code>,<code>--draft</code></dt><dd><p>  Save this post as a draft.</p></dd>
         | 
| 101 118 | 
             
            </dl>
         | 
| 102 119 |  | 
| 103 120 |  | 
| 104 | 
            -
            <h2> | 
| 121 | 
            +
            <h2 id="COMMON-OPTIONS">COMMON OPTIONS</h2>
         | 
| 122 | 
            +
             | 
| 123 | 
            +
            <dl>
         | 
| 124 | 
            +
            <dt><code>--credentials</code>=<em>PATH</em></dt><dd><p>  The file where your OAuth keys are stored.
         | 
| 125 | 
            +
              When authenticating, this path is where the keys should be stored.</p></dd>
         | 
| 126 | 
            +
            <dt><code>--host</code>=<em>HOST</em></dt><dd><p>  The hostname of the Tumblr account your posting to.
         | 
| 127 | 
            +
              Posting and fetching posts require the hostname.</p></dd>
         | 
| 128 | 
            +
            </dl>
         | 
| 129 | 
            +
             | 
| 130 | 
            +
             | 
| 131 | 
            +
            <h2 id="AUTHORIZATION">AUTHORIZATION</h2>
         | 
| 132 | 
            +
             | 
| 133 | 
            +
            <p>Most actions of the cli require authorization to Tumblr. <code>tumblr authorize</code> provides a mechanism to authenticate and authorize the cli.</p>
         | 
| 134 | 
            +
             | 
| 135 | 
            +
            <p>In order to use <code>tumblr</code>, you first need to <a href="http://www.tumblr.com/oauth/apps">register</a> an OAuth application with tumblr.</p>
         | 
| 136 | 
            +
             | 
| 137 | 
            +
            <p>Run <code>tumblr authorize</code> to start up server, and type in the consumer key and secret. You'll then be asked to authorize the app.
         | 
| 138 | 
            +
            These keys are saved to the file noted in <code>--credentials</code>, defaulting to <code>~/.tumblr</code>.
         | 
| 139 | 
            +
            If you choose not to use this default, you will need to enter the <code>--credentials</code> option every time you post.
         | 
| 140 | 
            +
            Alternatively, use the <code>$TUMBLRCRED</code> environment variable.</p>
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            <h2 id="EXAMPLES">EXAMPLES</h2>
         | 
| 105 143 |  | 
| 106 144 | 
             
            <p>Publish a file to Tumblr.com:</p>
         | 
| 107 145 |  | 
| 108 | 
            -
            <pre><code>$ tumblr my_post.txt
         | 
| 146 | 
            +
            <pre><code>$ tumblr post my_post.txt
         | 
| 109 147 | 
             
            </code></pre>
         | 
| 110 148 |  | 
| 111 149 | 
             
            <p>Or from standard input:</p>
         | 
| 112 150 |  | 
| 113 | 
            -
            <pre><code>$ cat data.yml my_post.txt | tumblr  | 
| 151 | 
            +
            <pre><code>$ cat data.yml my_post.txt | tumblr --host=mwunsch.tumblr.com
         | 
| 114 152 | 
             
            </code></pre>
         | 
| 115 153 |  | 
| 116 154 | 
             
            <p>Make a Link post:</p>
         | 
| 117 155 |  | 
| 118 | 
            -
            <pre><code>$ tumblr http://github.com/mwunsch/tumblr
         | 
| 156 | 
            +
            <pre><code>$ tumblr post http://github.com/mwunsch/tumblr
         | 
| 119 157 | 
             
            </code></pre>
         | 
| 120 158 |  | 
| 121 159 | 
             
            <p>Or a Video post:</p>
         | 
| 122 160 |  | 
| 123 | 
            -
            <pre><code>$ tumblr http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 161 | 
            +
            <pre><code>$ tumblr post http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 124 162 | 
             
            </code></pre>
         | 
| 125 163 |  | 
| 126 164 | 
             
            <p>Save it as a draft:</p>
         | 
| 127 165 |  | 
| 128 | 
            -
            <pre><code>$ tumblr -d http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 129 | 
            -
            </code></pre>
         | 
| 130 | 
            -
             | 
| 131 | 
            -
            <p>Authenticate with credentials given from a file:</p>
         | 
| 132 | 
            -
             | 
| 133 | 
            -
            <pre><code>$ cat ~/.tumblrlogin
         | 
| 134 | 
            -
            email: tumblruser@generic-email.com
         | 
| 135 | 
            -
            password: myvoiceismypassport
         | 
| 136 | 
            -
            $ cat data.yml my_post.txt | tumblr --credentials ~/.tumblrlogin
         | 
| 137 | 
            -
            </code></pre>
         | 
| 138 | 
            -
             | 
| 139 | 
            -
            <h2>INSTALLATION</h2>
         | 
| 140 | 
            -
             | 
| 141 | 
            -
            <p>If you have RubyGems installed:</p>
         | 
| 142 | 
            -
             | 
| 143 | 
            -
            <pre><code>gem install tumblr-rb
         | 
| 166 | 
            +
            <pre><code>$ tumblr post -d http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 144 167 | 
             
            </code></pre>
         | 
| 145 168 |  | 
| 146 | 
            -
            <h2>COPYRIGHT</h2>
         | 
| 169 | 
            +
            <h2 id="COPYRIGHT">COPYRIGHT</h2>
         | 
| 147 170 |  | 
| 148 | 
            -
            <p>Tumblr (the gem) is Copyright (C) 2010 Mark Wunsch</p>
         | 
| 171 | 
            +
            <p>Tumblr (the gem) is Copyright (C) 2010 - 2012 Mark Wunsch</p>
         | 
| 149 172 |  | 
| 150 173 | 
             
            <p>Tumblr is Copyright (c) Tumblr, Inc. The Tumblr gem is NOT affiliated with Tumblr, Inc.</p>
         | 
| 151 174 |  | 
| 152 | 
            -
            <h2>SEE ALSO</h2>
         | 
| 175 | 
            +
            <h2 id="SEE-ALSO">SEE ALSO</h2>
         | 
| 153 176 |  | 
| 154 | 
            -
            <p>tumblr(5) | 
| 177 | 
            +
            <p><a class="man-ref" href="tumblr.5.html">tumblr<span class="s">(5)</span></a>, <span class="man-ref">gem<span class="s">(1)</span></span></p>
         | 
| 155 178 |  | 
| 156 179 |  | 
| 157 | 
            -
            <ol class='foot man'>
         | 
| 158 | 
            -
             | 
| 159 | 
            -
             | 
| 160 | 
            -
             | 
| 161 | 
            -
            </ol>
         | 
| 180 | 
            +
              <ol class='man-decor man-foot man foot'>
         | 
| 181 | 
            +
                <li class='tl'>Mark Wunsch</li>
         | 
| 182 | 
            +
                <li class='tc'>October 2012</li>
         | 
| 183 | 
            +
                <li class='tr'>tumblr(1)</li>
         | 
| 184 | 
            +
              </ol>
         | 
| 162 185 |  | 
| 163 | 
            -
            </div>
         | 
| 186 | 
            +
              </div>
         | 
| 164 187 | 
             
            </body>
         | 
| 165 188 | 
             
            </html>
         | 
    
        data/man/tumblr.1.ronn
    CHANGED
    
    | @@ -3,88 +3,107 @@ tumblr(1) -- publish to tumblr.com | |
| 3 3 |  | 
| 4 4 | 
             
            ## SYNOPSIS
         | 
| 5 5 |  | 
| 6 | 
            -
            `tumblr` [ | 
| 6 | 
            +
            `tumblr` COMMAND [ARGS]
         | 
| 7 7 |  | 
| 8 8 | 
             
            ## DESCRIPTION
         | 
| 9 9 |  | 
| 10 | 
            -
            `tumblr` is a command line utility and Ruby library for working with Tumblr.com. It can read plain-text files and publish them to Tumblr. | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
            If you preface your  | 
| 15 | 
            -
             | 
| 16 | 
            -
            ##  | 
| 17 | 
            -
             | 
| 18 | 
            -
            *  | 
| 19 | 
            -
            	 | 
| 20 | 
            -
            	 | 
| 21 | 
            -
            	 | 
| 22 | 
            -
            	
         | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
            	 | 
| 26 | 
            -
             | 
| 27 | 
            -
            *  | 
| 28 | 
            -
            	 | 
| 29 | 
            -
            	
         | 
| 10 | 
            +
            `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.
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            `tumblr` is driven through a group of [COMMANDS][] (similar to `git` or `rbenv`).
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            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.
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            ## COMMANDS
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            * `tumblr post` <POST> | <FILE> | <URL>:
         | 
| 19 | 
            +
            	Post to tumblr.
         | 
| 20 | 
            +
            	A <POST> is a piece of plaintext, assumed to be formatted as `tumblr(5)`.
         | 
| 21 | 
            +
            	<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.
         | 
| 22 | 
            +
            	<URL> will create a link-type post, or a video or audio post, depending on the location of the url.
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            * `tumblr pipe`:
         | 
| 25 | 
            +
            	Read from STDIN and post to tumblr.
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            * `tumblr edit` <POST_ID>:
         | 
| 28 | 
            +
            	Edit <POST_ID> on tumblr.
         | 
| 29 | 
            +
            	Will open the serialized post in the foreground with $TUMBLREDITOR then $EDITOR.
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            * `tumblr fetch` <POST_ID>:
         | 
| 32 | 
            +
            	Fetch <POST_ID> from tumblr and write out its serialized form.
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            * `tumblr delete` <POST_ID>:
         | 
| 35 | 
            +
            	Delete <POST_ID> from tumblr.
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            * `tumblr help` [<TASK>]:
         | 
| 38 | 
            +
            	Print the help message and the description for <TASK>.
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            * `tumblr authorize`:
         | 
| 41 | 
            +
            	Start a web server and application to authenticate to tumblr and authorize the cli.
         | 
| 42 | 
            +
            	See [AUTHORIZATION][]
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            * `tumblr version`:
         | 
| 45 | 
            +
            	Print the `tumblr` version and quit.
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            ## POSTING OPTIONS
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            These options are used when posting to tumblr, i.e. when using `tumblr post` or `tumblr pipe`.
         | 
| 50 | 
            +
             | 
| 30 51 | 
             
            * `-p`,`--publish`:
         | 
| 31 | 
            -
            	Publish  | 
| 52 | 
            +
            	Publish this post (ignoring the `state` parameter set in the post).
         | 
| 32 53 |  | 
| 33 54 | 
             
            * `-q`,`--queue`:
         | 
| 34 | 
            -
            	Add  | 
| 35 | 
            -
             | 
| 55 | 
            +
            	Add this post to the queue.
         | 
| 56 | 
            +
             | 
| 36 57 | 
             
            * `-d`,`--draft`:
         | 
| 37 | 
            -
            	Save  | 
| 38 | 
            -
            	
         | 
| 39 | 
            -
            * `--group`=_GROUP_:
         | 
| 40 | 
            -
            	Publish the post to a _GROUP_ tumblelog.
         | 
| 58 | 
            +
            	Save this post as a draft.
         | 
| 41 59 |  | 
| 42 | 
            -
            Other:
         | 
| 43 60 |  | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
            	 | 
| 61 | 
            +
            ## COMMON OPTIONS
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            * `--credentials`=_PATH_:
         | 
| 64 | 
            +
            	The file where your OAuth keys are stored.
         | 
| 65 | 
            +
            	When authenticating, this path is where the keys should be stored.
         | 
| 66 | 
            +
             | 
| 67 | 
            +
            * `--host`=_HOST_:
         | 
| 68 | 
            +
            	The hostname of the Tumblr account your posting to.
         | 
| 69 | 
            +
            	Posting and fetching posts require the hostname.
         | 
| 70 | 
            +
             | 
| 71 | 
            +
            ## AUTHORIZATION
         | 
| 72 | 
            +
             | 
| 73 | 
            +
            Most actions of the cli require authorization to Tumblr. `tumblr authorize` provides a mechanism to authenticate and authorize the cli.
         | 
| 74 | 
            +
             | 
| 75 | 
            +
            In order to use `tumblr`, you first need to [register](http://www.tumblr.com/oauth/apps) an OAuth application with tumblr.
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            Run `tumblr authorize` to start up server, and type in the consumer key and secret. You'll then be asked to authorize the app.
         | 
| 78 | 
            +
            These keys are saved to the file noted in `--credentials`, defaulting to `~/.tumblr`.
         | 
| 79 | 
            +
            If you choose not to use this default, you will need to enter the `--credentials` option every time you post.
         | 
| 80 | 
            +
            Alternatively, use the `$TUMBLRCRED` environment variable.
         | 
| 49 81 |  | 
| 50 82 | 
             
            ## EXAMPLES
         | 
| 51 83 |  | 
| 52 84 | 
             
            Publish a file to Tumblr.com:
         | 
| 53 85 |  | 
| 54 | 
            -
            	$ tumblr my_post.txt
         | 
| 55 | 
            -
             | 
| 86 | 
            +
            	$ tumblr post my_post.txt
         | 
| 87 | 
            +
             | 
| 56 88 | 
             
            Or from standard input:
         | 
| 57 89 |  | 
| 58 | 
            -
            	$ cat data.yml my_post.txt | tumblr  | 
| 59 | 
            -
             | 
| 90 | 
            +
            	$ cat data.yml my_post.txt | tumblr --host=mwunsch.tumblr.com
         | 
| 91 | 
            +
             | 
| 60 92 | 
             
            Make a Link post:
         | 
| 61 93 |  | 
| 62 | 
            -
            	$ tumblr http://github.com/mwunsch/tumblr
         | 
| 63 | 
            -
            	
         | 
| 64 | 
            -
            Or a Video post:
         | 
| 94 | 
            +
            	$ tumblr post http://github.com/mwunsch/tumblr
         | 
| 65 95 |  | 
| 66 | 
            -
             | 
| 67 | 
            -
            	
         | 
| 68 | 
            -
            Save it as a draft:
         | 
| 69 | 
            -
             | 
| 70 | 
            -
            	$ tumblr -d http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 71 | 
            -
            	
         | 
| 72 | 
            -
            Authenticate with credentials given from a file:
         | 
| 96 | 
            +
            Or a Video post:
         | 
| 73 97 |  | 
| 74 | 
            -
            	$  | 
| 75 | 
            -
            	email: tumblruser@generic-email.com
         | 
| 76 | 
            -
            	password: myvoiceismypassport
         | 
| 77 | 
            -
            	$ cat data.yml my_post.txt | tumblr --credentials ~/.tumblrlogin
         | 
| 78 | 
            -
            	
         | 
| 79 | 
            -
            ## INSTALLATION
         | 
| 98 | 
            +
            	$ tumblr post http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 80 99 |  | 
| 81 | 
            -
             | 
| 100 | 
            +
            Save it as a draft:
         | 
| 82 101 |  | 
| 83 | 
            -
            	 | 
| 102 | 
            +
            	$ tumblr post -d http://www.youtube.com/watch?v=CW0DUg63lqU
         | 
| 84 103 |  | 
| 85 104 | 
             
            ## COPYRIGHT
         | 
| 86 105 |  | 
| 87 | 
            -
            Tumblr (the gem) is Copyright (C) 2010 Mark Wunsch
         | 
| 106 | 
            +
            Tumblr (the gem) is Copyright (C) 2010 - 2012 Mark Wunsch
         | 
| 88 107 |  | 
| 89 108 | 
             
            Tumblr is Copyright (c) Tumblr, Inc. The Tumblr gem is NOT affiliated with Tumblr, Inc.
         | 
| 90 109 |  |