tumblr-rb 1.3.0 → 2.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +15 -8
  3. data/Gemfile.lock +65 -65
  4. data/LICENSE +4 -2
  5. data/README.md +31 -84
  6. data/Rakefile +8 -68
  7. data/bin/tumblr +3 -133
  8. data/lib/tumblr.rb +7 -184
  9. data/lib/tumblr/authentication.rb +71 -0
  10. data/lib/tumblr/client.rb +148 -0
  11. data/lib/tumblr/command_line_interface.rb +222 -0
  12. data/lib/tumblr/credentials.rb +31 -0
  13. data/lib/tumblr/post.rb +253 -171
  14. data/lib/tumblr/post/answer.rb +17 -0
  15. data/lib/tumblr/post/audio.rb +22 -10
  16. data/lib/tumblr/post/chat.rb +25 -0
  17. data/lib/tumblr/post/link.rb +22 -9
  18. data/lib/tumblr/post/photo.rb +29 -10
  19. data/lib/tumblr/post/quote.rb +17 -10
  20. data/lib/tumblr/post/text.rb +18 -0
  21. data/lib/tumblr/post/video.rb +26 -11
  22. data/lib/tumblr/version.rb +3 -0
  23. data/lib/tumblr/views/error.erb +6 -0
  24. data/lib/tumblr/views/form.erb +11 -0
  25. data/lib/tumblr/views/layout.erb +41 -0
  26. data/lib/tumblr/views/success.erb +6 -0
  27. data/man/tumblr.1 +67 -65
  28. data/man/tumblr.1.html +131 -108
  29. data/man/tumblr.1.ronn +76 -57
  30. data/man/tumblr.5 +48 -68
  31. data/man/tumblr.5.html +106 -114
  32. data/man/tumblr.5.ronn +38 -51
  33. data/spec/fixtures/posts.json +10 -0
  34. data/spec/fixtures/typical_animated_gif.gif +0 -0
  35. data/spec/spec_helper.rb +12 -0
  36. data/spec/tumblr/authentication_spec.rb +57 -0
  37. data/spec/tumblr/client_spec.rb +223 -0
  38. data/spec/tumblr/credentials_spec.rb +63 -0
  39. data/spec/tumblr/post_spec.rb +125 -0
  40. data/tumblr-rb.gemspec +16 -89
  41. metadata +101 -102
  42. data/lib/tumblr/authenticator.rb +0 -18
  43. data/lib/tumblr/post/conversation.rb +0 -15
  44. data/lib/tumblr/post/regular.rb +0 -14
  45. data/lib/tumblr/reader.rb +0 -191
  46. data/lib/tumblr/writer.rb +0 -39
  47. data/test/fixtures/vcr_cassettes/authenticate/authenticate.yml +0 -39
  48. data/test/fixtures/vcr_cassettes/read/all_pages.yml +0 -34
  49. data/test/fixtures/vcr_cassettes/read/authenticated.yml +0 -40
  50. data/test/fixtures/vcr_cassettes/read/authentication_failure.yml +0 -33
  51. data/test/fixtures/vcr_cassettes/read/like.yml +0 -31
  52. data/test/fixtures/vcr_cassettes/read/mwunsch.yml +0 -101
  53. data/test/fixtures/vcr_cassettes/read/optional.yml +0 -48
  54. data/test/fixtures/vcr_cassettes/read/pages.yml +0 -36
  55. data/test/fixtures/vcr_cassettes/read/tumblrgemtest.yml +0 -42
  56. data/test/fixtures/vcr_cassettes/read/unlike.yml +0 -31
  57. data/test/fixtures/vcr_cassettes/write/delete.yml +0 -31
  58. data/test/fixtures/vcr_cassettes/write/edit.yml +0 -31
  59. data/test/fixtures/vcr_cassettes/write/reblog.yml +0 -31
  60. data/test/fixtures/vcr_cassettes/write/write.yml +0 -31
  61. data/test/helper.rb +0 -44
  62. data/test/test_tumblr.rb +0 -710
