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.
- 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.5
CHANGED
@@ -1,137 +1,117 @@
|
|
1
|
-
.\" generated with Ronn/v0.
|
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" "
|
4
|
+
.TH "TUMBLR" "5" "October 2012" "Mark Wunsch" "Tumblr Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
|
-
\fBtumblr\fR
|
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
|
-
|
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
|
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
|
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
|
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
|
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
|
-
.
|
56
|
-
\fBtype\fR
|
57
|
-
|
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
|
-
.
|
84
|
-
\
|
85
|
-
|
61
|
+
.TP
|
62
|
+
\fBstate\fR
|
63
|
+
\fBpublished\fR, \fBdraft\fR, \fBqueue\fR, \fBprivate\fR
|
86
64
|
.
|
87
|
-
.
|
88
|
-
\
|
89
|
-
|
65
|
+
.TP
|
66
|
+
\fBformat\fR
|
67
|
+
\fBhtml\fR or \fBmarkdown\fR Defaults to \fBmarkdown\fR
|
90
68
|
.
|
91
|
-
.
|
92
|
-
\
|
93
|
-
|
69
|
+
.TP
|
70
|
+
\fBtags\fR
|
71
|
+
Comma\-separated list of tags\.
|
94
72
|
.
|
95
|
-
.
|
96
|
-
\
|
97
|
-
|
73
|
+
.TP
|
74
|
+
\fBdate\fR
|
75
|
+
Post date\.
|
98
76
|
.
|
99
|
-
.
|
100
|
-
\
|
101
|
-
|
77
|
+
.TP
|
78
|
+
\fBslug\fR
|
79
|
+
A custom string to appear in the post\'s url\.
|
102
80
|
.
|
103
|
-
.
|
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
|
-
\
|
110
|
-
|
89
|
+
\fBtext\fR
|
90
|
+
\fBtitle\fR, \fBbody\fR
|
111
91
|
.
|
112
92
|
.TP
|
113
93
|
\fBphoto\fR
|
114
|
-
|
94
|
+
\fBcaption\fR, \fBlink\fR, \fBsource\fR, \fBdata\fR
|
115
95
|
.
|
116
96
|
.TP
|
117
97
|
\fBquote\fR
|
118
|
-
|
98
|
+
\fBquote\fR, \fBsource\fR
|
119
99
|
.
|
120
100
|
.TP
|
121
101
|
\fBlink\fR
|
122
|
-
|
102
|
+
\fBtitle\fR, \fBurl\fR, \fBdescription\fR
|
123
103
|
.
|
124
104
|
.TP
|
125
|
-
\
|
126
|
-
|
105
|
+
\fBchat\fR
|
106
|
+
\fBtitle\fR,\fBconversation\fR
|
127
107
|
.
|
128
108
|
.TP
|
129
|
-
\
|
130
|
-
|
109
|
+
\fBaudio\fR
|
110
|
+
\fBcaption\fR, \fBexternal_url\fR, \fBdata\fR
|
131
111
|
.
|
132
112
|
.TP
|
133
|
-
\
|
134
|
-
|
113
|
+
\fBvideo\fR
|
114
|
+
\fBcaption\fR, \fBembed\fR, \fBdata\fR
|
135
115
|
.
|
136
116
|
.SH "SEE ALSO"
|
137
117
|
tumblr(1), markdown(5)
|
data/man/tumblr.5.html
CHANGED
@@ -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.
|
6
|
-
<title>tumblr(5)
|
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(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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
<
|
66
|
-
<
|
67
|
-
|
68
|
-
<
|
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>
|
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 (<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#
|
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
|
-
<
|
108
|
-
<
|
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></
|
112
|
-
<
|
113
|
-
|
114
|
-
<
|
115
|
-
|
116
|
-
<
|
117
|
-
|
118
|
-
<
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<
|
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>
|
141
|
-
<dt class="flush"><code>photo</code></dt><dd><p> <code>caption</code>, <code>
|
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>
|
144
|
-
<dt><code>
|
145
|
-
<dt class="flush"><code>
|
146
|
-
<dt class="flush"><code>
|
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)
|
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
|
-
|
157
|
-
|
158
|
-
|
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>
|
data/man/tumblr.5.ronn
CHANGED
@@ -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>
|
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#
|
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
|
-
`
|
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`, `
|
48
|
-
|
46
|
+
`published`, `draft`, `queue`, `private`
|
47
|
+
|
49
48
|
* `format`:
|
50
49
|
`html` or `markdown`
|
51
|
-
|
52
|
-
|
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
|
-
* `
|
65
|
-
|
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
|
-
* `
|
81
|
-
`title`
|
82
|
-
|
68
|
+
* `text`:
|
69
|
+
`title`, `body`
|
70
|
+
|
83
71
|
* `photo`:
|
84
|
-
`caption`, `
|
85
|
-
|
72
|
+
`caption`, `link`, `source`, `data`
|
73
|
+
|
86
74
|
* `quote`:
|
87
|
-
`source`
|
88
|
-
|
75
|
+
`quote`, `source`
|
76
|
+
|
89
77
|
* `link`:
|
90
|
-
`
|
91
|
-
|
92
|
-
* `
|
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
|
-
|