1
1
{
2
- "metadata" : {
3
- "name" : " " ,
4
- "signature" : " sha256:59aa2a601dea4869196c46cdd4efec67ead9fba0166ffe2ae3ca7fb85420d179"
5
- },
6
- "nbformat" : 3 ,
7
- "nbformat_minor" : 0 ,
8
- "worksheets" : [
2
+ "cells" : [
9
3
{
10
- "cells" : [
11
- {
12
- "cell_type" : " heading" ,
13
- "level" : 1 ,
14
- "metadata" : {},
15
- "source" : [
16
- " Adding a new post"
17
- ]
18
- },
19
- {
20
- "cell_type" : " code" ,
21
- "collapsed" : false ,
22
- "input" : [
23
- " title = \" Zen themes updated\" "
24
- ],
25
- "language" : " python" ,
26
- "metadata" : {},
27
- "outputs" : [],
28
- "prompt_number" : 11
29
- },
30
- {
31
- "cell_type" : " code" ,
32
- "collapsed" : false ,
33
- "input" : [
34
- " tags_list = ['python', 'IPython', 'nikola', 'blog', 'themes', 'zen']"
35
- ],
36
- "language" : " python" ,
37
- "metadata" : {},
38
- "outputs" : [],
39
- "prompt_number" : 12
40
- },
41
- {
42
- "cell_type" : " code" ,
43
- "collapsed" : false ,
44
- "input" : [
45
- " tags = ', '.join(tags_list)\n " ,
46
- " \n " ,
47
- " !nikola new_post -f ipynb -t \" {title}\" --tags=\" {tags}\" "
48
- ],
49
- "language" : " python" ,
50
- "metadata" : {},
51
- "outputs" : [
52
- {
53
- "output_type" : " stream" ,
54
- "stream" : " stdout" ,
55
- "text" : [
56
- " Creating New Post\r\n " ,
57
- " -----------------\r\n " ,
58
- " \r\n " ,
59
- " Title: Zen themes updated\r\n " ,
60
- " Scanning posts."
61
- ]
62
- },
63
- {
64
- "output_type" : " stream" ,
65
- "stream" : " stdout" ,
66
- "text" : [
67
- " ."
68
- ]
69
- },
70
- {
71
- "output_type" : " stream" ,
72
- "stream" : " stdout" ,
73
- "text" : [
74
- " ....done!\r\n " ,
75
- " \u001b [33;01m[2014-05-30T16:03:18Z] WARNING: new_post: This compiler does not support one-file posts.\r\n " ,
76
- " \u001b [39;49;00m\u001b [37m[2014-05-30T16:03:18Z] INFO: new_post: Your post's metadata is at: posts/zen-themes-updated.meta\r\n " ,
77
- " \u001b [39;49;00m\u001b [37m[2014-05-30T16:03:18Z] INFO: new_post: Your post's text is at: posts/zen-themes-updated.ipynb\r\n " ,
78
- " \u001b [39;49;00m"
79
- ]
80
- },
81
- {
82
- "output_type" : " stream" ,
83
- "stream" : " stdout" ,
84
- "text" : [
85
- " \u001b [0m"
86
- ]
87
- }
88
- ],
89
- "prompt_number" : 13
90
- },
4
+ "cell_type" : " markdown" ,
5
+ "metadata" : {},
6
+ "source" : [
7
+ " # Adding a new post"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type" : " code" ,
12
+ "execution_count" : 11 ,
13
+ "metadata" : {
14
+ "collapsed" : false
15
+ },
16
+ "outputs" : [],
17
+ "source" : [
18
+ " title = \" Zen themes updated\" "
19
+ ]
20
+ },
21
+ {
22
+ "cell_type" : " code" ,
23
+ "execution_count" : 12 ,
24
+ "metadata" : {
25
+ "collapsed" : false
26
+ },
27
+ "outputs" : [],
28
+ "source" : [
29
+ " tags_list = ['python', 'IPython', 'nikola', 'blog', 'themes', 'zen']"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type" : " code" ,
34
+ "execution_count" : 13 ,
35
+ "metadata" : {
36
+ "collapsed" : false
37
+ },
38
+ "outputs" : [
91
39
{
92
- "cell_type " : " code " ,
93
- "collapsed " : false ,
94
- "input " : [
95
- " base_url = \" http://127.0.0.1: \" \n" ,
96
- " port = 8888 \n " ,
40
+ "name " : " stdout " ,
41
+ "output_type " : " stream " ,
42
+ "text " : [
43
+ " Creating New Post \n " ,
44
+ " ----------------- \n " ,
97
45
" \n " ,
98
- " from nikola import utils\n " ,
99
- " notebook = \" /notebooks/posts/\" + utils.slugify(unicode(title)) + \" .ipynb\" \n " ,
100
- " \n " ,
101
- " url = base_url + str(port) + notebook\n " ,
102
- " print url"
103
- ],
104
- "language" : " python" ,
105
- "metadata" : {},
106
- "outputs" : [
107
- {
108
- "output_type" : " stream" ,
109
- "stream" : " stdout" ,
110
- "text" : [
111
- " http://127.0.0.1:8888/notebooks/posts/zen-themes-updated.ipynb\n "
112
- ]
113
- }
114
- ],
115
- "prompt_number" : 14
116
- },
46
+ " Title: Zen themes updated\n " ,
47
+ " Scanning posts......done!\n " ,
48
+ " \u001b [33;01m[2014-05-30T16:03:18Z] WARNING: new_post: This compiler does not support one-file posts.\n " ,
49
+ " \u001b [39;49;00m\u001b [37m[2014-05-30T16:03:18Z] INFO: new_post: Your post's metadata is at: posts/zen-themes-updated.meta\n " ,
50
+ " \u001b [39;49;00m\u001b [37m[2014-05-30T16:03:18Z] INFO: new_post: Your post's text is at: posts/zen-themes-updated.ipynb\n " ,
51
+ " \u001b [39;49;00m\u001b [0m"
52
+ ]
53
+ }
54
+ ],
55
+ "source" : [
56
+ " tags = ', '.join(tags_list)\n " ,
57
+ " \n " ,
58
+ " !nikola new_post -f ipynb -t \" {title}\" --tags=\" {tags}\" "
59
+ ]
60
+ },
61
+ {
62
+ "cell_type" : " code" ,
63
+ "execution_count" : 14 ,
64
+ "metadata" : {
65
+ "collapsed" : false
66
+ },
67
+ "outputs" : [
117
68
{
118
- "cell_type" : " code" ,
119
- "collapsed" : false ,
120
- "input" : [],
121
- "language" : " python" ,
122
- "metadata" : {},
123
- "outputs" : []
69
+ "name" : " stdout" ,
70
+ "output_type" : " stream" ,
71
+ "text" : [
72
+ " http://127.0.0.1:8888/notebooks/posts/zen-themes-updated.ipynb\n "
73
+ ]
124
74
}
125
75
],
126
- "metadata" : {}
76
+ "source" : [
77
+ " base_url = \" http://127.0.0.1:\"\n " ,
78
+ " port = 8888\n " ,
79
+ " \n " ,
80
+ " from nikola import utils\n " ,
81
+ " notebook = \" /notebooks/posts/\" + utils.slugify(unicode(title)) + \" .ipynb\" \n " ,
82
+ " \n " ,
83
+ " url = base_url + str(port) + notebook\n " ,
84
+ " print url"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type" : " code" ,
89
+ "execution_count" : null ,
90
+ "metadata" : {
91
+ "collapsed" : false
92
+ },
93
+ "outputs" : [],
94
+ "source" : []
127
95
}
128
- ]
129
- }
96
+ ],
97
+ "metadata" : {
98
+ "kernelspec" : {
99
+ "display_name" : " Python 3" ,
100
+ "language" : " python" ,
101
+ "name" : " python3"
102
+ },
103
+ "language_info" : {
104
+ "codemirror_mode" : {
105
+ "name" : " ipython" ,
106
+ "version" : 3
107
+ },
108
+ "file_extension" : " .py" ,
109
+ "mimetype" : " text/x-python" ,
110
+ "name" : " python" ,
111
+ "nbconvert_exporter" : " python" ,
112
+ "pygments_lexer" : " ipython3" ,
113
+ "version" : " 3.5.1"
114
+ }
115
+ },
116
+ "nbformat" : 4 ,
117
+ "nbformat_minor" : 0
118
+ }
0 commit comments