@@ -1,137 +1,117 @@
1
- .\" generated with Ronn/v0.4.1
2
- .\" http://github.com/rtomayko/ronn/
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "TUMBLR" "5" "March 2010" "Mark Wunsch" "Tumblr Manual"
4
+ .TH "TUMBLR" "5" "October 2012" "Mark Wunsch" "Tumblr Manual"
5
5
  .
6
6
  .SH "NAME"
7
- \fBtumblr\fR \-\- tumblr posts in plaintext
7
+ \fBtumblr\fR \- tumblr posts in plaintext
8
8
  .
9
9
  .SH "SYNOPSIS"
10
10
  .
11
11
  .nf
12
+
12
13
  \-\-\-
13
14
  title: A typical Tumblr post
14
15
  state: queue
15
- publish\-on: next tuesday
16
16
  tags: unix, manpages
17
17
  format: markdown
18
18
  \-\-\-
19
- This will create a *Regular* type of post on Tumblr.com. It's so easy.
19
+
20
+ This will create a *Regular* type of post on Tumblr\.com\. It\'s so easy\.
20
21
  That bit up at the top is called YAML frontmatter, and it just gives the
21
- post a bit of metadata, so publishing options are more flexible.
22
- They correspond to the Tumblr API. This post will be added to your Tumblr
22
+ post a bit of metadata, so publishing options are more flexible\.
23
+ They correspond to the Tumblr API\. This post will be added to your Tumblr
23
24
  queue, to be published next Tuesday, tagged with "unix" and "manpages",
24
- and formatted in markdown.
25
+ and formatted in markdown\.
25
26
  .
26
27
  .fi
27
28
  .
28
29
  .SH "DESCRIPTION"
29
- Any file can be published to Tumblr.com as a \fIRegular\fR post, but if you add a bit of YAML frontmatter (<yaml.org>) to the file, you can tell Tumblr exactly what you want to do.
30
+ Any plaintext file can be published to Tumblr\.com as a \fIText\fR post, but if you add a bit of YAML frontmatter (<yaml\.org>) to the file, you can tell Tumblr exactly what you want to do\.
30
31
  .
31
32
  .P
32
- YAML frontmatter beings with \fB\-\-\-\fR on a single line, followed by YAML, ending with another \fB\-\-\-\fR on a single line, e.g.
33
+ YAML frontmatter beings with \fB\-\-\-\fR on a single line, followed by YAML, ending with another \fB\-\-\-\fR on a single line, e\.g\.
33
34
  .
34
35
  .IP "" 4
35
36
  .
36
37
  .nf
38
+
37
39
  \-\-\-
38
40
  type: quote
39
41
  source: Billy Shakespeare
40
42
  state: draft
41
43
  tags: hamlet, shakespeare
42
44
  \-\-\-
43
- "To be or not to be."
45
+ "To be or not to be\."
44
46
  .
45
47
  .fi
46
48
  .
47
49
  .IP "" 0
48
50
  .
49
51
  .P
50
- Understood YAML parameters are documented and taken from the Tumblr API: http://www.tumblr.com/docs/en/api#api_write
52
+ Understood YAML parameters are documented and taken from the Tumblr API: http://www\.tumblr\.com/docs/en/api/v2#posting
51
53
  .
52
54
  .SH "BASIC PARAMETERS"
53
55
  These YAML parameters are available for all posts
54
56
  .
55
- .IP "\(bu" 4
56
- \fBtype\fR:
57
- \fBregular\fR, \fBphoto\fR, \fBlink\fR, \fBquote\fR, \fBconversation\fR, \fBvideo\fR, \fBaudio\fR
58
- Will take a guess if omitted.
59
- See \fIPOST\-TYPE SPECIFIC PARAMETERS\fR below.
60
- .
61
- .IP "\(bu" 4
62
- \fBstate\fR:
63
- \fBpublished\fR, \fBdraft\fR, \fBqueue\fR, \fBsubmission\fR
64
- .
65
- .IP "\(bu" 4
66
- \fBformat\fR:
67
- \fBhtml\fR or \fBmarkdown\fR
68
- .
69
- .IP "\(bu" 4
70
- \fBtags\fR:
71
- .
72
- .br
73
- Comma\-separated list of tags.
74
- .
75
- .IP "\(bu" 4
76
- \fBdate\fR:
77
- Post date.
78
- .
79
- .IP "\(bu" 4
80
- \fBprivate\fR:
81
- If the post should be marked private.
57
+ .TP
58
+ \fBtype\fR
59
+ \fBtext\fR, \fBphoto\fR, \fBquote\fR, \fBlink\fR, \fBchat\fR, \fBaudio\fR, \fBvideo\fR Will take a guess if omitted\. See \fIPOST\-TYPE SPECIFIC PARAMETERS\fR below\.
82
60
  .
