runeblog 0.2.38 → 0.2.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/bin/mkwidget +209 -0
  3. data/empty_view/themes/standard/blog/index.lt3 +0 -1
  4. data/empty_view/themes/standard/etc/blog.css.lt3 +0 -1
  5. data/empty_view/themes/standard/post/generate.lt3 +9 -4
  6. data/empty_view/themes/standard/widgets/bydates/README +2 -0
  7. data/empty_view/themes/standard/widgets/bydates/bydates.lt3 +2 -0
  8. data/empty_view/themes/standard/widgets/bydates/bydates.rb +14 -0
  9. data/empty_view/themes/standard/widgets/bydates/card.css +1 -0
  10. data/empty_view/themes/standard/widgets/bydates/custom.rb +1 -0
  11. data/empty_view/themes/standard/widgets/bydates/local-vars.lt3 +12 -0
  12. data/empty_view/themes/standard/widgets/bydates/main.css +2 -0
  13. data/empty_view/themes/standard/widgets/bydates/pieces/card-head.lt3 +8 -0
  14. data/empty_view/themes/standard/widgets/bydates/pieces/card-tail.lt3 +4 -0
  15. data/empty_view/themes/standard/widgets/bydates/pieces/main-head.lt3 +10 -0
  16. data/empty_view/themes/standard/widgets/bydates/pieces/main-tail.lt3 +4 -0
  17. data/empty_view/themes/standard/widgets/links/README +2 -0
  18. data/empty_view/themes/standard/widgets/links/card.css +1 -0
  19. data/empty_view/themes/standard/widgets/links/custom.rb +1 -0
  20. data/empty_view/themes/standard/widgets/links/links.lt3 +1 -1
  21. data/empty_view/themes/standard/widgets/links/links.rb +14 -0
  22. data/empty_view/themes/standard/widgets/links/local-vars.lt3 +12 -0
  23. data/empty_view/themes/standard/widgets/links/main.css +2 -0
  24. data/empty_view/themes/standard/widgets/links/pieces/card-head.lt3 +8 -0
  25. data/empty_view/themes/standard/widgets/links/pieces/card-tail.lt3 +4 -0
  26. data/empty_view/themes/standard/widgets/links/pieces/main-head.lt3 +10 -0
  27. data/empty_view/themes/standard/widgets/links/pieces/main-tail.lt3 +4 -0
  28. data/empty_view/themes/standard/widgets/news/README +2 -0
  29. data/empty_view/themes/standard/widgets/news/card.css +1 -0
  30. data/empty_view/themes/standard/widgets/news/custom.rb +1 -0
  31. data/empty_view/themes/standard/widgets/news/local-vars.lt3 +12 -0
  32. data/empty_view/themes/standard/widgets/news/main.css +2 -0
  33. data/empty_view/themes/standard/widgets/news/news.rb +14 -0
  34. data/empty_view/themes/standard/widgets/news/pieces/card-head.lt3 +8 -0
  35. data/empty_view/themes/standard/widgets/news/pieces/card-tail.lt3 +4 -0
  36. data/empty_view/themes/standard/widgets/news/pieces/main-head.lt3 +10 -0
  37. data/empty_view/themes/standard/widgets/news/pieces/main-tail.lt3 +4 -0
  38. data/empty_view/themes/standard/widgets/pages/card.css +1 -0
  39. data/empty_view/themes/standard/widgets/pages/custom.rb +1 -0
  40. data/empty_view/themes/standard/widgets/pages/local-vars.lt3 +12 -0
  41. data/empty_view/themes/standard/widgets/pages/local.rb +0 -8
  42. data/empty_view/themes/standard/widgets/pages/main.css +2 -0
  43. data/empty_view/themes/standard/widgets/pages/pages.rb +21 -0
  44. data/empty_view/themes/standard/widgets/pages/pieces/card-head.lt3 +1 -0
  45. data/empty_view/themes/standard/widgets/pages/pieces/card-tail.lt3 +1 -0
  46. data/empty_view/themes/standard/widgets/pages/pieces/main-head.lt3 +10 -0
  47. data/empty_view/themes/standard/widgets/pages/pieces/main-tail.lt3 +2 -0
  48. data/empty_view/themes/standard/widgets/pinned/README +2 -0
  49. data/empty_view/themes/standard/widgets/pinned/card.css +1 -0
  50. data/empty_view/themes/standard/widgets/pinned/custom.rb +1 -0
  51. data/empty_view/themes/standard/widgets/pinned/local-vars.lt3 +12 -0
  52. data/empty_view/themes/standard/widgets/pinned/main.css +2 -0
  53. data/empty_view/themes/standard/widgets/pinned/pieces/card-head.lt3 +8 -0
  54. data/empty_view/themes/standard/widgets/pinned/pieces/card-tail.lt3 +4 -0
  55. data/empty_view/themes/standard/widgets/pinned/pieces/main-head.lt3 +10 -0
  56. data/empty_view/themes/standard/widgets/pinned/pieces/main-tail.lt3 +4 -0
  57. data/empty_view/themes/standard/widgets/pinned/pinned.lt3 +2 -0
  58. data/empty_view/themes/standard/widgets/pinned/pinned.rb +14 -0
  59. data/empty_view/themes/standard/widgets/search/README +2 -0
  60. data/empty_view/themes/standard/widgets/search/card.css +1 -0
  61. data/empty_view/themes/standard/widgets/search/custom.rb +1 -0
  62. data/empty_view/themes/standard/widgets/search/local-vars.lt3 +12 -0
  63. data/empty_view/themes/standard/widgets/search/main.css +2 -0
  64. data/empty_view/themes/standard/widgets/search/pieces/card-head.lt3 +8 -0
  65. data/empty_view/themes/standard/widgets/search/pieces/card-tail.lt3 +4 -0
  66. data/empty_view/themes/standard/widgets/search/pieces/main-head.lt3 +10 -0
  67. data/empty_view/themes/standard/widgets/search/pieces/main-tail.lt3 +4 -0
  68. data/empty_view/themes/standard/widgets/search/search.lt3 +2 -0
  69. data/empty_view/themes/standard/widgets/search/search.rb +14 -0
  70. data/empty_view/themes/standard/widgets/sitemap/README +2 -0
  71. data/empty_view/themes/standard/widgets/sitemap/card.css +1 -0
  72. data/empty_view/themes/standard/widgets/sitemap/custom.rb +1 -0
  73. data/empty_view/themes/standard/widgets/sitemap/local-vars.lt3 +12 -0
  74. data/empty_view/themes/standard/widgets/sitemap/main.css +2 -0
  75. data/empty_view/themes/standard/widgets/sitemap/pieces/card-head.lt3 +8 -0
  76. data/empty_view/themes/standard/widgets/sitemap/pieces/card-tail.lt3 +4 -0
  77. data/empty_view/themes/standard/widgets/sitemap/pieces/main-head.lt3 +10 -0
  78. data/empty_view/themes/standard/widgets/sitemap/pieces/main-tail.lt3 +4 -0
  79. data/empty_view/themes/standard/widgets/sitemap/sitemap.lt3 +2 -0
  80. data/empty_view/themes/standard/widgets/sitemap/sitemap.rb +14 -0
  81. data/empty_view/themes/standard/widgets/tag-cloud/OLD-example.lt3 +12 -0
  82. data/empty_view/themes/standard/widgets/tag-cloud/README +2 -0
  83. data/empty_view/themes/standard/widgets/tag-cloud/card.css +1 -0
  84. data/empty_view/themes/standard/widgets/tag-cloud/custom.rb +1 -0
  85. data/empty_view/themes/standard/widgets/tag-cloud/local-vars.lt3 +12 -0
  86. data/empty_view/themes/standard/widgets/tag-cloud/main.css +2 -0
  87. data/empty_view/themes/standard/widgets/tag-cloud/pieces/card-head.lt3 +8 -0
  88. data/empty_view/themes/standard/widgets/tag-cloud/pieces/card-tail.lt3 +4 -0
  89. data/empty_view/themes/standard/widgets/tag-cloud/pieces/main-head.lt3 +10 -0
  90. data/empty_view/themes/standard/widgets/tag-cloud/pieces/main-tail.lt3 +4 -0
  91. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.lt3 +1 -10
  92. data/empty_view/themes/standard/widgets/tag-cloud/tag-cloud.rb +14 -0
  93. data/lib/default.rb +0 -3
  94. data/lib/liveblog.rb +75 -10
  95. data/lib/runeblog.rb +37 -10
  96. data/lib/runeblog_version.rb +1 -1
  97. data/lib/xlate.rb +5 -0
  98. data/test/austin.rb +150 -0
  99. data/test/make_blog.rb +23 -2
  100. metadata +88 -4
  101. data/empty_view/remote/widgets/pages/SUBFILES +0 -1
  102. data/empty_view/themes/standard/widgets/calendar/calendar.lt3 +0 -6
