runeblog 0.2.37 → 0.2.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mkwidget +209 -0
- data/empty_view/themes/standard/blog/generate.lt3 +12 -12
- data/empty_view/themes/standard/blog/index.lt3 +0 -1
- data/empty_view/themes/standard/etc/blog.css.lt3 +0 -1
- data/empty_view/themes/standard/post/generate.lt3 +4 -0
- data/empty_view/themes/standard/widgets/bydates/README +2 -0
- data/empty_view/themes/standard/widgets/bydates/bydates.lt3 +2 -0
- data/empty_view/themes/standard/widgets/bydates/bydates.rb +14 -0
- data/empty_view/themes/standard/widgets/bydates/card.css +1 -0
- data/empty_view/themes/standard/widgets/bydates/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/bydates/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/bydates/main.css +2 -0
- data/empty_view/themes/standard/widgets/bydates/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/bydates/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/bydates/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/bydates/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/links/README +2 -0
- data/empty_view/themes/standard/widgets/links/card.css +1 -0
- data/empty_view/themes/standard/widgets/links/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/links/links.lt3 +1 -1
- data/empty_view/themes/standard/widgets/links/links.rb +14 -0
- data/empty_view/themes/standard/widgets/links/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/links/main.css +2 -0
- data/empty_view/themes/standard/widgets/links/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/links/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/links/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/links/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/news/README +2 -0
- data/empty_view/themes/standard/widgets/news/card.css +1 -0
- data/empty_view/themes/standard/widgets/news/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/news/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/news/main.css +2 -0
- data/empty_view/themes/standard/widgets/news/news.rb +14 -0
- data/empty_view/themes/standard/widgets/news/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/news/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/news/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/news/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/pages/card.css +1 -0
- data/empty_view/themes/standard/widgets/pages/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/pages/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/pages/local.rb +0 -8
- data/empty_view/themes/standard/widgets/pages/main.css +2 -0
- data/empty_view/themes/standard/widgets/pages/pages.rb +21 -0
- data/empty_view/themes/standard/widgets/pages/pieces/card-head.lt3 +1 -0
- data/empty_view/themes/standard/widgets/pages/pieces/card-tail.lt3 +1 -0
- data/empty_view/themes/standard/widgets/pages/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/pages/pieces/main-tail.lt3 +2 -0
- data/empty_view/themes/standard/widgets/pinned/README +2 -0
- data/empty_view/themes/standard/widgets/pinned/card.css +1 -0
- data/empty_view/themes/standard/widgets/pinned/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/pinned/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/pinned/main.css +2 -0
- data/empty_view/themes/standard/widgets/pinned/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/pinned/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/pinned/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/pinned/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/pinned/pinned.lt3 +2 -0
- data/empty_view/themes/standard/widgets/pinned/pinned.rb +14 -0
- data/empty_view/themes/standard/widgets/search/README +2 -0
- data/empty_view/themes/standard/widgets/search/card.css +1 -0
- data/empty_view/themes/standard/widgets/search/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/search/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/search/main.css +2 -0
- data/empty_view/themes/standard/widgets/search/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/search/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/search/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/search/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/search/search.lt3 +2 -0
- data/empty_view/themes/standard/widgets/search/search.rb +14 -0
- data/empty_view/themes/standard/widgets/sitemap/README +2 -0
- data/empty_view/themes/standard/widgets/sitemap/card.css +1 -0
- data/empty_view/themes/standard/widgets/sitemap/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/sitemap/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/sitemap/main.css +2 -0
- data/empty_view/themes/standard/widgets/sitemap/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/sitemap/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/sitemap/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/sitemap/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/sitemap/sitemap.lt3 +2 -0
- data/empty_view/themes/standard/widgets/sitemap/sitemap.rb +14 -0
- data/empty_view/themes/standard/widgets/tag-cloud/OLD-example.lt3 +12 -0
- data/empty_view/themes/standard/widgets/tag-cloud/README +2 -0
- data/empty_view/themes/standard/widgets/tag-cloud/card.css +1 -0
- data/empty_view/themes/standard/widgets/tag-cloud/custom.rb +1 -0
- data/empty_view/themes/standard/widgets/tag-cloud/local-vars.lt3 +12 -0
- data/empty_view/themes/standard/widgets/tag-cloud/main.css +2 -0
- data/empty_view/themes/standard/widgets/tag-cloud/pieces/card-head.lt3 +8 -0
- data/empty_view/themes/standard/widgets/tag-cloud/pieces/card-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/tag-cloud/pieces/main-head.lt3 +10 -0
- data/empty_view/themes/standard/widgets/tag-cloud/pieces/main-tail.lt3 +4 -0
- data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +1 -10
- data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb +14 -0
- data/lib/default.rb +0 -3
- data/lib/helpers-repl.rb +4 -2
- data/lib/liveblog.rb +56 -9
- data/lib/repl.rb +34 -21
- data/lib/runeblog.rb +24 -10
- data/lib/runeblog_version.rb +1 -1
- data/lib/xlate.rb +5 -0
- data/test/austin.rb +150 -0
- data/test/make_blog.rb +23 -2
- metadata +88 -4
- data/empty_view/remote/widgets/pages/SUBFILES +0 -1
- data/empty_view/themes/standard/widgets/calendar/calendar.lt3 +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4614cd8057ff8c6482fefa922372cda4e4bfc3ff0cabf607aa09452d11bd893
|
4
|
+
data.tar.gz: 060c3e221272fcc0d196db0892c696ee3aec22cf8d3fc52c0804fd1be5e94694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d686398ca6cfa3f27c24956cd28a51bdb6ce719c5ddd84a9ccb01ffa836f5ab8bc729e476b0822347aed57c2e05728defb5981b3c7b5085957465f4e93328336
|
7
|
+
data.tar.gz: 12164e9cc1b8202dcb3591b0a02f4cbd12ebb7b5510e775c1070bb94caa868ce9b21fe10dbf760f6ff644bf4f82003f40e7bac0cc86ad30ee185fe08e3d4cd2b
|
data/bin/mkwidget
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
=begin
|
3
|
+
std-widget/
|
4
|
+
std-widget/local-vars.lt3
|
5
|
+
std-widget//list.data
|
6
|
+
std-widget//pieces
|
7
|
+
std-widget//pieces/card-head.lt3
|
8
|
+
std-widget//pieces/card-tail.lt3
|
9
|
+
std-widget//pieces/card.css
|
10
|
+
std-widget//pieces/main-head.lt3
|
11
|
+
std-widget//pieces/main-tail.lt3
|
12
|
+
std-widget//pieces/main.css
|
13
|
+
std-widget//README
|
14
|
+
std-widget//WIDGET.lt3
|
15
|
+
std-widget//WIDGET.rb
|
16
|
+
=end
|
17
|
+
|
18
|
+
# FIXME Also fix the
|
19
|
+
|
20
|
+
def write_local_vars
|
21
|
+
File.open("std_widget/local-vars.lt3", "w") do |f|
|
22
|
+
f.puts <<~LIVE
|
23
|
+
# #@app: #@title
|
24
|
+
.set widget.name = "#@title"
|
25
|
+
|
26
|
+
. heredocs (in case of embedded commas)
|
27
|
+
|
28
|
+
.heredoc card.title
|
29
|
+
$widget.name
|
30
|
+
.end
|
31
|
+
|
32
|
+
.heredoc main.title
|
33
|
+
$widget.name
|
34
|
+
.end
|
35
|
+
LIVE
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def write_card_head
|
40
|
+
File.open("std_widget/pieces/card-head.lt3", "w") do |f|
|
41
|
+
f.puts <<~LIVE
|
42
|
+
.include ../local_vars.lt3
|
43
|
+
. Material (if any) to go before card data
|
44
|
+
<html>
|
45
|
+
<head>
|
46
|
+
<style src="card.css"></style>
|
47
|
+
</head>
|
48
|
+
<body>
|
49
|
+
<h1>#@title</h1>
|
50
|
+
LIVE
|
51
|
+
# </html> damned syntax highlighting
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def write_card_tail
|
56
|
+
File.open("std_widget/pieces/card-tail.lt3", "w") do |f|
|
57
|
+
f.puts <<~LIVE
|
58
|
+
.include ../local_vars.lt3
|
59
|
+
. Material (if any) to go after main data
|
60
|
+
</body>
|
61
|
+
</html>
|
62
|
+
LIVE
|
63
|
+
# </html> damned syntax highlighting
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def write_main_head
|
68
|
+
File.open("std_widget/pieces/main-head.lt3", "w") do |f|
|
69
|
+
f.puts <<~LIVE
|
70
|
+
.include ../local_vars.lt3
|
71
|
+
. Material (if any) to go before main data
|
72
|
+
<html>
|
73
|
+
<head>
|
74
|
+
<style src="main.css"></style>
|
75
|
+
</head>
|
76
|
+
<body>
|
77
|
+
<h1>$card.title</h1>
|
78
|
+
LIVE
|
79
|
+
# </html> damned syntax highlighting
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def write_main_tail
|
84
|
+
File.open("std_widget/pieces/main-tail.lt3", "w") do |f|
|
85
|
+
f.puts <<~LIVE
|
86
|
+
.include ../local_vars.lt3
|
87
|
+
. Material (if any) to go after main data
|
88
|
+
</body>
|
89
|
+
</html>
|
90
|
+
LIVE
|
91
|
+
# </html> damned syntax highlighting
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def write_css
|
96
|
+
# Need .lt3 file?
|
97
|
+
File.open("std_widget/card.css", "w") do |f|
|
98
|
+
f.puts <<~LIVE
|
99
|
+
# CSS for sidebar card
|
100
|
+
LIVE
|
101
|
+
end
|
102
|
+
File.open("std_widget/main.css", "w") do |f|
|
103
|
+
f.puts <<~LIVE
|
104
|
+
# CSS for main area page
|
105
|
+
LIVE
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def _make_class_name(app)
|
110
|
+
if app =~ /[-_]/
|
111
|
+
words = app.split(/[-_]/)
|
112
|
+
name = words.map(&:capitalize).join
|
113
|
+
else
|
114
|
+
name = app.capitalize
|
115
|
+
end
|
116
|
+
return name
|
117
|
+
end
|
118
|
+
|
119
|
+
def write_widget_ruby
|
120
|
+
File.open("std_widget/#@app.rb", "w") do |f|
|
121
|
+
f.puts <<~LIVE
|
122
|
+
# Custom code for '#@app' widget
|
123
|
+
|
124
|
+
class ::RuneBlog::Widget
|
125
|
+
class #{_make_class_name(@app)}
|
126
|
+
def self.build
|
127
|
+
end
|
128
|
+
|
129
|
+
def self.edit_menu
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.refresh
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
LIVE
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def write_widget_livetext
|
141
|
+
File.open("std_widget/#@app.lt3", "w") do |f|
|
142
|
+
f.puts <<~LIVE
|
143
|
+
.mixin liveblog
|
144
|
+
.make_main_links #@app #@title
|
145
|
+
LIVE
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def write_custom_ruby
|
150
|
+
File.open("std_widget/custom.rb", "w") do |f|
|
151
|
+
f.puts <<~LIVE
|
152
|
+
# This is for specialized livetext add-ons (Ruby methods)
|
153
|
+
LIVE
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def write_README
|
158
|
+
File.open("std_widget/README", "w") do |f|
|
159
|
+
f.puts <<~LIVE
|
160
|
+
This is for a "standard" Runeblog widget
|
161
|
+
Code and docs are a work in progress
|
162
|
+
LIVE
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def safe_copy(src)
|
167
|
+
dst = src.sub(/std_widget/, "empty_view/themes/standard/widgets/#@app")
|
168
|
+
if File.exist?(dst)
|
169
|
+
puts "Skip: #{src}"
|
170
|
+
return
|
171
|
+
else
|
172
|
+
puts "Copying: #{src}"
|
173
|
+
system("cp #{src} #{dst}")
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def copy_over
|
178
|
+
here, there = "std_widget", "empty_view/themes/standard/widgets/#@app"
|
179
|
+
slist = Dir["#{here}/*"].reject {|x| File.directory?(x) }
|
180
|
+
slist.each {|src| safe_copy(src) }
|
181
|
+
|
182
|
+
here, there = "std_widget/pieces", "empty_view/themes/standard/widgets/#@app/pieces"
|
183
|
+
system("mkdir #{there}") unless Dir.exist?(there)
|
184
|
+
slist = Dir["#{here}/*"]
|
185
|
+
slist.each {|src| safe_copy(src) }
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
### "Main"
|
190
|
+
|
191
|
+
abort 'Need app, "title..."' if ARGV.empty?
|
192
|
+
@app, @title = *ARGV
|
193
|
+
|
194
|
+
system("rm -rf std_widget")
|
195
|
+
system("mkdir -p std_widget/pieces")
|
196
|
+
|
197
|
+
write_local_vars
|
198
|
+
write_main_head
|
199
|
+
write_main_tail
|
200
|
+
write_card_head
|
201
|
+
write_card_tail
|
202
|
+
write_css
|
203
|
+
|
204
|
+
write_widget_ruby
|
205
|
+
write_widget_livetext
|
206
|
+
write_custom_ruby
|
207
|
+
write_README
|
208
|
+
|
209
|
+
copy_over
|
@@ -2,7 +2,7 @@
|
|
2
2
|
. This file will usually not be edited by the user.
|
3
3
|
. It is used to generate the top-level index.html
|
4
4
|
. The user will more often edit blog/index.lt3 in
|
5
|
-
. the process of blog setup.
|
5
|
+
. the process of blog setup.
|
6
6
|
. --------------------------------------------------
|
7
7
|
|
8
8
|
.mixin liveblog
|
@@ -15,17 +15,17 @@
|
|
15
15
|
<body>
|
16
16
|
|
17
17
|
. FIXME
|
18
|
-
<table width=100%>
|
19
|
-
<tr>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
</tr>
|
28
|
-
</table>
|
18
|
+
<table width=100%>
|
19
|
+
<tr>
|
20
|
+
<td width=30% bgcolor=black>
|
21
|
+
<div style="text-align: center; color: white">
|
22
|
+
<h1>Around Austin</h1><br>
|
23
|
+
The view from downtown...
|
24
|
+
</div>
|
25
|
+
</td>
|
26
|
+
<td><img src=assets/sky2.jpg width=100%></img>
|
27
|
+
</tr>
|
28
|
+
</table>
|
29
29
|
|
30
30
|
$.include navbar/navbar.lt3
|
31
31
|
<div class="content container-fluid mt-4">
|
@@ -20,6 +20,10 @@ description $teaser
|
|
20
20
|
|
21
21
|
<section class="post">
|
22
22
|
<div class="entry-content">
|
23
|
+
<table border=0 width=100%><tr>
|
24
|
+
<td align=left valign=bottom><h2 class="post-title">$title</h2></td>
|
25
|
+
<td align=right valign=top><font size=-5><br></font>$longdate</td>
|
26
|
+
</tr></table><hr>
|
23
27
|
$.copy guts.html
|
24
28
|
</div>
|
25
29
|
</section>
|
@@ -0,0 +1 @@
|
|
1
|
+
# CSS for sidebar card
|
@@ -0,0 +1 @@
|
|
1
|
+
# This is for specialized livetext add-ons (Ruby methods)
|
@@ -0,0 +1 @@
|
|
1
|
+
# CSS for sidebar card
|
@@ -0,0 +1 @@
|
|
1
|
+
# This is for specialized livetext add-ons (Ruby methods)
|
@@ -1,2 +1,2 @@
|
|
1
1
|
.mixin liveblog
|
2
|
-
.make_main_links links Links
|
2
|
+
.make_main_links links External Links
|