83
- .IP "\(bu" 4
84
- \fBslug\fR:
85
- A custom string to appear in the post's url.
61
+ .TP
62
+ \fBstate\fR
63
+ \fBpublished\fR, \fBdraft\fR, \fBqueue\fR, \fBprivate\fR
86
64
  .
87
- .IP "\(bu" 4
88
- \fBgroup\fR:
89
- ID for a secondary blog.
65
+ .TP
66
+ \fBformat\fR
67
+ \fBhtml\fR or \fBmarkdown\fR Defaults to \fBmarkdown\fR
90
68
  .
91
- .IP "\(bu" 4
92
- \fBgenerator\fR:
93
- Short description of the publishing application.
69
+ .TP
70
+ \fBtags\fR
71
+ Comma\-separated list of tags\.
94
72
  .
95
- .IP "\(bu" 4
96
- \fBsend\-to\-twitter\fR:
97
- Twitter status update to make if the tumblelog has enabled it.
73
+ .TP
74
+ \fBdate\fR
75
+ Post date\.
98
76
  .
99
- .IP "\(bu" 4
100
- \fBpublish\-on\fR:
101
- If the post state is 'queue', publish on this date
77
+ .TP
78
+ \fBslug\fR
79
+ A custom string to appear in the post\'s url\.
102
80
  .
103
- .IP "" 0
81
+ .TP
82
+ \fBtweet\fR
83
+ Manages the autotweet (if enabled) for this post
104
84
  .
105
85
  .SH "POST\-TYPE SPECIFIC PARAMETERS"
106
- These are parameters that are available for specific types of posts.
86
+ These are parameters that are available for specific types of posts\.
107
87
  .
108
88
  .TP
109
- \fBregular\fR
110
- \fBtitle\fR
89
+ \fBtext\fR
90
+ \fBtitle\fR, \fBbody\fR
111
91
  .
112
92
  .TP
113
93
  \fBphoto\fR
114
- \fBcaption\fR, \fBclick\-through\-url\fR
94
+ \fBcaption\fR, \fBlink\fR, \fBsource\fR, \fBdata\fR
115
95
  .
116
96
  .TP
117
97
  \fBquote\fR
118
- \fBsource\fR
98
+ \fBquote\fR, \fBsource\fR
119
99
  .
120
100
  .TP
121
101
  \fBlink\fR
122
- \fBname\fR, \fBdescription\fR
102
+ \fBtitle\fR, \fBurl\fR, \fBdescription\fR
123
103
  .
124
104
  .TP
125
- \fBconversation\fR
126
- \fBtitle\fR
105
+ \fBchat\fR
106
+ \fBtitle\fR,\fBconversation\fR
127
107
  .
128
108
  .TP
129
- \fBvideo\fR
130
- \fBtitle\fR,\fBcaption\fR
109
+ \fBaudio\fR
110
+ \fBcaption\fR, \fBexternal_url\fR, \fBdata\fR
131
111
  .
132
112
  .TP
133
- \fBaudio\fR
134
- \fBcaption\fR
113
+ \fBvideo\fR
114
+ \fBcaption\fR, \fBembed\fR, \fBdata\fR
135
115
  .
136
116
  .SH "SEE ALSO"
137
117
  tumblr(1), markdown(5)