@@ -1,12 +1,3 @@
1
1
  .mixin liveblog
2
2
 
3
- .tag_cloud
4
- https://google.com/,btn btn-dark m-1,Programming
5
- https://google.com/,btn btn-danger m-1,Science Fiction
6
- https://google.com/,btn btn-light m-1,Art
7
- https://google.com/,btn btn-dark m-1,Robotics
8
- https://google.com/,btn btn-warning m-1,Food and Travel
9
- https://google.com/,btn btn-light m-1,DIY Hacks
10
- https://google.com/,btn btn-info m-1,Surfing
11
- .end
12
-
3
+ <h3>Currently nothing here -- not implemented</h3)
@@ -0,0 +1,14 @@
1
+ # Custom code for 'tag-cloud' widget
2
+
3
+ class ::RuneBlog::Widget
4
+ class TagCloud
5
+ def self.build
6
+ end
7
+
8
+ def self.edit_menu
9
+ end
10
+
11
+ def self.refresh
12
+ end
13
+ end
14
+ end
@@ -28,6 +28,3 @@ TEXT
28
28
  end
29
29
 
30
30
  end
31
-
32
-
33
-
@@ -33,6 +33,25 @@ def post
33
33
  _out " <!-- Post number #{@meta.num} -->\n "
34
34
  end
