runeblog 0.3.02

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/README.lt3 +279 -0
  3. data/README.md +312 -0
  4. data/bin/blog +200 -0
  5. data/bin/mkwidget +164 -0
  6. data/data/EDITOR +1 -0
  7. data/data/ROOT +1 -0
  8. data/data/VIEW +1 -0
  9. data/data/features.txt +18 -0
  10. data/data/global.lt3 +20 -0
  11. data/data/universal.lt3 +18 -0
  12. data/empty_view/assets/austin-pano.jpg +0 -0
  13. data/empty_view/assets/sky2.jpg +0 -0
  14. data/empty_view/config/exper/2svg.lt3 +38 -0
  15. data/empty_view/config/exper/gen_svg.rb +60 -0
  16. data/empty_view/config/exper/meta.html +10 -0
  17. data/empty_view/config/exper/s2.html +25 -0
  18. data/empty_view/config/exper/varmint.rb +50 -0
  19. data/empty_view/config/facebook/credentials.txt +7 -0
  20. data/empty_view/config/facebook/facebook.rb +42 -0
  21. data/empty_view/config/facebook/fb.html +10 -0
  22. data/empty_view/config/facebook/fb.js.lt3 +15 -0
  23. data/empty_view/config/reddit/credentials.txt +6 -0
  24. data/empty_view/config/reddit/notes.txt +4 -0
  25. data/empty_view/config/reddit/reddit_post_url.py +34 -0
  26. data/empty_view/config/reddit/redpost.rb +43 -0
  27. data/empty_view/config/reddit/the-graffiti-wall.html +91 -0
  28. data/empty_view/config/twitter/credentials.txt +3 -0
  29. data/empty_view/config/twitter/tw.html +12 -0
  30. data/empty_view/config/twitter/tw.js +5 -0
  31. data/empty_view/config/twitter/twitter.rb +35 -0
  32. data/empty_view/posts/GIT_IS_DUMB +1 -0
  33. data/empty_view/remote/assets/GIT_IS_DUMB +1 -0
  34. data/empty_view/remote/banner/navbar/GIT_IS_DUMB +0 -0
  35. data/empty_view/remote/etc/GIT_IS_DUMB +1 -0
  36. data/empty_view/remote/permalink/GIT_IS_DUMB +1 -0
  37. data/empty_view/remote/widgets/ad/GIT_IS_DUMB +2 -0
  38. data/empty_view/remote/widgets/links/GIT_IS_DUMB +2 -0
  39. data/empty_view/remote/widgets/news/GIT_IS_DUMB +2 -0
  40. data/empty_view/remote/widgets/pages/GIT_IS_DUMB +2 -0
  41. data/empty_view/remote/widgets/pinned/GIT_IS_DUMB +2 -0
  42. data/empty_view/settings/features.txt +18 -0
  43. data/empty_view/settings/publish.txt +5 -0
  44. data/empty_view/settings/recent.txt +6 -0
  45. data/empty_view/settings/view.txt +4 -0
  46. data/empty_view/themes/standard/README +59 -0
  47. data/empty_view/themes/standard/banner/banner.lt3 +5 -0
  48. data/empty_view/themes/standard/banner/navbar/about.lt3 +18 -0
  49. data/empty_view/themes/standard/banner/navbar/contact.lt3 +18 -0
  50. data/empty_view/themes/standard/banner/navbar/faq.lt3 +1 -0
  51. data/empty_view/themes/standard/banner/navbar/list.data +3 -0
  52. data/empty_view/themes/standard/banner/top.lt3 +20 -0
  53. data/empty_view/themes/standard/blog/generate.lt3 +21 -0
  54. data/empty_view/themes/standard/blog/head.lt3 +16 -0
  55. data/empty_view/themes/standard/blog/index.lt3 +17 -0
  56. data/empty_view/themes/standard/blog/post_entry.lt3 +21 -0
  57. data/empty_view/themes/standard/etc/blog.css.lt3 +62 -0
  58. data/empty_view/themes/standard/etc/externals.lt3 +24 -0
  59. data/empty_view/themes/standard/etc/favicon.ico +0 -0
  60. data/empty_view/themes/standard/etc/misc.js +20 -0
  61. data/empty_view/themes/standard/post/generate.lt3 +38 -0
  62. data/empty_view/themes/standard/post/head.lt3 +7 -0
  63. data/empty_view/themes/standard/post/index.lt3 +24 -0
  64. data/empty_view/themes/standard/post/permalink.lt3 +32 -0
  65. data/empty_view/themes/standard/widgets/README +4 -0
  66. data/empty_view/themes/standard/widgets/ad/ad.lt3 +22 -0
  67. data/empty_view/themes/standard/widgets/ad/ad1.png +0 -0
  68. data/empty_view/themes/standard/widgets/ad/ad2.png +0 -0
  69. data/empty_view/themes/standard/widgets/ad/ad3.png +0 -0
  70. data/empty_view/themes/standard/widgets/ad/ad4.png +0 -0
  71. data/empty_view/themes/standard/widgets/bydates/README +2 -0
  72. data/empty_view/themes/standard/widgets/bydates/bydates.rb +18 -0
  73. data/empty_view/themes/standard/widgets/bydates/card.css +1 -0
  74. data/empty_view/themes/standard/widgets/bydates/custom.rb +1 -0
  75. data/empty_view/themes/standard/widgets/bydates/main.css +2 -0
  76. data/empty_view/themes/standard/widgets/links/README +2 -0
  77. data/empty_view/themes/standard/widgets/links/card.css +1 -0
  78. data/empty_view/themes/standard/widgets/links/custom.rb +1 -0
  79. data/empty_view/themes/standard/widgets/links/links.rb +90 -0
  80. data/empty_view/themes/standard/widgets/links/list.data +3 -0
  81. data/empty_view/themes/standard/widgets/links/main.css +2 -0
  82. data/empty_view/themes/standard/widgets/news/README +2 -0
  83. data/empty_view/themes/standard/widgets/news/card.css +1 -0
  84. data/empty_view/themes/standard/widgets/news/custom.rb +1 -0
  85. data/empty_view/themes/standard/widgets/news/list.data +4 -0
  86. data/empty_view/themes/standard/widgets/news/main.css +2 -0
  87. data/empty_view/themes/standard/widgets/news/news.rb +88 -0
  88. data/empty_view/themes/standard/widgets/pages/README +2 -0
  89. data/empty_view/themes/standard/widgets/pages/card.css +1 -0
  90. data/empty_view/themes/standard/widgets/pages/custom.rb +1 -0
  91. data/empty_view/themes/standard/widgets/pages/disclaim.lt3 +10 -0
  92. data/empty_view/themes/standard/widgets/pages/faq.lt3 +40 -0
  93. data/empty_view/themes/standard/widgets/pages/like-dislike.lt3 +11 -0
  94. data/empty_view/themes/standard/widgets/pages/list.data +4 -0
  95. data/empty_view/themes/standard/widgets/pages/local.rb +0 -0
  96. data/empty_view/themes/standard/widgets/pages/main.css +2 -0
  97. data/empty_view/themes/standard/widgets/pages/other-stuff.lt3 +10 -0
  98. data/empty_view/themes/standard/widgets/pages/pages.rb +95 -0
  99. data/empty_view/themes/standard/widgets/pinned/README +2 -0
  100. data/empty_view/themes/standard/widgets/pinned/card.css +1 -0
  101. data/empty_view/themes/standard/widgets/pinned/custom.rb +1 -0
  102. data/empty_view/themes/standard/widgets/pinned/main.css +2 -0
  103. data/empty_view/themes/standard/widgets/pinned/pinned.rb +99 -0
  104. data/empty_view/themes/standard/widgets/search/README +2 -0
  105. data/empty_view/themes/standard/widgets/search/card.css +1 -0
  106. data/empty_view/themes/standard/widgets/search/custom.rb +1 -0
  107. data/empty_view/themes/standard/widgets/search/main.css +2 -0
  108. data/empty_view/themes/standard/widgets/search/search.rb +18 -0
  109. data/empty_view/themes/standard/widgets/sitemap/README +2 -0
  110. data/empty_view/themes/standard/widgets/sitemap/card.css +1 -0
  111. data/empty_view/themes/standard/widgets/sitemap/custom.rb +1 -0
  112. data/empty_view/themes/standard/widgets/sitemap/main.css +2 -0
  113. data/empty_view/themes/standard/widgets/sitemap/sitemap.rb +18 -0
  114. data/empty_view/themes/standard/widgets/tag-cloud/OLD-example.lt3 +12 -0
  115. data/empty_view/themes/standard/widgets/tag-cloud/README +2 -0
  116. data/empty_view/themes/standard/widgets/tag-cloud/card.css +1 -0
  117. data/empty_view/themes/standard/widgets/tag-cloud/custom.rb +1 -0
  118. data/empty_view/themes/standard/widgets/tag-cloud/main.css +2 -0
  119. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +3 -0
  120. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb +18 -0
  121. data/lib/Javascript.stuff +69 -0
  122. data/lib/helpers-blog.rb +155 -0
  123. data/lib/helpers-repl.rb +201 -0
  124. data/lib/liveblog.rb +825 -0
  125. data/lib/logging.rb +44 -0
  126. data/lib/lowlevel.rb +73 -0
  127. data/lib/pathmagic.rb +14 -0
  128. data/lib/post.rb +211 -0
  129. data/lib/processing.rb +60 -0
  130. data/lib/publish.rb +73 -0
  131. data/lib/repl.rb +597 -0
  132. data/lib/runeblog.rb +773 -0
  133. data/lib/runeblog_version.rb +50 -0
  134. data/lib/view.rb +69 -0
  135. data/runeblog.gemspec +42 -0
  136. data/test/austin.rb +158 -0
  137. data/test/fakeimage.jpg +0 -0
  138. data/test/general_test.rb +304 -0
  139. data/test/make_blog.rb +196 -0
  140. data/test/test +3 -0
  141. metadata +242 -0