@@ -2,90 +2,96 @@
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.4.1'>
6
- <title>tumblr(5) -- tumblr posts in plaintext</title>
7
- <style type='text/css'>
8
- body {margin:0}
9
- #man, #man code, #man pre, #man tt, #man kbd, #man samp {
10
- font-family:consolas,monospace;
11
- font-size:16px;
12
- line-height:1.3;
13
- color:#343331;
14
- background:#fff; }
15
- #man { max-width:89ex; text-align:justify; margin:0 25px 25px 25px }
16
- #man h1, #man h2, #man h3 { color:#232221;clear:left }
17
- #man h1 { font-size:28px; margin:15px 0 30px 0; text-align:center }
18
- #man h2 { font-size:18px; margin-bottom:0; margin-top:10px; line-height:1.3; }
19
- #man h3 { font-size:16px; margin:0 0 0 4ex; }
20
- #man p, #man ul, #man ol, #man dl, #man pre { margin:0 0 18px 0; }
21
- #man pre {
22
- color:#333231;
23
- background:#edeceb;
24
- padding:5px 7px;
25
- margin:0px 0 20px 0;
26
- border-left:2ex solid #ddd}
27
- #man pre + h2, #man pre + h3 {
28
- margin-top:22px;
29
- }
30
- #man h2 + pre, #man h3 + pre {
31
- margin-top:5px;
32
- }
33
- #man > p, #man > ul, #man > ol, #man > dl, #man > pre { margin-left:8ex; }
34
- #man dt { margin:0; clear:left }
35
- #man dt.flush { float:left; width:8ex }
36
- #man dd { margin:0 0 0 9ex }
37
- #man code, #man strong, #man b { font-weight:bold; color:#131211; }
38
- #man pre code { font-weight:normal; color:#232221; background:inherit }
39
- #man em, var, u {
40
- font-style:normal; color:#333231; border-bottom:1px solid #999; }
41
- #man h1.man-title { display:none; }
42
- #man ol.man, #man ol.man li { margin:2px 0 10px 0; padding:0;
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(5) - tumblr posts in plaintext</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
- <body>
55
- <div id='man'>
56
-
57
- <h1 class='man-title'>tumblr(5)</h1>
58
-
59
- <ol class='head man'>
60
- <li class='tl'>tumblr(5)</li>
61
- <li class='tc'>Tumblr Manual</li>
62
- <li class='tr'>tumblr(5)</li>
63
- </ol>
64
-
65
- <h2 id='NAME'>NAME</h2>
66
- <p><code>tumblr</code> -- tumblr posts in plaintext</p>
67
-
68
- <h2>SYNOPSIS</h2>
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.
48
+
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'>
54
+
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="#BASIC-PARAMETERS">BASIC PARAMETERS</a>
60
+ <a href="#POST-TYPE-SPECIFIC-PARAMETERS">POST-TYPE SPECIFIC PARAMETERS</a>
61
+ <a href="#SEE-ALSO">SEE ALSO</a>
62
+ </div>
63
+
64
+ <ol class='man-decor man-head man head'>
65
+ <li class='tl'>tumblr(5)</li>
66
+ <li class='tc'>Tumblr Manual</li>
67
+ <li class='tr'>tumblr(5)</li>
68
+ </ol>
69
+
70
+ <h2 id="NAME">NAME</h2>
71
+ <p class="man-name">
72
+ <code>tumblr</code> - <span class="man-whatis">tumblr posts in plaintext</span>
73
+ </p>
74
+
75
+ <h2 id="SYNOPSIS">SYNOPSIS</h2>
69
76
 
70
77
  <pre><code>---
71
78
  title: A typical Tumblr post
72
79
  state: queue
73
- publish-on: next tuesday
74
80
  tags: unix, manpages
75
81
  format: markdown
76
82
  ---
77
83
 
78
- This will create a *Regular* type of post on Tumblr.com. It's so easy.
79
- That bit up at the top is called YAML frontmatter, and it just gives the
84
+ This will create a *Regular* type of post on Tumblr.com. It's so easy.
85
+ That bit up at the top is called YAML frontmatter, and it just gives the
80
86
  post a bit of metadata, so publishing options are more flexible.
