runeblog 0.2.94 → 0.2.95
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blog +1 -1
- data/{lib → empty_view/config}/exper/2svg.lt3 +0 -0
- data/{lib → empty_view/config}/exper/gen_svg.rb +0 -0
- data/empty_view/config/exper/meta.html +10 -0
- data/{lib → empty_view/config}/exper/s2.html +0 -0
- data/{lib → empty_view/config}/exper/varmint.rb +0 -0
- data/empty_view/config/facebook/facebook.rb +37 -0
- data/empty_view/config/facebook/fb.html +10 -0
- data/empty_view/config/facebook/fb.js +13 -0
- data/empty_view/config/reddit/config.txt +6 -0
- data/empty_view/config/reddit/notes.txt +4 -0
- data/empty_view/config/reddit/reddit_post_url.py +34 -0
- data/empty_view/config/reddit/redpost.rb +43 -0
- data/empty_view/config/reddit/the-graffiti-wall.html +91 -0
- data/empty_view/config/twitter/tw.html +12 -0
- data/empty_view/config/twitter/tw.js +5 -0
- data/{lib/exper/fbtw.rb → empty_view/config/twitter/twitter.rb} +1 -23
- data/empty_view/themes/standard/post/generate.lt3 +1 -1
- data/lib/helpers-blog.rb +10 -5
- data/lib/liveblog.rb +41 -5
- data/lib/repl.rb +20 -1
- data/lib/runeblog.rb +9 -12
- data/lib/runeblog_version.rb +1 -1
- metadata +18 -9
- data/lib/exper/callout.js +0 -10
- data/lib/exper/fbtw-js +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8c06b3d51a33a85b3420099bf6f6c40e3ac38bdc80b2c2ea5a77de81936f280
|
4
|
+
data.tar.gz: a28b089f368d4941418ace35fba818f13d7458362863002ab25d9ebefdfae706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffd6c82a51c01169b5a045d3f8c2a4f3f2db2230458c8cc4e7eff2740a0d3a0cf424a198a3187a888dd92b3c4976dd41597bae012514b3829c4921ad8750ef04
|
7
|
+
data.tar.gz: b47ac4fd2c6733a5433cf83d6c11c71f8b41bd71681826fadc9f4f98f57338fccc45491babbac7389f51cdd2927b04dee07f85aecfe68c8c75af0807ad03bd67
|
data/bin/blog
CHANGED
@@ -39,7 +39,7 @@ end
|
|
39
39
|
|
40
40
|
def get_global
|
41
41
|
if yesno("Faster view setup? (no: edit global.lt3)")
|
42
|
-
view_name = ask("\nFilename: ")
|
42
|
+
view_name = ask!("\nFilename: ")
|
43
43
|
@blog.create_view(view_name) # call change_view??
|
44
44
|
title = ask!("View title: ")
|
45
45
|
subtitle = ask!("Subtitle : ")
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
<!-- meta tags: separate out? -->
|
3
|
+
|
4
|
+
<!-- meta property='fb:admins' content='767352779' /> -->
|
5
|
+
<meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
|
6
|
+
<meta property='og:type' content='article'/>
|
7
|
+
<meta property='og:title' content='#{title}'/>
|
8
|
+
<meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
|
9
|
+
<meta property='og:description' content='#{teaser}'/>
|
10
|
+
|
File without changes
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class Livetext::Functions
|
2
|
+
|
3
|
+
def facebook_init
|
4
|
+
fb_appid = _var("facebook.appid")
|
5
|
+
<<~HTML
|
6
|
+
window.fbAsyncInit = function() {
|
7
|
+
FB.init({
|
8
|
+
appId : '#{fb_appid}',
|
9
|
+
xfbml : true,
|
10
|
+
version : 'v2.4'
|
11
|
+
});
|
12
|
+
};
|
13
|
+
HTML
|
14
|
+
end
|
15
|
+
|
16
|
+
=begin
|
17
|
+
<!-- Needed: btw what is 'content'?
|
18
|
+
<meta property='fb:admins' content='767352779'/>
|
19
|
+
<meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
|
20
|
+
<meta property='og:type' content='article'/>
|
21
|
+
<meta property='og:title' content='#{title}'/>
|
22
|
+
<meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
|
23
|
+
<meta property='og:description' content='#{teaser}'/>
|
24
|
+
-->
|
25
|
+
=end
|
26
|
+
|
27
|
+
def facebook_likes
|
28
|
+
<<~HTML
|
29
|
+
<div class='fb-like'
|
30
|
+
data-share='true'
|
31
|
+
data-width='450'
|
32
|
+
data-show-faces='true'>
|
33
|
+
</div>
|
34
|
+
HTML
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
import re
|
3
|
+
import praw
|
4
|
+
|
5
|
+
f = open("reddit/config.txt", "r")
|
6
|
+
lines = f.readlines()
|
7
|
+
f.close()
|
8
|
+
|
9
|
+
dict = {}
|
10
|
+
for line in lines:
|
11
|
+
data = re.split(" +", line)
|
12
|
+
dict[data[0]] = data[1].rstrip()
|
13
|
+
|
14
|
+
|
15
|
+
reddit = praw.Reddit(user_agent = dict['user_agent'],
|
16
|
+
client_id = dict['client_id'],
|
17
|
+
client_secret = dict['client_secret'],
|
18
|
+
username = dict['username'],
|
19
|
+
password = dict['password'])
|
20
|
+
|
21
|
+
file = open("/tmp/reddit-post-url.txt", "r") # gaahhh
|
22
|
+
lines = file.readlines()
|
23
|
+
title = lines[0].rstrip()
|
24
|
+
url = lines[1].rstrip()
|
25
|
+
|
26
|
+
subred = reddit.subreddit(dict['subreddit'])
|
27
|
+
rid = subred.submit(title = title, url = url)
|
28
|
+
|
29
|
+
print(rid)
|
30
|
+
|
31
|
+
# submission = reddit.submission(id='edmcwf')
|
32
|
+
# print(submission.title)
|
33
|
+
# print(submission.url)
|
34
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
app_name = "raido1"
|
2
|
+
app_client = "rAyZILgqGB7uHQ"
|
3
|
+
secret = "0CqLXyFu6ABb1MrErWRsB7Bo-i8"
|
4
|
+
|
5
|
+
https://www.reddit.com/api/v1/authorize?client_id=rAyZILgqGB7uHQ&response_type=code&state=abc237def&redirect_uri=http%3A%2F%2Frubyhacker.com&duration=permanent&scope=identity%20edit%20flair%20history%20modconfig%20modflair%20modlog%20modposts%20modwiki%20mysubreddits%20privatemessages%20read%20report%20save%20submit%20subscribe%20vote%20wikiedit%20wikiread
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
require 'net/http'
|
10
|
+
require 'uri'
|
11
|
+
require 'json'
|
12
|
+
|
13
|
+
|
14
|
+
=begin
|
15
|
+
get_token = URI.parse("https://www.reddit.com/api/v1/access_token")
|
16
|
+
data = {
|
17
|
+
grant_type: authorization_code
|
18
|
+
code=CODE
|
19
|
+
redirect_uri=URI
|
20
|
+
}
|
21
|
+
=end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
uri = URI.parse("http://reddit.com/api/submit")
|
26
|
+
|
27
|
+
header = {'Content-Type': 'text/json'}
|
28
|
+
data = {
|
29
|
+
sr: "RubyElixirEtc",
|
30
|
+
kind: "link",
|
31
|
+
title: "[Post] This is my title",
|
32
|
+
url: "http://rubyhacker.com/around_austin/permalink/the-graffiti-wall.html"
|
33
|
+
}
|
34
|
+
|
35
|
+
# Create the HTTP objects
|
36
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
37
|
+
request = Net::HTTP::Post.new(uri.request_uri, header)
|
38
|
+
request.body = user.to_json
|
39
|
+
|
40
|
+
# Send the request
|
41
|
+
response = http.request(request)
|
42
|
+
|
43
|
+
|
@@ -0,0 +1,91 @@
|
|
1
|
+
|
2
|
+
<html>
|
3
|
+
<!-- Generated from /Users/Hal/Dropbox/files/runeblog/.blogs/views/around_austin/themes/standard/global.lt3 on 2019-12-19; editing not recommended. -->
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
<meta charset="utf-8">
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
10
|
+
<title>
|
11
|
+
Around Austin | The view from downtown...
|
12
|
+
</title>
|
13
|
+
<meta name="generator" content="Runeblog v 0.2.91">
|
14
|
+
<meta property="og:title" content="The graffiti wall ">
|
15
|
+
<meta property="og:locale" content="en_US">
|
16
|
+
<meta property="description" content="RIP, Hope Gallery">
|
17
|
+
<meta property="og:description" content="The view from downtown...">
|
18
|
+
<link rel="canonical" href="http://SITE">
|
19
|
+
<meta property="og:url" content="http://SITE">
|
20
|
+
<meta property="og:site_name" content="Around Austin">
|
21
|
+
<link type="application/atom+xml" rel="alternate" href="http://SITE/feed.xml" title="Around Austin">
|
22
|
+
<link rel="shortcut icon" type="image/x-icon" href="etc/favicon.ico">
|
23
|
+
<link rel="apple-touch-icon" href="etc/favicon.ico">
|
24
|
+
<link rel="stylesheet" href="etc/blog.css">
|
25
|
+
<body>
|
26
|
+
|
27
|
+
<section class="post">
|
28
|
+
<div class="entry-content">
|
29
|
+
<table border=0 width=100%><tr>
|
30
|
+
<td align=left valign=bottom><h2 class="post-title">The graffiti wall</h2></td>
|
31
|
+
<td align=right valign=top><font size=-5><br></font>December 2, 2019</td>
|
32
|
+
</tr></table><hr>
|
33
|
+
<!-- Post number 3 -->
|
34
|
+
|
35
|
+
|
36
|
+
RIP, Hope Gallery
|
37
|
+
|
38
|
+
|
39
|
+
<div class='mydrop'>I</div>
|
40
|
+
<div style="padding-top: 1px">t's been a while since I was there. They say it was torn down
|
41
|
+
while I wasn't looking. Never tagged anything there, of course, nor
|
42
|
+
anywhere else. Spraypainting public places isn't my thing, but in this
|
43
|
+
case I condoned it because it was sort of there for that purpose.
|
44
|
+
|
45
|
+
<p>
|
46
|
+
This fake entry is a long one so as to demonstrate both drop-caps
|
47
|
+
(above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
|
48
|
+
a partridge in a pear tree.
|
49
|
+
|
50
|
+
<p>
|
51
|
+
</p>
|
52
|
+
Wherever you go, there you are. Last night I saw upon the stair
|
53
|
+
a little man who was not there. He wasn't there again today; I
|
54
|
+
wish, I wish he'd go away. As far as we know, our computer has
|
55
|
+
<div style='float:left; width: 20%; padding:8px; padding-right:12px'><b><i> On a clean disk, you can seek forever.</i></b></div>
|
56
|
+
never had an undetected error.
|
57
|
+
On a clean disk, you can seek forever.
|
58
|
+
And never let it be denied that
|
59
|
+
pobbles are happier without their toes. And may your snark never
|
60
|
+
be a boojum. How do you know you aren't dreaming right now? When
|
61
|
+
you see a butterfly, think of Chuang Tzu.
|
62
|
+
<p>
|
63
|
+
Contact light. Houston, this is Tranquility Base. The Eagle has
|
64
|
+
landed. That's one small step for (a) man, one giant leap for
|
65
|
+
mankind.
|
66
|
+
|
67
|
+
<p>
|
68
|
+
Here's the PDF of <a style='text-decoration: none' href='http://rubyhacker.com/blog2/rubydino.pdf'>"Ruby for the Old-Time C Programmer"</a>
|
69
|
+
|
70
|
+
<p>
|
71
|
+
Pity this busy monster, manunkind, not. Pity rather... Listen:
|
72
|
+
There's a hell of a universe next door; let's go.
|
73
|
+
|
74
|
+
<p>
|
75
|
+
</div>
|
76
|
+
</section>
|
77
|
+
|
78
|
+
<br>
|
79
|
+
<!-- <script src='https://redditjs.com/subreddit.js' data-subreddit='RubyElixirEtc' data-width=600></script> -->
|
80
|
+
<!-- https://www.reddit.com/r/RubyElixirEtc/comments/ed48ra/post_this_is_only_a_test/ -->
|
81
|
+
|
82
|
+
<hr>
|
83
|
+
<table width=100%><tr>
|
84
|
+
<td width=10%><a style="text-decoration: none" href="javascript:history.go(-1)">[Back]</a></td>
|
85
|
+
<td width=10%><a style="text-decoration: none" href="http://SITE/VIEW_NAME/permalink/the-graffiti-wall.html"> [permalink] </a></td>
|
86
|
+
<td width=80% align=right><font size=-3></font></td></tr></table>
|
87
|
+
<hr>
|
88
|
+
<script src='https://redditjs.com/post.js' data-url="ed48ra" data-width=800 ></script>
|
89
|
+
|
90
|
+
</body>
|
91
|
+
</html>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
<!-- Twitter: share, follow -->
|
3
|
+
|
4
|
+
<a href='https://twitter.com/share'
|
5
|
+
class='twitter-share-button'
|
6
|
+
data-text='#{title}'
|
7
|
+
data-url='#{'url'}'
|
8
|
+
data-via='hal_fulton'
|
9
|
+
data-related='hal_fulton'>Tweet</a>
|
10
|
+
|
11
|
+
<a href='https://twitter.com/hal_fulton' class='twitter-follow-button' data-show-count='false'>Follow @hal_fulton</a>
|
12
|
+
|
@@ -1,18 +1,6 @@
|
|
1
|
-
|
2
1
|
class Livetext::Functions
|
3
2
|
|
4
|
-
|
5
|
-
fb_appid = _var("facebook.appid")
|
6
|
-
<<~HTML
|
7
|
-
window.fbAsyncInit = function() {
|
8
|
-
FB.init({
|
9
|
-
appId : '#{fb_appid}',
|
10
|
-
xfbml : true,
|
11
|
-
version : 'v2.4'
|
12
|
-
});
|
13
|
-
};
|
14
|
-
HTML
|
15
|
-
end
|
3
|
+
# Needed for Twitter??
|
16
4
|
|
17
5
|
=begin
|
18
6
|
<!-- Needed: btw what is 'content'?
|
@@ -25,16 +13,6 @@ class Livetext::Functions
|
|
25
13
|
-->
|
26
14
|
=end
|
27
15
|
|
28
|
-
def facebook_likes
|
29
|
-
<<~HTML
|
30
|
-
<div class='fb-like'
|
31
|
-
data-share='true'
|
32
|
-
data-width='450'
|
33
|
-
data-show-faces='true'>
|
34
|
-
</div>
|
35
|
-
HTML
|
36
|
-
end
|
37
|
-
|
38
16
|
def twitter_share
|
39
17
|
name, title, url = "", "", "" # FIXME
|
40
18
|
<<~HTML
|
data/lib/helpers-blog.rb
CHANGED
@@ -26,11 +26,16 @@ module RuneBlog::Helpers
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def copy_data(tag, dest)
|
29
|
-
data
|
29
|
+
data = RuneBlog::Path + "/../data" # files kept inside gem
|
30
|
+
extra = RuneBlog::Path + "/../config" # files kept inside gem
|
31
|
+
# FIXME names are confusing
|
30
32
|
case tag
|
31
|
-
when :config
|
33
|
+
when :config
|
34
|
+
files = %w[ROOT VIEW EDITOR universal.lt3 global.lt3]
|
35
|
+
files.each {|file| copy(data + "/" + file, dest) }
|
36
|
+
when :extra
|
37
|
+
copy!(extra, dest)
|
32
38
|
end
|
33
|
-
files.each {|file| copy(data + "/" + file, dest) }
|
34
39
|
end
|
35
40
|
|
36
41
|
def read_vars(file)
|
@@ -117,9 +122,9 @@ module RuneBlog::Helpers
|
|
117
122
|
|
118
123
|
def new_sequence
|
119
124
|
log!(enter: __method__, level: 3)
|
120
|
-
dump(0, "sequence")
|
125
|
+
dump(0, "data/sequence")
|
121
126
|
version_info = "#{RuneBlog::VERSION}\nBlog created: #{Time.now.to_s}"
|
122
|
-
dump(version_info, "VERSION")
|
127
|
+
dump(version_info, "data/VERSION")
|
123
128
|
end
|
124
129
|
|
125
130
|
def subdirs(dir)
|
data/lib/liveblog.rb
CHANGED
@@ -45,23 +45,59 @@ def post
|
|
45
45
|
_out " <!-- Post number #{@meta.num} -->\n "
|
46
46
|
end
|
47
47
|
|
48
|
+
def _got_python?
|
49
|
+
# Dumb - fix later - check up front as needed
|
50
|
+
# Should also check for praw lib
|
51
|
+
str = `which python3`
|
52
|
+
str.length > 0
|
53
|
+
end
|
54
|
+
|
55
|
+
def _reddit_post_url(vdir, title, url)
|
56
|
+
_got_python?
|
57
|
+
tmpfile = "/tmp/reddit-post-url.txt"
|
58
|
+
File.open(tmpfile, "w") do |tmp|
|
59
|
+
tmp.puts "[Post] " + title
|
60
|
+
tmp.puts url
|
61
|
+
end
|
62
|
+
rid = nil
|
63
|
+
Dir.chdir(vdir/:config) { rid = `python3 reddit/reddit_post_url.py` }
|
64
|
+
system("rm #{tmpfile}")
|
65
|
+
rid # returns reddit id
|
66
|
+
end
|
67
|
+
|
48
68
|
def post_trailer
|
49
69
|
perma = _var("publish.proto") + "://" + _var("publish.server") +
|
50
70
|
"/" + _var("publish.path") + "/" + _var("post.aslug") +
|
51
71
|
".html"
|
52
72
|
tags = _var("post.tags")
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
73
|
+
taglist = tags.empty? ? "" : "Tags: #{tags}"
|
74
|
+
|
75
|
+
reddit_enabled = false # FIXME
|
76
|
+
reddit_txt = ""
|
77
|
+
if reddit_enabled
|
78
|
+
vdir = @blog.root/:views/@blog.view
|
79
|
+
nslug = "#{_var("post.num")}-#{_var("post.aslug")}"
|
80
|
+
rid_file = vdir/:posts/nslug/"reddit.id"
|
81
|
+
rid = File.exist?(rid_file) ? File.read(rid_file).chomp : nil
|
82
|
+
if rid.nil?
|
83
|
+
title = _var("title")
|
84
|
+
rid = _reddit_post_url(vdir, title, perma)
|
85
|
+
dump(rid, rid_file)
|
86
|
+
end
|
87
|
+
reddit_txt = <<~HTML
|
88
|
+
<hr>
|
89
|
+
<script src='https://redditjs.com/post.js'
|
90
|
+
data-url="#{rid}" data-width=800 ></script>
|
91
|
+
HTML
|
92
|
+
# damned syntax highlighting </>
|
57
93
|
end
|
58
94
|
_out <<~HTML
|
59
95
|
<table width=100%><tr>
|
60
96
|
<td width=10%><a style="text-decoration: none" href="javascript:history.go(-1)">[Back]</a></td>
|
61
97
|
<td width=10%><a style="text-decoration: none" href="#{perma}"> [permalink] </a></td>
|
62
98
|
<td width=80% align=right><font size=-3>#{taglist}</font></td></tr></table>
|
99
|
+
#{reddit_txt}
|
63
100
|
HTML
|
64
|
-
# damned syntax highlighting
|
65
101
|
end
|
66
102
|
|
67
103
|
def faq
|
data/lib/repl.rb
CHANGED
@@ -214,12 +214,31 @@ module RuneBlog::REPL
|
|
214
214
|
puts "Error: See #{out}"
|
215
215
|
end
|
216
216
|
|
217
|
+
def fresh?(src, dst)
|
218
|
+
return false unless File.exist?(dst)
|
219
|
+
File.mtime(src) <= File.mtime(dst)
|
220
|
+
end
|
221
|
+
|
222
|
+
def regen_posts
|
223
|
+
drafts = @blog.drafts # current view
|
224
|
+
drafts.each do |draft|
|
225
|
+
orig = @blog.root/:drafts/draft
|
226
|
+
html = @blog.root/:posts/draft
|
227
|
+
html.sub!(/.lt3$/, "/guts.html")
|
228
|
+
next if fresh?(orig, html)
|
229
|
+
puts " Regenerating #{draft}"
|
230
|
+
@blog.generate_post(orig) # rebuild post
|
231
|
+
end
|
232
|
+
puts
|
233
|
+
end
|
234
|
+
|
217
235
|
def cmd_rebuild(arg, testing = false)
|
218
236
|
debug "Starting cmd_rebuild..."
|
219
237
|
reset_output
|
220
238
|
puts unless testing
|
221
239
|
@blog.generate_view(@blog.view)
|
222
240
|
@blog.generate_index(@blog.view)
|
241
|
+
regen_posts
|
223
242
|
@out
|
224
243
|
rescue => err
|
225
244
|
out = "/tmp/blog#{rand(100)}.txt"
|
@@ -257,7 +276,7 @@ module RuneBlog::REPL
|
|
257
276
|
def cmd_new_view(arg, testing = false)
|
258
277
|
reset_output
|
259
278
|
if arg.nil?
|
260
|
-
arg = ask("\nFilename: ")
|
279
|
+
arg = ask(fx("\nFilename: ", :bold))
|
261
280
|
puts
|
262
281
|
end
|
263
282
|
@blog.create_view(arg)
|
data/lib/runeblog.rb
CHANGED
@@ -92,10 +92,13 @@ class RuneBlog
|
|
92
92
|
raise BlogRepoAlreadyExists if Dir.exist?(repo_root)
|
93
93
|
create_dirs(repo_root)
|
94
94
|
Dir.chdir(repo_root) do
|
95
|
-
create_dirs(:data, :drafts, :views, :posts)
|
95
|
+
create_dirs(:data, :config, :drafts, :views, :posts)
|
96
96
|
new_sequence
|
97
97
|
end
|
98
|
-
|
98
|
+
unless File.exist?(repo_root/"data/VIEW")
|
99
|
+
copy_data(:config, repo_root/:data)
|
100
|
+
end
|
101
|
+
copy_data(:extra, repo_root/:config)
|
99
102
|
write_repo_config(root: repo_root)
|
100
103
|
@blog = self.new
|
101
104
|
@blog
|
@@ -117,7 +120,6 @@ class RuneBlog
|
|
117
120
|
self.class.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
118
121
|
|
119
122
|
@root = Dir.pwd/root_rel
|
120
|
-
# copy_data(:config, @root/:data) unless File.exist?(@root/"data/VIEW")
|
121
123
|
write_repo_config(root: @root)
|
122
124
|
get_repo_config
|
123
125
|
@views = retrieve_views
|
@@ -191,7 +193,7 @@ class RuneBlog
|
|
191
193
|
dir = @root/:posts/nslug
|
192
194
|
create_dirs(dir)
|
193
195
|
# FIXME dependencies?
|
194
|
-
preprocess cwd: dir, src: @root/:drafts/sourcefile,
|
196
|
+
preprocess cwd: dir, src: @root/:drafts/sourcefile, dst: @root/:posts/sourcefile.sub(/.lt3/, ",html"), # ZZZ
|
195
197
|
mix: "liveblog" # , debug: true
|
196
198
|
_deploy_local(dir)
|
197
199
|
rescue => err
|
@@ -257,13 +259,13 @@ class RuneBlog
|
|
257
259
|
|
258
260
|
def get_sequence
|
259
261
|
log!(enter: __method__, level: 3)
|
260
|
-
File.read(@root
|
262
|
+
File.read(@root/"data/sequence").to_i
|
261
263
|
end
|
262
264
|
|
263
265
|
def next_sequence
|
264
266
|
log!(enter: __method__, level: 3)
|
265
267
|
@sequence += 1
|
266
|
-
dump(@sequence, @root
|
268
|
+
dump(@sequence, @root/"data/sequence")
|
267
269
|
@sequence
|
268
270
|
end
|
269
271
|
|
@@ -626,17 +628,12 @@ class RuneBlog
|
|
626
628
|
preprocess cwd: @theme/:post, src: "generate.lt3", force: true,
|
627
629
|
dst: remote/ahtml, copy: @theme/:post,
|
628
630
|
call: ".nopara" # , debug: true
|
629
|
-
# copy(remote/ahtml, remote/permalink/ahtml)
|
630
|
-
# FIXME dependencies?
|
631
|
-
# preprocess cwd: @theme/:post, src: "permalink.lt3",
|
632
|
-
# dst: remote/:permalink/ahtml,
|
633
|
-
# mix: "liveblog" # , debug: true
|
634
631
|
copy_widget_html(view_name)
|
635
632
|
rescue => err
|
636
633
|
_tmp_error(err)
|
637
634
|
end
|
638
635
|
|
639
|
-
def generate_post(draft)
|
636
|
+
def generate_post(draft, force = false)
|
640
637
|
log!(enter: __method__, args: [draft], level: 1)
|
641
638
|
views = _get_views(draft)
|
642
639
|
views.each do |view|
|
data/lib/runeblog_version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runeblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.95
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -89,6 +89,22 @@ files:
|
|
89
89
|
- data/universal.lt3
|
90
90
|
- empty_view/assets/austin-pano.jpg
|
91
91
|
- empty_view/assets/sky2.jpg
|
92
|
+
- empty_view/config/exper/2svg.lt3
|
93
|
+
- empty_view/config/exper/gen_svg.rb
|
94
|
+
- empty_view/config/exper/meta.html
|
95
|
+
- empty_view/config/exper/s2.html
|
96
|
+
- empty_view/config/exper/varmint.rb
|
97
|
+
- empty_view/config/facebook/facebook.rb
|
98
|
+
- empty_view/config/facebook/fb.html
|
99
|
+
- empty_view/config/facebook/fb.js
|
100
|
+
- empty_view/config/reddit/config.txt
|
101
|
+
- empty_view/config/reddit/notes.txt
|
102
|
+
- empty_view/config/reddit/reddit_post_url.py
|
103
|
+
- empty_view/config/reddit/redpost.rb
|
104
|
+
- empty_view/config/reddit/the-graffiti-wall.html
|
105
|
+
- empty_view/config/twitter/tw.html
|
106
|
+
- empty_view/config/twitter/tw.js
|
107
|
+
- empty_view/config/twitter/twitter.rb
|
92
108
|
- empty_view/posts/GIT_IS_DUMB
|
93
109
|
- empty_view/remote/assets/GIT_IS_DUMB
|
94
110
|
- empty_view/remote/etc/GIT_IS_DUMB
|
@@ -175,13 +191,6 @@ files:
|
|
175
191
|
- empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3
|
176
192
|
- empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb
|
177
193
|
- lib/Javascript.stuff
|
178
|
-
- lib/exper/2svg.lt3
|
179
|
-
- lib/exper/callout.js
|
180
|
-
- lib/exper/fbtw-js
|
181
|
-
- lib/exper/fbtw.rb
|
182
|
-
- lib/exper/gen_svg.rb
|
183
|
-
- lib/exper/s2.html
|
184
|
-
- lib/exper/varmint.rb
|
185
194
|
- lib/helpers-blog.rb
|
186
195
|
- lib/helpers-repl.rb
|
187
196
|
- lib/liveblog.rb
|
data/lib/exper/callout.js
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
function callout(d, id, src) {
|
2
|
-
var js, fjs = d.getElementsByTagName('script')[0];
|
3
|
-
p=/^http:/.test(d.location)?'http':'https';
|
4
|
-
if (d.getElementById(id)) {return;}
|
5
|
-
js = d.createElement('script');
|
6
|
-
js.id = id;
|
7
|
-
js.src = p + src;
|
8
|
-
fjs.parentNode.insertBefore(js, fjs);
|
9
|
-
}
|
10
|
-
|
data/lib/exper/fbtw-js
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
|
2
|
-
<!-- scripts: FB, twitter -->
|
3
|
-
|
4
|
-
<script>
|
5
|
-
window.fbAsyncInit = function() {
|
6
|
-
FB.init({
|
7
|
-
appId : '1176481582378716',
|
8
|
-
xfbml : true,
|
9
|
-
version : 'v2.4'
|
10
|
-
});
|
11
|
-
};
|
12
|
-
|
13
|
-
callout(document, 'facebook-jssdk',
|
14
|
-
'//connect.facebook.net/en_US/sdk.js');
|
15
|
-
|
16
|
-
callout(document, 'script', 'twitter-wjs',
|
17
|
-
'//platform.twitter.com/widgets.js';
|
18
|
-
</script>
|
19
|
-
|
20
|
-
<!-- meta tags -->
|
21
|
-
|
22
|
-
<!-- meta property='fb:admins' content='767352779' /> -->
|
23
|
-
<meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
|
24
|
-
<meta property='og:type' content='article'/>
|
25
|
-
<meta property='og:title' content='#{title}'/>
|
26
|
-
<meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
|
27
|
-
<meta property='og:description' content='#{teaser}'/>
|
28
|
-
|
29
|
-
<!-- facebook -->
|
30
|
-
|
31
|
-
<div
|
32
|
-
class='fb-like'
|
33
|
-
data-share='true'
|
34
|
-
data-width='450'
|
35
|
-
data-show-faces='true'>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<!-- Twitter: share, follow -->
|
39
|
-
|
40
|
-
<a href='https://twitter.com/share'
|
41
|
-
class='twitter-share-button'
|
42
|
-
data-text='#{title}'
|
43
|
-
data-url='#{'url'}'
|
44
|
-
data-via='hal_fulton'
|
45
|
-
data-related='hal_fulton'>Tweet</a>
|
46
|
-
|
47
|
-
<a href='https://twitter.com/hal_fulton' class='twitter-follow-button' data-show-count='false'>Follow @hal_fulton</a>
|
48
|
-
|