@@ -0,0 +1,60 @@
1
+ width = 550
2
+ title = "My Stuff" # 13 -> 58, 8 -> 13/8 * 58
3
+ sub = "I always wanted a place for it" # 22 -> 24, 31 -> 15
4
+
5
+ tlen, slen = title.length, sub.length
6
+ tfont = 58
7
+ sfont = 18
8
+
9
+ =begin
10
+ .svg_titles
11
+ title style: bold size: 20px face: sans-serif color: white
12
+ title2 italic 10px sans-serif
13
+ width 550
14
+ height 90
15
+ bgcolor blue
16
+ title_xy 82 55 left
17
+ title2_xy 210 80
18
+ .end
19
+ =end
20
+
21
+ puts <<-EOS
22
+ .nopara
23
+ .variables
24
+ blog #{title}
25
+ blog.desc #{sub}
26
+
27
+ viewbox.wide 550
28
+ viewbox.high 90
29
+
30
+ rect.wide 550
31
+ rect.high 90
32
+ rect.fill blue
33
+
34
+ title.font bold #{tfont}px sans-serif
35
+ title.fill white
36
+ title.xoff 82
37
+ title.yoff 55
38
+
39
+ subtitle.font italic #{sfont}px sans-serif
40
+ subtitle.fill lightblue
41
+ subtitle.xoff 210
42
+ subtitle.yoff 80
43
+ .end
44
+
45
+ <svg width=$viewbox.wide height=$viewbox.high
46
+ viewBox="0 0 $viewbox.wide $viewbox.high"
47
+ xmlns="http://www.w3.org/2000/svg">
48
+ <style>
49
+ .subtitle { font: $subtitle.font; fill: $subtitle.fill }
50
+ .title { font: $title.font; fill: $title.fill }
51
+ </style>
52
+
53
+ <rect x="0" y="0" rx="10" ry="10" width="$rect.wide" height="$rect.high" fill="$rect.fill"/>
54
+
55
+ <text x=$title.xoff y=$title.yoff class=title>$blog</text>
56
+ <text x=$subtitle.xoff y=$subtitle.yoff class=subtitle>$blog.desc</text>
57
+ </svg>
58
+ <br>
59
+ Here we are
60
+ EOS
@@ -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
+
@@ -0,0 +1,25 @@
1
+ <table>
2
+ <tr>
3
+ <td wudth=300>
4
+ <h1>And here we are...</h1>
5
+ </td>
6
+
7
+ <td>
8
+ <svg width=550 height=90
9
+ viewBox="0 0 550 90"
10
+ xmlns="http://www.w3.org/2000/svg">
11
+ <style>
12
+ .subtitle { font: italic 24px sans-serif; fill: lightblue }
13
+ .title { font: bold 58px sans-serif; fill: white }
14
+ </style>
15
+
16
+ <rect x="0" y="0" rx="10" ry="10" width="550" height="90" fill="blue"/>
17
+
18
+ <text text-anchor="middle" x=280 y=55 class=title>Around Austin</text>
19
+ <text text-anchor="middle" x=280 y=80 class=subtitle>The view from downtown</text>
20
+ </svg>
21
+ </td>
22
+ </tr>
23
+ <table>
24
+ <br>
25
+ Here we are
@@ -0,0 +1,50 @@
1
+ require 'ostruct'
2
+
3
+ class OpenStruct
4
+ def to_s
5
+ "[not a value]"
6
+ end
7
+
8
+ def inspect
9
+ to_s
10
+ end
11
+ end
12
+
13
+ class OpenVar
14
+
15
+ def initialize
16
+ @hash = {}
17
+ @obj = OpenStruct.new
18
+ end
19
+
20
+ def [](var)
21
+ puts "self = #{self.inspect}"
22
+ # @hash[var] = nil
23
+ pieces = var.split(".")
24
+ this = @obj
25
+ pieces.each do |piece|
26
+ puts "piece = #{piece}"
27
+ # this.send(piece.to_s+"=", OpenStruct.new)
28
+ this = this.send(piece)
29
+ puts "this = #{this.inspect}"
30
+ end
31
+ this
32
+ end
33
+
34
+ def method_missing(meth, *args)
35
+ setter = meth.to_s + "="
36
+ meh = @obj.send(setter, OpenStruct.new)
37
+ @obj
38
+ end
39
+
40
+
41
+ end
42
+
43
+ var = OpenVar.new
44
+
45
+ var.foo.bar = 237
46
+
47
+ puts var.foo.inspect
48
+ puts var.foo.bar.inspect
49
+
50
+ puts var["foo.bar"]
@@ -0,0 +1,7 @@
1
+ admins 767352779
2
+ appid 1176481582378716
3
+ version v2.4
4
+ xfbml true
5
+ share true
6
+ width 450
7
+ faces true
@@ -0,0 +1,42 @@
1
+ class Livetext::Functions
2
+
3
+ def facebook_init
4
+ fb_appid = _var("facebook.appid")
5
+ xfbml = _var("facebook.xfbml")
6
+ ver = _var("facebook.version")
7
+ width = _var("facebook.width")
8
+ share = _var("facebook.share")
9
+ faces = _var("facebook.faces")
10
+ <<~HTML
11
+ window.fbAsyncInit = function() {
12
+ FB.init({
13
+ appId : '#{fb_appid}',
14
+ xfbml : #{xfbml},
15
+ version : '#{ver}'
16
+ });
17
+ };
18
+ HTML
19
+ end
20
+
21
+ =begin
22
+ <!-- Needed:
23
+ <meta property='fb:admins' content='$facebook.admins'/>
24
+ <meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
25
+ <meta property='og:type' content='article'/>
26
+ <meta property='og:title' content='#{title}'/>
27
+ <meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
28
+ <meta property='og:description' content='#{teaser}'/>
29
+ -->
30
+ =end
31
+
32
+ def facebook_likes
33
+ <<~HTML
34
+ <div class='fb-like'
35
+ data-share='#{share}'
36
+ data-width='#{width}'
37
+ data-show-faces='#{faces}'>
38
+ </div>
39
+ HTML
40
+ end
41
+
42
+ end
@@ -0,0 +1,10 @@
1
+
2
+ <!-- facebook -->
3
+
4
+ <div
5
+ class='fb-like'
6
+ data-share='true'
7
+ data-width='450'
8
+ data-show-faces='true'>
9
+ </div>
10
+
@@ -0,0 +1,15 @@
1
+ .variables facebook credentials.txt
2
+
3
+ <script>
4
+ window.fbAsyncInit = function() {
5
+ FB.init({
6
+ appId : '$facebook.appid',
7
+ xfbml : $facebook.xfbml,
8
+ version : '$facebook.ver'
9
+ });
10
+ };
11
+
12
+ callout(document, 'facebook-jssdk',
13
+ '//connect.facebook.net/en_US/sdk.js');
14
+ </script>
15
+
@@ -0,0 +1,6 @@
1
+ subreddit RubyElixirEtc
2
+ user_agent RuneBlog comments
3
+ client_id rAyZILgqGB7uHQ
4
+ client_secret 0CqLXyFu6ABb1MrErWRsB7Bo-i8
5
+ username hal_fulton
6
+ password adnar1m1
@@ -0,0 +1,4 @@
1
+ When a post is generated:
2
+ - check for reddit.id under VIEW/posts/nnnn-title/
3
+ - if it doesn't exist, post to reddit
4
+ - create the reddit.id
@@ -0,0 +1,34 @@
1
+
2
+ import re
3
+ import praw
4
+
5
+ f = open("reddit/credentials.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="recent-content">
29
+ <table border=0 width=100%><tr>
30
+ <td align=left valign=bottom><h2 class="recent-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,3 @@
1
+ user hal_fulton # via
2
+ related hal_fulton
3
+ count false
@@ -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
+
@@ -0,0 +1,5 @@
1
+ <script>
2
+ callout(document, 'script', 'twitter-wjs',
3
+ '//platform.twitter.com/widgets.js';
4
+ </script>
5
+
@@ -0,0 +1,35 @@
1
+ class Livetext::Functions
2
+
3
+ # Needed for Twitter??
4
+
5
+ =begin
6
+ <!-- Needed: btw what is 'content'?
7
+ <meta property='fb:admins' content='767352779'/>
8
+ <meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
9
+ <meta property='og:type' content='article'/>
10
+ <meta property='og:title' content='#{title}'/>
11
+ <meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
12
+ <meta property='og:description' content='#{teaser}'/>
13
+ -->
14
+ =end
15
+
16
+ def twitter_share(title, url)
17
+ name = _var("twitter.user")
18
+ <<~HTML
19
+ <a href='https://twitter.com/share'
20
+ class='twitter-share-button'
21
+ data-text='#{title}'
22
+ data-url='#{url}'
23
+ data-via='#{name}'
24
+ data-related='#{name}'>Tweet</a>
25
+ HTML
26
+ end
27
+
28
+ def twitter_follow
29
+ name = _var("twitter.user")
30
+ <<~HTML
31
+ <a href='https://twitter.com/#{name}' class='twitter-follow-button' data-show-count='false'>Follow @#{name}</a>
32
+ HTML
33
+ end
34
+
35
+ end