81
- They correspond to the Tumblr API. This post will be added to your Tumblr
82
- queue, to be published next Tuesday, tagged with "unix" and "manpages",
87
+ They correspond to the Tumblr API. This post will be added to your Tumblr
88
+ queue, to be published next Tuesday, tagged with "unix" and "manpages",
83
89
  and formatted in markdown.
84
90
  </code></pre>
85
91
 
86
- <h2>DESCRIPTION</h2>
92
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
87
93
 
88
- <p>Any file can be published to Tumblr.com as a <i>Regular</i> post, but if you add a bit of YAML frontmatter (&lt;yaml.org>) to the file, you can tell Tumblr exactly what you want to do.</p>
94
+ <p>Any plaintext file can be published to Tumblr.com as a <i>Text</i> post, but if you add a bit of YAML frontmatter (&lt;yaml.org>) to the file, you can tell Tumblr exactly what you want to do.</p>
89
95
 
90
96
  <p>YAML frontmatter beings with <code>---</code> on a single line, followed by YAML, ending with another <code>---</code> on a single line, e.g.</p>
91
97
 
@@ -98,66 +104,52 @@ tags: hamlet, shakespeare
98
104
  "To be or not to be."
99
105
  </code></pre>
100
106
 
101
- <p>Understood YAML parameters are documented and taken from the Tumblr API: http://www.tumblr.com/docs/en/api#api_write</p>
107
+ <p>Understood YAML parameters are documented and taken from the Tumblr API: http://www.tumblr.com/docs/en/api/v2#posting</p>
102
108
 
103
- <h2>BASIC PARAMETERS</h2>
109
+ <h2 id="BASIC-PARAMETERS">BASIC PARAMETERS</h2>
104
110
 
105
111
  <p>These YAML parameters are available for all posts</p>
106
112
 
107
- <ul>
108
- <li><p><code>type</code>:
109
- <code>regular</code>, <code>photo</code>, <code>link</code>, <code>quote</code>, <code>conversation</code>, <code>video</code>, <code>audio</code>
113
+ <dl>
114
+ <dt class="flush"><code>type</code></dt><dd><p> <code>text</code>, <code>photo</code>, <code>quote</code>, <code>link</code>, <code>chat</code>, <code>audio</code>, <code>video</code>
110
115
  Will take a guess if omitted.
111
- See <em>POST-TYPE SPECIFIC PARAMETERS</em> below.</p></li>
112
- <li><p><code>state</code>:
113
- <code>published</code>, <code>draft</code>, <code>queue</code>, <code>submission</code></p></li>
114
- <li><p><code>format</code>:
115
- <code>html</code> or <code>markdown</code></p></li>
116
- <li><p><code>tags</code>: <br />
117
- Comma-separated list of tags.</p></li>
118
- <li><p><code>date</code>:
119
- Post date.</p></li>
120
- <li><p><code>private</code>:
121
- If the post should be marked private.</p></li>
122
- <li><p><code>slug</code>:
123
- A custom string to appear in the post's url.</p></li>
124
- <li><p><code>group</code>:
125
- ID for a secondary blog.</p></li>
126
- <li><p><code>generator</code>:
127
- Short description of the publishing application.</p></li>
128
- <li><p><code>send-to-twitter</code>:
129
- Twitter status update to make if the tumblelog has enabled it.</p></li>
130
- <li><p><code>publish-on</code>:
131
- If the post state is 'queue', publish on this date</p></li>
132
- </ul>
133
-
134
-
135
- <h2>POST-TYPE SPECIFIC PARAMETERS</h2>
116
+ See <em>POST-TYPE SPECIFIC PARAMETERS</em> below.</p></dd>
117
+ <dt class="flush"><code>state</code></dt><dd><p> <code>published</code>, <code>draft</code>, <code>queue</code>, <code>private</code></p></dd>
118
+ <dt class="flush"><code>format</code></dt><dd><p> <code>html</code> or <code>markdown</code>
119
+ Defaults to <code>markdown</code></p></dd>
120
+ <dt class="flush"><code>tags</code></dt><dd><p> Comma-separated list of tags.</p></dd>
121
+ <dt class="flush"><code>date</code></dt><dd><p> Post date.</p></dd>
122
+ <dt class="flush"><code>slug</code></dt><dd><p> A custom string to appear in the post's url.</p></dd>
123
+ <dt class="flush"><code>tweet</code></dt><dd><p> Manages the autotweet (if enabled) for this post</p></dd>
124
+ </dl>
125
+
126
+
127
+ <h2 id="POST-TYPE-SPECIFIC-PARAMETERS">POST-TYPE SPECIFIC PARAMETERS</h2>
136
128
 