35
35
 
36
+ def post_trailer
37
+ perma = _var("publish.proto") + "://" + _var("publish.server") +
38
+ "/" + _var("publish.path") + "/permalink/" + _var("post.aslug") +
39
+ ".html"
40
+ tags = _var("post.tags")
41
+ if tags.empty?
42
+ taglist = ""
43
+ else
44
+ taglist = "Tags: #{tags}"
45
+ end
46
+ _out <<~HTML
47
+ <table width=100%><tr>
48
+ <td width=10%><a style="text-decoration: none" href="javascript:history.go(-1)">[Back]</a></td>
49
+ <td width=10%><a style="text-decoration: none" href="#{perma}"> [permalink] </a></td>
50
+ <td width=80% align=right><font size=-3>#{taglist}</font></td></tr></table>
51
+ HTML
52
+ # damned syntax highlighting
53
+ end
54
+
36
55
  def backlink
37
56
  _out %[<br><a href="javascript:history.go(-1)">[Back]</a>]
38
57
  end
@@ -45,7 +64,7 @@ def dropcap
45
64
  p:first-child:first-letter {
46
65
  color: #0000ff;
47
66
  float: left;
48
- font-family: Georgia;
67
+ font-family: Verdana;
49
68
  font-size: 75px;
50
69
  line-height: 60px;
51
70
  padding-top: 4px;
@@ -142,7 +161,7 @@ def inset
142
161
  end
143
162
  lr = _args.first
144
163
  wide = _args[1] || "25"
145
- _passthru "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px; font-family:verdana'>"
164
+ _passthru "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px'>" # ; font-family:verdana'>"
146
165
  _passthru '<b><i>'
147
166
  _passthru box
148
167
  _passthru_noline '</i></b></div>'
@@ -154,7 +173,8 @@ def title
154
173
  title = @_data.chomp
155
174
  @meta.title = title
156
175
  setvar :title, title
157
- _out %[<h1 class="post-title">#{title}</h1><br>]
176
+ # FIXME refactor -- just output variables for a template
177
+ # _out %[<h1 class="post-title">#{title}</h1><br>]
158
178
  _optional_blank_line
159
179
  end
160
180
 
@@ -285,7 +305,6 @@ def head # Does NOT output tags
285
305
  hash = defaults.dup.update(result) # FIXME collisions?
286
306
 
287
307
  hash.each_value {|x| _out " " + x }
288
- _out "<body>"
289
308
  end
290
309
 
291
310
  ########## newer stuff...
@@ -319,9 +338,22 @@ def recent_posts # side-effect
319
338
  HTML
320
339
  end
321
340
 
322
- def _run_local(widget)
341
+ def _make_class_name(app)
342
+ if app =~ /[-_]/
343
+ words = app.split(/[-_]/)
344
+ name = words.map(&:capitalize).join
345
+ else
346
+ name = app.capitalize
347
+ end
348
+ return name
349
+ end
350
+
351
+ def _load_local(widget)
323
352
  Dir.chdir("widgets/#{widget}") do
324
- require("./local") if File.exist?("local.rb")
353
+ rclass = _make_class_name(widget)
354
+ found = (require("./#{widget}") if File.exist?("#{widget}.rb"))
355
+ code = found ? ::RuneBlog::Widget.class_eval(rclass) : nil
356
+ code
325
357
  end
326
358
  rescue => err
327
359
  STDOUT.puts err
@@ -342,7 +374,8 @@ def sidebar
342
374
  raise "Can't find #{wtag}" unless Dir.exist?(wtag)
343
375
  tcard = "#{tag}-card.html"
344
376
 
345
- _run_local(tag)
377
+ code = _load_local(tag)
378
+ code && Dir.chdir(wtag) { code.build }
346
379
 
347
380
  # if File.exist?(wtag/"SUBFILES")
348
381
  # children = Dir[wtag/"*.lt3"] - [wtag/tag+".lt3"]
@@ -623,12 +656,44 @@ def page_type(tag, title)
623
656
  end
624
657
  end
625
658
 
659
+ def _write_main_pages(mainfile, pairs, card_title, tag)
660
+ local = _local_tag?(tag)
661
+ pieces = @blog.view.dir/"themes/standard/widgets"/tag/:pieces
662
+ main_head = xlate! cwd: pieces, src: "main-head.lt3"
663
+ main_tail = xlate! cwd: pieces, src: "main-tail.lt3"
664
+ # ^ make into methods in pages.rb or whatever?
665
+
666
+ File.open("#{mainfile}.html", "w") do |f|
667
+ f.puts main_head
668
+ pairs.each do |file, title|
669
+ type, title = page_type(tag, title)
670
+ title = title.gsub(/\\/, "") # kludge
671
+ case type
672
+ when :local; url_ref = _widget_main(file, tag) # local always frameable
673
+ when :frame; url_ref = "href = '#{file}'" # local always frameable
674
+ when :noframe; url_ref = _blank(file) # local always frameable
675
+ end
676
+ css = "color: #8888FF; text-decoration: none; font-size: 21px" # ; font-family: verdana"
677
+ f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
678
+ end
679
+ f.puts main_tail
680
+ end
681
+ end
682
+
626
683
  def _write_main(mainfile, pairs, card_title, tag)
627
684
  log!(str: "Creating #{mainfile}.html", pwd: true)
685
+
686
+ if tag == "pages" # temporary experiment
687
+ _write_main_pages(mainfile, pairs, card_title, tag)
688
+ return
689
+ end
690
+
628
691
  local = _local_tag?(tag)
692
+ setvar "card.title", card_title
693
+ css = "* { font-family: verdana }"
629
694
  File.open("#{mainfile}.html", "w") do |f|
630
- _html_body(f) do
631
- f.puts "<h1>#{card_title}</h1>"
695
+ _html_body(f, css) do
696
+ f.puts "<h1>#{card_title}</h1><br><hr>"
632
697
  pairs.each do |file, title|
633
698
  type, title = page_type(tag, title)
634
699
  title = title.gsub(/\\/, "") # kludge
@@ -637,7 +702,7 @@ def _write_main(mainfile, pairs, card_title, tag)
637
702
  when :frame; url_ref = "href = '#{file}'" # local always frameable
638
703
  when :noframe; url_ref = _blank(file) # local always frameable
639
704
  end
640
- css = "color: #8888FF; text-decoration: none; font-size: 24px; font-family: verdana"
705
+ css = "color: #8888FF; text-decoration: none; font-size: 21px" # ; font-family: verdana"
641
706
  f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
642
707
  end
643
708
  end
@@ -289,7 +289,7 @@ class RuneBlog
289
289
  vp
290
290
  end
291
291
 
292
- def teaser(slug)
292
+ def index_entry(slug)
293
293
  log!(enter: __method__, args: [slug])
294
294
  id = slug.to_i
295
295
  text = nil
@@ -303,7 +303,7 @@ class RuneBlog
303
303
  path = vp.path
304
304
  url = aslug + ".html"
305
305
  date = ::Date.parse(date)
306
- date = date.strftime("%B %e<br>%Y")
306
+ date = date.strftime("%B %e<br><div style='float: right'>%Y</div>")
307
307
  text = interpolate(@_post_entry, binding)
308
308
  text
309
309
  end
@@ -328,7 +328,7 @@ class RuneBlog
328
328
  wanted.times do
329
329
  postid = File.basename(enum.next)
330
330
  postid = postid.to_i
331
- text << teaser(postid) # side effect! calls _out
331
+ text << index_entry(postid) # side effect! calls _out
332
332
  end
333
333
  text << "</body></html>"
334
334
  File.write(@vdir/:remote/file, text)
@@ -393,13 +393,15 @@ class RuneBlog
393
393
 
394
394
  def generate_view(view) # huh?
395
395
  log!(enter: __method__, args: [view])
396
- generate_index(view) # recent posts (recent.html)
396
+ # generate_index(view) # recent posts (recent.html)
397
397
  vdir = @root/:views/view
398
398
  @theme = @root/:views/view/:themes/:standard
399
399
  xlate cwd: vdir/"themes/standard/etc",
400
400
  src: "blog.css.lt3", copy: vdir/"remote/etc/blog.css" # , debug: true
401
401
  xlate cwd: vdir/"themes/standard",
402
402
  src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
403
+ generate_index(view) # recent posts (recent.html)
404
+ # ^ HERE
403
405
  copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
404
406
  rescue => err
405
407
  puts err
@@ -434,11 +436,35 @@ class RuneBlog
434
436
 
435
437
  def _post_metadata(draft, pdraft)
436
438
  log!(enter: __method__, args: [draft, pdraft])
439
+ # FIXME store this somewhere
440
+ fname = File.basename(draft) # 0001-this-is-a-post.lt3
441
+ nslug = fname.sub(/.lt3$/, "") # 0001-this-is-a-post
442
+ aslug = nslug.sub(/\d\d\d\d-/, "") # this-is-a-post
443
+ pnum = nslug[0..3] # 0001
437
444
  Dir.chdir(pdraft) do
438
445
  excerpt = File.read("teaser.txt")
446
+ date = _retrieve_metadata(:date)
447
+ longdate = ::Date.parse(date).strftime("%B %e, %Y")
439
448
  title = _retrieve_metadata(:title)
440
- vars = %[.heredoc title\n#{title.chomp}\n.end\n] +
441
- %[.heredoc teaser\n#{excerpt.chomp}\n.end\n]
449
+ tags = _retrieve_metadata(:tags)
450
+ vars = <<~LIVE
451
+ .set post.num = #{pnum}
452
+ .heredoc post.aslug
453
+ #{aslug}
454
+ .end
455
+ .heredoc title
456
+ #{title.chomp}
457
+ .end
458
+ .heredoc post.tags
459
+ #{tags.join(" ")}
460
+ .end
461
+ .heredoc teaser
462
+ #{excerpt.chomp}
463
+ .end
464
+ .heredoc longdate
465
+ #{longdate}
466
+ .end
467
+ LIVE
442
468
  File.open(pdraft/"vars.lt3", "w") {|f| f.puts vars }
443
469
  end
444
470
  end
@@ -454,8 +480,8 @@ class RuneBlog
454
480
  rem = w.sub(/themes.standard/, "remote")
455
481
  create_dirs(rem)
456
482
  files = Dir[w/"*"]
457
- next unless files.any? {|x| x =~ /html$/ }
458
- system!("cp #{w}/*html #{rem}")
483
+ files = files.select {|x| x =~ /(html|css)$/ }
484
+ files.each {|file| system!("cp #{file} #{rem}") }
459
485
  end
460
486
  end
461
487
 
@@ -493,11 +519,12 @@ class RuneBlog
493
519
  views = _get_views(draft)
494
520
  views.each do |view|
495
521
  _handle_post(draft, view)
496
- generate_view(view) # FIXME leads to inefficiency?
522
+ # generate_view(view) # FIXME leads to inefficiency?
523
+ # ^ HERE
497
524
  end
498
525
  end
499
526
 
500
- def index_entry(view, meta)
527
+ def OLD_index_entry(view, meta)
501
528
  log!(enter: __method__, args: [view, meta])
502
529
  debug "=== index_entry #{view.to_s.inspect} #{meta.num} #{meta.title.inspect}"
503
530
  check_meta(meta, "index_entry1")
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.38"
5
+ VERSION = "0.2.43"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -35,3 +35,8 @@ LEXT = ".lt3"
35
35
  end
36
36
  end
37
37
 
38
+ def xlate!(cwd: Dir.pwd, src:, copy: nil, debug: false, force: false)
39
+ output = "/tmp/xlate-#{File.basename(src).sub(/.lt3$/, "")}"
40
+ xlate cwd: cwd, src: src, dst: output, debug: debug, force: force
41
+ File.read(output + ".html") # return all content as string
42
+ end
@@ -0,0 +1,150 @@
1
+ $LOAD_PATH << "./lib"
2
+
3
+ major, minor = RUBY_VERSION.split(".").values_at(0,1)
4
+ ver = major.to_i*10 + minor.to_i
5
+ abort "Need Ruby 2.4 or greater" unless ver >= 24
6
+
7
+ Home = Dir.pwd
8
+
9
+ require 'global'
10
+ require 'runeblog'
11
+ require 'repl'
12
+
13
+ def bold(str)
14
+ "\e[1m#{str}\e[0m"
15
+ end
16
+
17
+ def getch
18
+ # sleep 5
19
+ end
20
+
21
+ def debug(str = "")
22
+ t = Time.now
23
+ time = t.to_f.to_s
24
+ n = time.index(".")
25
+ msec = time[n..(n+2)]
26
+ time = t.strftime("%H:%M:%S") + msec
27
+ STDERR.puts "#{'%-11s' % time} #{str}"
28
+ end
29
+
30
+ def make_post(x, title, teaser, body, views=[])
31
+ debug " make_post #{bold(title)}"
32
+ x.create_new_post(title, true, teaser: teaser, body: body, views: views)
33
+ views.each do |view|
34
+ debug
35
+ debug "** generate_index #{bold(view)}"
36
+ x.generate_index(view)
37
+ end # recent.html
38
+ end
39
+
40
+ def show_lines(text)
41
+ lines = text.split("\n")
42
+ str = "#{lines.size} lines\n"
43
+ lines.each {|line| str << " #{line.inspect}\n" }
44
+ str
45
+ end
46
+
47
+ # "Main"...
48
+
49
+ t0 = Time.now
50
+
51
+ puts bold("\nGenerating test blog...")
52
+
53
+ system("rm -rf .blogs")
54
+ RuneBlog.create_new_blog_repo(".blogs")
55
+ x = RuneBlog.new(".blogs")
56
+
57
+ debug("create_view: #{bold('around_austin')}")
58
+ x.create_view("around_austin") # FIXME remember view title!
59
+
60
+ #### FIXME later!!
61
+ vars = <<-VARS
62
+
63
+ .variables
64
+ blog Around Austin
65
+ blog.desc The view from downtown...
66
+ .end
67
+ VARS
68
+ File.open(".blogs/views/around_austin/themes/standard/global.lt3", "a") do |f|
69
+ f.puts vars
70
+ end
71
+ ####
72
+
73
+ debug("-- change_view: #{bold('around_austin')}")
74
+ x.change_view("around_austin") # 1 2 7 8 9
75
+
76
+ make_post(x, "What's at Stubbs...", <<-EXCERPT, <<-BODY, [])
77
+ Stubbs has been around for longer than civilization.
78
+ EXCERPT
79
+ That's a good thing. But their music isn't always the greatest.
80
+ BODY
81
+
82
+ make_post(x, "The new amphitheatre is overrated", <<-EXCERPT, <<-BODY)
83
+ It used to be that all major concerts played the Erwin Center.
84
+ EXCERPT
85
+ Now, depending on what you consider "major," blah blah blah...
86
+ BODY
87
+
88
+ make_post(x, "The graffiti wall", <<-EXCERPT, <<-BODY)
89
+ RIP, Hope Gallery
90
+ EXCERPT
91
+ .dropcap
92
+
93
+ It's been a while since I was there. They say it was torn down
94
+ while I wasn't looking.
95
+
96
+ This fake entry is a long one so as to demonstrate both drop-caps
97
+ (above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
98
+ a partridge in a pear tree.
99
+
100
+ Wherever you go, there you are. Last night I saw upon the stair
101
+ a little man who was not there. He wasn't there again today; I
102
+ wish, I wish he'd go away.
103
+
104
+ As far as we know, our computer has never had an undetected error.
105
+ And never let it be denied that pobbles are happier without their
106
+ toes. And may your snark never be a boojum.
107
+
108
+ Contact light. Houston, this is Tranquility Base. The Eagle has
109
+ landed. That's one small step for (a) man, one giant leap for
110
+ mankind.
111
+ .inset left 20
112
+ On a clean disk, you can seek forever.
113
+ .end
114
+
115
+ Pity this busy monster, manunkind, not. Pity rather... Listen:
116
+ There's a hell of a universe next door; let's go.
117
+ BODY
118
+
119
+ make_post(x, "The Waller Creek project", <<-EXCERPT, <<-BODY)
120
+ Will it ever be finished?
121
+ EXCERPT
122
+ Blah blah Waller Creek blah blah...
123
+ BODY
124
+
125
+ make_post(x, "Life on Sabine Street", <<-EXCERPT, <<-BODY)
126
+ It's like Pooh Corner, except not.
127
+ EXCERPT
128
+ This is about Sabine St, blah blah lorem ipsum dolor...
129
+ BODY
130
+
131
+ make_post(x, "Remember Modest Mouse?", <<-EXCERPT, <<-BODY, [])
132
+ They date to the 90s or before.
133
+ EXCERPT
134
+ But I first heard of them
135
+ in 2005.
136
+ BODY
137
+
138
+ debug
139
+ debug("** generate_view: #{bold('around_austin')}")
140
+ x.generate_view("around_austin")
141
+ x.change_view("around_austin")
142
+ debug
143
+
144
+ puts bold("...finished.\n")
145
+
146
+ t1 = Time.now
147
+
148
+ elapsed = t1 - t0
149
+ puts "\nElapsed: #{'%3.2f' % elapsed} secs\n "
150
+