137
129
  <p>These are parameters that are available for specific types of posts.</p>
138
130
 
139
131
  <dl>
140
- <dt class="flush"><code>regular</code></dt><dd><p> <code>title</code></p></dd>
141
- <dt class="flush"><code>photo</code></dt><dd><p> <code>caption</code>, <code>click-through-url</code></p></dd>
142
- <dt class="flush"><code>quote</code></dt><dd><p> <code>source</code></p></dd>
143
- <dt class="flush"><code>link</code></dt><dd><p> <code>name</code>, <code>description</code></p></dd>
144
- <dt><code>conversation</code></dt><dd><p> <code>title</code></p></dd>
145
- <dt class="flush"><code>video</code></dt><dd><p> <code>title</code>,<code>caption</code></p></dd>
146
- <dt class="flush"><code>audio</code></dt><dd><p> <code>caption</code></p></dd>
132
+ <dt class="flush"><code>text</code></dt><dd><p> <code>title</code>, <code>body</code></p></dd>
133
+ <dt class="flush"><code>photo</code></dt><dd><p> <code>caption</code>, <code>link</code>, <code>source</code>, <code>data</code></p></dd>
134
+ <dt class="flush"><code>quote</code></dt><dd><p> <code>quote</code>, <code>source</code></p></dd>
135
+ <dt class="flush"><code>link</code></dt><dd><p> <code>title</code>, <code>url</code>, <code>description</code></p></dd>
136
+ <dt class="flush"><code>chat</code></dt><dd><p> <code>title</code>,<code>conversation</code></p></dd>
137
+ <dt class="flush"><code>audio</code></dt><dd><p> <code>caption</code>, <code>external_url</code>, <code>data</code></p></dd>
138
+ <dt class="flush"><code>video</code></dt><dd><p> <code>caption</code>, <code>embed</code>, <code>data</code></p></dd>
147
139
  </dl>
148
140
 
149
141
 
150
- <h2>SEE ALSO</h2>
142
+ <h2 id="SEE-ALSO">SEE ALSO</h2>
151
143
 
152
- <p>tumblr(1), markdown(5)</p>
144
+ <p><a class="man-ref" href="tumblr.1.html">tumblr<span class="s">(1)</span></a>, <span class="man-ref">markdown<span class="s">(5)</span></span></p>
153
145
 
154
146
 
155
- <ol class='foot man'>
156
- <li class='tl'>Mark Wunsch</li>
157
- <li class='tc'>March 2010</li>
158
- <li class='tr'>tumblr(5)</li>
159
- </ol>
147
+ <ol class='man-decor man-foot man foot'>
148
+ <li class='tl'>Mark Wunsch</li>
149
+ <li class='tc'>October 2012</li>
150
+ <li class='tr'>tumblr(5)</li>
151
+ </ol>
160
152
 
161
- </div>
153
+ </div>
162
154
  </body>
163
155
  </html>
@@ -6,21 +6,20 @@ tumblr(5) -- tumblr posts in plaintext
6
6
  ---
7
7
  title: A typical Tumblr post
8
8
  state: queue
9
- publish-on: next tuesday
10
9
  tags: unix, manpages
11
10
  format: markdown
12
11
  ---
13
-
14
- This will create a *Regular* type of post on Tumblr.com. It's so easy.
15
- That bit up at the top is called YAML frontmatter, and it just gives the
12
+
13
+ This will create a *Regular* type of post on Tumblr.com. It's so easy.
14
+ That bit up at the top is called YAML frontmatter, and it just gives the
16
15
  post a bit of metadata, so publishing options are more flexible.
17
- They correspond to the Tumblr API. This post will be added to your Tumblr
18
- queue, to be published next Tuesday, tagged with "unix" and "manpages",
16
+ They correspond to the Tumblr API. This post will be added to your Tumblr
17
+ queue, to be published next Tuesday, tagged with "unix" and "manpages",
19
18
  and formatted in markdown.
20
-
19
+
21
20
  ## DESCRIPTION
22
21
 
23
- Any file can be published to Tumblr.com as a <i>Regular</i> post, but if you add a bit of YAML frontmatter (<yaml.org>) to the file, you can tell Tumblr exactly what you want to do.
22
+ Any plaintext file can be published to Tumblr.com as a <i>Text</i> post, but if you add a bit of YAML frontmatter (<yaml.org>) to the file, you can tell Tumblr exactly what you want to do.
24
23
 
25
24
  YAML frontmatter beings with `---` on a single line, followed by YAML, ending with another `---` on a single line, e.g.
26
25
 
@@ -31,74 +30,62 @@ YAML frontmatter beings with `---` on a single line, followed by YAML, ending wi
31
30
  tags: hamlet, shakespeare
32
31
  ---
33
32
  "To be or not to be."
34
-
35
- Understood YAML parameters are documented and taken from the Tumblr API: http://www.tumblr.com/docs/en/api#api_write
33
+
34
+ Understood YAML parameters are documented and taken from the Tumblr API: http://www.tumblr.com/docs/en/api/v2#posting
36
35
 
37
36
  ## BASIC PARAMETERS
38
37
 
39
38
  These YAML parameters are available for all posts
40
39
 
41
40
  * `type`:
42
- `regular`, `photo`, `link`, `quote`, `conversation`, `video`, `audio`
41
+ `text`, `photo`, `quote`, `link`, `chat`, `audio`, `video`
43
42
  Will take a guess if omitted.
44
43
  See _POST-TYPE SPECIFIC PARAMETERS_ below.
45
44
 
46
45
  * `state`:
47
- `published`, `draft`, `queue`, `submission`
48
-
46
+ `published`, `draft`, `queue`, `private`
47
+
49
48
  * `format`:
50
49
  `html` or `markdown`
51
-
52
- * `tags`:
50
+ Defaults to `markdown`
51
+
52
+ * `tags`:
53
53
  Comma-separated list of tags.
54
-
54
+
55
55
  * `date`:
56
56
  Post date.
57
-
58
- * `private`:
59
- If the post should be marked private.
60
-
57
+
61
58
  * `slug`:
62
59
  A custom string to appear in the post's url.
63
-
64
- * `group`:
65
- ID for a secondary blog.
66
-
67
- * `generator`:
68
- Short description of the publishing application.
69
-
70
- * `send-to-twitter`:
71
- Twitter status update to make if the tumblelog has enabled it.
72
-
73
- * `publish-on`:
74
- If the post state is 'queue', publish on this date
75
-
60
+
61
+ * `tweet`:
62
+ Manages the autotweet (if enabled) for this post
63
+
76
64
  ## POST-TYPE SPECIFIC PARAMETERS
77
65
 
78
66
  These are parameters that are available for specific types of posts.
79
67
 
80
- * `regular`:
81
- `title`
82
-
68
+ * `text`:
69
+ `title`, `body`
70
+
83
71
  * `photo`:
84
- `caption`, `click-through-url`
85
-
72
+ `caption`, `link`, `source`, `data`
73
+
86
74
  * `quote`:
87
- `source`
88
-
75
+ `quote`, `source`
76
+
89
77
  * `link`:
90
- `name`, `description`
91
-
92
- * `conversation`:
93
- `title`
94
-
95
- * `video`:
96
- `title`,`caption`
97
-
78
+ `title`, `url`, `description`
79
+
80
+ * `chat`:
81
+ `title`,`conversation`
82
+
98
83
  * `audio`:
99
- `caption`
100
-
84
+ `caption`, `external_url`, `data`
85
+
86
+ * `video`:
87
+ `caption`, `embed`, `data`
88
+
101
89
  ## SEE ALSO
102
90
 
103
91
  tumblr(1), markdown(5)
104
-