scriptorium 0.0.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/README.lt3 +324 -0
  3. data/README.md +3155 -1
  4. data/assets/.DS_Store +0 -0
  5. data/assets/README.md +44 -0
  6. data/assets/back-icon.png +0 -0
  7. data/assets/icons/facebook.svg +1 -0
  8. data/assets/icons/github.svg +1 -0
  9. data/assets/icons/instagram.svg +1 -0
  10. data/assets/icons/reddit.svg +1 -0
  11. data/assets/icons/ui/.DS_Store +0 -0
  12. data/assets/icons/ui/back.png +0 -0
  13. data/assets/icons/ui/copy.png +0 -0
  14. data/assets/icons/ui/down.png +0 -0
  15. data/assets/icons/ui/end.png +0 -0
  16. data/assets/icons/ui/exit.png +0 -0
  17. data/assets/icons/ui/foo +10 -0
  18. data/assets/icons/ui/home.png +0 -0
  19. data/assets/icons/ui/left.png +0 -0
  20. data/assets/icons/ui/next.png +0 -0
  21. data/assets/icons/ui/right.png +0 -0
  22. data/assets/icons/ui/start.png +0 -0
  23. data/assets/icons/ui/up.png +0 -0
  24. data/assets/icons/x.svg +1 -0
  25. data/assets/icons/youtube.svg +1 -0
  26. data/assets/samples/placeholder.svg +9 -0
  27. data/assets/themes/standard/favicon.svg +6 -0
  28. data/bin/scriptorium +1511 -0
  29. data/doc/README.txt +6 -0
  30. data/doc/anti-amnesia/20250727-054000-scriptorium-overview.md +95 -0
  31. data/doc/anti-amnesia/20250727-060000-api-design-tui-planning.md +34 -0
  32. data/doc/anti-amnesia/20250727-061000-runeblog-tui-analysis.md +50 -0
  33. data/doc/anti-amnesia/20250727-123000-anti-amnesia-conventions.md +31 -0
  34. data/doc/anti-amnesia/20250727-154000-livetext-plugin-file-stats.md +73 -0
  35. data/doc/anti-amnesia/20250727-172600-cursor-rbenv-ruby-version-mystery.md +64 -0
  36. data/doc/anti-amnesia/20250727-172600-unified-minitest-framework.md +70 -0
  37. data/doc/anti-amnesia/20250727-172900-ai-cognitive-assessment-capabilities.md +40 -0
  38. data/doc/anti-amnesia/20250727-173000-widget-testing-achievement.md +110 -0
  39. data/doc/anti-amnesia/20250727-180000-post-id-num-refactoring.md +73 -0
  40. data/doc/anti-amnesia/20250728-124243-aaa-syntax-clarification.md +46 -0
  41. data/doc/anti-amnesia/20250728-124421-conversation-summary-concise.md +124 -0
  42. data/doc/anti-amnesia/20250729-190000-scriptorium-tui-testing-complete.md +46 -0
  43. data/doc/anti-amnesia/20250729-200000-scriptorium-tui-testing-edit-file-workflow.md +97 -0
  44. data/doc/anti-amnesia/20250729-210000-reddit-autopost-integration-complete.md +158 -0
  45. data/doc/anti-amnesia/20250729-211500-dependency-management-system.md +211 -0
  46. data/doc/anti-amnesia/20250729-213000-python-virtual-environment-setup.md +141 -0
  47. data/doc/anti-amnesia/20250729-214500-theme-management-commands.md +211 -0
  48. data/doc/anti-amnesia/20250729-215000-version-update-to-0.6.0.md +134 -0
  49. data/doc/anti-amnesia/20250729-220000-user-guide-complete.md +41 -0
  50. data/doc/anti-amnesia/20250804-190500-cognitive-loop-bug.md +45 -0
  51. data/doc/anti-amnesia/20250804-190700-anti-amnesia-timestamping-fix.md +30 -0
  52. data/doc/anti-amnesia/20250804-213700-publishing-test-fix.md +49 -0
  53. data/doc/anti-amnesia/20250804-214400-additional-test-fixes.md +46 -0
  54. data/doc/anti-amnesia/20250804-220000-asset-function-logic-clarification.md +41 -0
  55. data/doc/anti-amnesia/20250806-202032-asset-function-logic-clarification.md +41 -0
  56. data/doc/anti-amnesia/20250807-213025.md +116 -0
  57. data/doc/anti-amnesia/20250813-082428-syntax-highlighting-and-navigation-improvements.md +256 -0
  58. data/doc/banner_svg_config.md +114 -0
  59. data/doc/contrib.lt3 +8 -0
  60. data/doc/dependencies.md +281 -0
  61. data/doc/hacker.lt3 +5 -0
  62. data/doc/reddit_credentials_template.json +8 -0
  63. data/doc/reddit_integration.md +207 -0
  64. data/doc/user.lt3 +38 -0
  65. data/doc/user_guide_section_1.md +137 -0
  66. data/doc/user_guide_section_10.md +515 -0
  67. data/doc/user_guide_section_11.md +708 -0
  68. data/doc/user_guide_section_2.md +233 -0
  69. data/doc/user_guide_section_3.md +5 -0
  70. data/doc/user_guide_section_4.md +221 -0
  71. data/doc/user_guide_section_5.md +243 -0
  72. data/doc/user_guide_section_6.md +147 -0
  73. data/doc/user_guide_section_7.md +311 -0
  74. data/doc/user_guide_section_8.md +224 -0
  75. data/doc/user_guide_section_9.md +375 -0
  76. data/doc/userdoc-toc.txt +88 -0
  77. data/lib/rouge/lexers/livetext.rb +74 -0
  78. data/lib/scriptorium/api.rb +640 -0
  79. data/lib/scriptorium/banner_svg.rb +742 -0
  80. data/lib/scriptorium/contract.rb +33 -0
  81. data/lib/scriptorium/exceptions.rb +170 -1
  82. data/lib/scriptorium/helpers.rb +475 -0
  83. data/lib/scriptorium/post.rb +195 -0
  84. data/lib/scriptorium/reddit.rb +83 -0
  85. data/lib/scriptorium/repo.rb +624 -0
  86. data/lib/scriptorium/standard_files.rb +515 -0
  87. data/lib/scriptorium/syntax_highlighter.rb +234 -0
  88. data/lib/scriptorium/theme.rb +179 -0
  89. data/lib/scriptorium/version.rb +2 -2
  90. data/lib/scriptorium/view.rb +976 -0
  91. data/lib/scriptorium/widgets/featured_posts.rb +149 -0
  92. data/lib/scriptorium/widgets/links.rb +112 -0
  93. data/lib/scriptorium/widgets/pages.rb +133 -0
  94. data/lib/scriptorium/widgets/widget.rb +133 -0
  95. data/lib/scriptorium.rb +21 -40
  96. data/lib/skeleton.rb +8 -2
  97. data/scriptorium.gemspec +15 -4
  98. data/test/README.md +69 -0
  99. data/test/all +43 -0
  100. data/test/api_demo.rb +99 -0
  101. data/test/assets/imagenotfound.jpg +0 -0
  102. data/test/assets/images/.DS_Store +0 -0
  103. data/test/assets/images/README.md +27 -0
  104. data/test/assets/images/odd_aspect.png +0 -0
  105. data/test/assets/images/perfect.png +0 -0
  106. data/test/assets/images/small.png +0 -0
  107. data/test/assets/images/tall.png +0 -0
  108. data/test/assets/images/very_tall.png +0 -0
  109. data/test/assets/images/very_wide.png +0 -0
  110. data/test/assets/images/wide.png +0 -0
  111. data/test/assets/testbanner.jpg +0 -0
  112. data/test/banner_svg/simple_helpers.rb +13 -0
  113. data/test/banner_svg/unit.rb +768 -0
  114. data/test/ed_test.rb +204 -0
  115. data/test/integration/cursor_banner_combinations.rb +193 -0
  116. data/test/integration/cursor_banner_features.rb +374 -0
  117. data/test/integration/integration_test.rb +326 -0
  118. data/test/livetext_plugin_test.rb +229 -0
  119. data/test/manual/asset_mgmt.rb +67 -0
  120. data/test/manual/banner-tests/config.txt +3 -0
  121. data/test/manual/banner-tests/index.html +45 -0
  122. data/test/manual/banner-tests/test01.html +58 -0
  123. data/test/manual/banner-tests/test02.html +58 -0
  124. data/test/manual/banner-tests/test03.html +58 -0
  125. data/test/manual/banner-tests/test04.html +65 -0
  126. data/test/manual/banner-tests/test05.html +65 -0
  127. data/test/manual/banner-tests/test06.html +65 -0
  128. data/test/manual/banner-tests/test07.html +65 -0
  129. data/test/manual/banner-tests/test08.html +59 -0
  130. data/test/manual/banner-tests/test09.html +59 -0
  131. data/test/manual/banner-tests/test10.html +59 -0
  132. data/test/manual/banner-tests/test11.html +59 -0
  133. data/test/manual/banner-tests/test12.html +59 -0
  134. data/test/manual/banner-tests/test13.html +59 -0
  135. data/test/manual/banner-tests/test14.html +59 -0
  136. data/test/manual/banner-tests/test15.html +58 -0
  137. data/test/manual/banner-tests/test16.html +58 -0
  138. data/test/manual/banner-tests/test17.html +58 -0
  139. data/test/manual/banner-tests/test18.html +68 -0
  140. data/test/manual/banner-tests/test19.html +68 -0
  141. data/test/manual/banner-tests/test20.html +68 -0
  142. data/test/manual/banner-tests/test21.html +68 -0
  143. data/test/manual/banner-tests/test22.html +68 -0
  144. data/test/manual/banner-tests/test23.html +68 -0
  145. data/test/manual/banner-tests/test24.html +68 -0
  146. data/test/manual/banner-tests/test25.html +67 -0
  147. data/test/manual/banner_environment.rb +192 -0
  148. data/test/manual/deploy_symlink_demo.rb +142 -0
  149. data/test/manual/environment.rb +67 -0
  150. data/test/manual/make_banner.rb +153 -0
  151. data/test/manual/sample_banner_config.txt +12 -0
  152. data/test/manual/symlink_demo.rb +117 -0
  153. data/test/manual/test1.rb +47 -0
  154. data/test/manual/test2.rb +12 -0
  155. data/test/manual/test3.rb +38 -0
  156. data/test/manual/test4.rb +40 -0
  157. data/test/manual/test5.rb +24 -0
  158. data/test/manual/test6.rb +73 -0
  159. data/test/manual/test_banner_combinations.rb +120 -0
  160. data/test/manual/test_banner_features.rb +306 -0
  161. data/test/manual/test_banner_from_file.rb +150 -0
  162. data/test/manual/test_banner_in_header.rb +35 -0
  163. data/test/manual/test_code_highlighting.rb +68 -0
  164. data/test/manual/test_complex_header.rb +74 -0
  165. data/test/manual/test_empty_header.rb +32 -0
  166. data/test/manual/test_radial_custom.rb +58 -0
  167. data/test/manual/test_radial_large_radius.rb +52 -0
  168. data/test/manual/test_svg_debug.rb +47 -0
  169. data/test/manual/test_syntax_highlighting.rb +147 -0
  170. data/test/pages-demo/config/currentview.txt +1 -0
  171. data/test/pages-demo/views/demo/config/bootstrap_css.txt +5 -0
  172. data/test/pages-demo/views/demo/config/bootstrap_js.txt +4 -0
  173. data/test/pages-demo/views/demo/config/common.js +57 -0
  174. data/test/pages-demo/views/demo/config/footer.txt +1 -0
  175. data/test/pages-demo/views/demo/config/global-head.txt +8 -0
  176. data/test/pages-demo/views/demo/config/header.txt +1 -0
  177. data/test/pages-demo/views/demo/config/layout.txt +1 -0
  178. data/test/pages-demo/views/demo/config/left.txt +1 -0
  179. data/test/pages-demo/views/demo/config/main.txt +1 -0
  180. data/test/pages-demo/views/demo/config/right.txt +1 -0
  181. data/test/pages-demo/views/demo/config.txt +3 -0
  182. data/test/pages-demo/views/demo/output/panes/footer.html +1 -0
  183. data/test/pages-demo/views/demo/output/panes/header.html +1 -0
  184. data/test/pages-demo/views/demo/output/panes/left.html +1 -0
  185. data/test/pages-demo/views/demo/output/panes/main.html +1 -0
  186. data/test/pages-demo/views/demo/output/panes/right.html +1 -0
  187. data/test/rubytext/rubytext_comprehensive_test.rb +307 -0
  188. data/test/rubytext/rubytext_demo_test.rb +42 -0
  189. data/test/rubytext/rubytext_testing_guide.md +277 -0
  190. data/test/run_automated_tests.rb +45 -0
  191. data/test/scriptorium-TEST-1754622690-146/config/bootstrap_css.txt +5 -0
  192. data/test/scriptorium-TEST-1754622690-146/config/bootstrap_js.txt +4 -0
  193. data/test/scriptorium-TEST-1754622690-146/config/common.js +57 -0
  194. data/test/scriptorium-TEST-1754622690-146/config/currentview.txt +1 -0
  195. data/test/scriptorium-TEST-1754622690-146/config/global-head.txt +9 -0
  196. data/test/scriptorium-TEST-1754622690-146/config/last_post_num.txt +1 -0
  197. data/test/scriptorium-TEST-1754622690-146/config/os_helpers.rb +4 -0
  198. data/test/scriptorium-TEST-1754622690-146/config/widgets.txt +3 -0
  199. data/test/scriptorium-TEST-1754622690-146/posts/0001/meta.txt +8 -0
  200. data/test/scriptorium-TEST-1754622690-146/posts/0001/source.lt3 +6 -0
  201. data/test/scriptorium-TEST-1754622690-146/themes/standard/README.txt +1 -0
  202. data/test/scriptorium-TEST-1754622690-146/themes/standard/config.txt +1 -0
  203. data/test/scriptorium-TEST-1754622690-146/themes/standard/initial/post.lt3 +12 -0
  204. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/footer.txt +2 -0
  205. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/header.txt +4 -0
  206. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/left.txt +3 -0
  207. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/main.txt +5 -0
  208. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/right.txt +3 -0
  209. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/gen/text.css +1 -0
  210. data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/layout.txt +5 -0
  211. data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index.lt3 +1 -0
  212. data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index_entry.lt3 +14 -0
  213. data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/post.lt3 +13 -0
  214. data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/widget.lt3 +1 -0
  215. data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_css.txt +5 -0
  216. data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_js.txt +4 -0
  217. data/test/scriptorium-TEST-1754622690-146/views/sample/config/common.js +57 -0
  218. data/test/scriptorium-TEST-1754622690-146/views/sample/config/deploy.txt +5 -0
  219. data/test/scriptorium-TEST-1754622690-146/views/sample/config/footer.txt +2 -0
  220. data/test/scriptorium-TEST-1754622690-146/views/sample/config/global-head.txt +9 -0
  221. data/test/scriptorium-TEST-1754622690-146/views/sample/config/header.txt +4 -0
  222. data/test/scriptorium-TEST-1754622690-146/views/sample/config/layout.txt +5 -0
  223. data/test/scriptorium-TEST-1754622690-146/views/sample/config/left.txt +3 -0
  224. data/test/scriptorium-TEST-1754622690-146/views/sample/config/main.txt +5 -0
  225. data/test/scriptorium-TEST-1754622690-146/views/sample/config/reddit.txt +10 -0
  226. data/test/scriptorium-TEST-1754622690-146/views/sample/config/right.txt +3 -0
  227. data/test/scriptorium-TEST-1754622690-146/views/sample/config/social.txt +7 -0
  228. data/test/scriptorium-TEST-1754622690-146/views/sample/config/status.txt +7 -0
  229. data/test/scriptorium-TEST-1754622690-146/views/sample/config.txt +3 -0
  230. data/test/scriptorium-TEST-1754622690-146/views/sample/layout/footer.html +3 -0
  231. data/test/scriptorium-TEST-1754622690-146/views/sample/layout/header.html +3 -0
  232. data/test/scriptorium-TEST-1754622690-146/views/sample/layout/left.html +3 -0
  233. data/test/scriptorium-TEST-1754622690-146/views/sample/layout/main.html +3 -0
  234. data/test/scriptorium-TEST-1754622690-146/views/sample/layout/right.html +3 -0
  235. data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/footer.html +1 -0
  236. data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/header.html +1 -0
  237. data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/left.html +1 -0
  238. data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/main.html +1 -0
  239. data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/right.html +1 -0
  240. data/test/staging/.DS_Store +0 -0
  241. data/test/syntax_highlighting_test.lt3 +124 -0
  242. data/test/test_helpers.rb +230 -0
  243. data/test/tui_editor_integration_test.rb +296 -0
  244. data/test/tui_integration_test.rb +637 -0
  245. data/test/unit/api.rb +1056 -0
  246. data/test/unit/asset_management.rb +245 -0
  247. data/test/unit/clipboard_test.rb +60 -0
  248. data/test/unit/contract_test.rb +91 -0
  249. data/test/unit/core.rb +857 -0
  250. data/test/unit/deploy_test.rb +187 -0
  251. data/test/unit/gem_asset_management.rb +189 -0
  252. data/test/unit/livetext_basic.rb +69 -0
  253. data/test/unit/livetext_compatibility.rb +89 -0
  254. data/test/unit/post.rb +244 -0
  255. data/test/unit/read_commented_file_test.rb +276 -0
  256. data/test/unit/reddit_test.rb +235 -0
  257. data/test/unit/repo.rb +548 -0
  258. data/test/unit/social_test.rb +369 -0
  259. data/test/unit/symlink_test.rb +213 -0
  260. data/test/unit/view.rb +431 -0
  261. data/test/unit/widgets.rb +669 -0
  262. data/test/wizard_test.rb +123 -0
  263. data/ui/README.md +67 -0
  264. data/ui/common/lib/ui_common.rb +8 -0
  265. data/ui/rubytext/README.md +191 -0
  266. data/ui/rubytext/bin/scriptorium-rubytext +402 -0
  267. data/ui/rubytext/lib/rubytext_ui.rb +300 -0
  268. data/ui/tui/bin/scriptorium +1420 -0
  269. data/ui/tui/test/tui_test.rb +23 -0
  270. data/ui/web/app/app.rb +1378 -0
  271. data/ui/web/app/error_helpers.rb +150 -0
  272. data/ui/web/app/views/advanced_config.erb +190 -0
  273. data/ui/web/app/views/asset_management.erb +589 -0
  274. data/ui/web/app/views/banner_config.erb +200 -0
  275. data/ui/web/app/views/configure_view.erb +401 -0
  276. data/ui/web/app/views/dashboard.erb +162 -0
  277. data/ui/web/app/views/deploy_config.erb +146 -0
  278. data/ui/web/app/views/edit_pages.erb +195 -0
  279. data/ui/web/app/views/edit_post.erb +54 -0
  280. data/ui/web/app/views/error_page.erb +29 -0
  281. data/ui/web/app/views/header_config.erb +155 -0
  282. data/ui/web/app/views/layout_config.erb +147 -0
  283. data/ui/web/app/views/navbar_config.erb +411 -0
  284. data/ui/web/app/views/view_dashboard.erb +138 -0
  285. data/ui/web/bin/scriptorium-web +153 -0
  286. data/ui/web/test/web_basic_test.rb +38 -0
  287. data/ui/web/test_navbar.txt +7 -0
  288. data/ui/web/tmp/web_server.log +5 -0
  289. data/ui/web/tmp/web_server.pid +1 -0
  290. metadata +359 -7
  291. data/lib/scriptorium/engine.rb +0 -22
  292. data/test/engine/unit.rb +0 -44
@@ -0,0 +1,233 @@
1
+ # 2. Getting Started
2
+
3
+ ## Quick Installation
4
+
5
+ Scriptorium is distributed as a Ruby gem, making installation straightforward:
6
+
7
+ ```bash
8
+ gem install scriptorium
9
+ ```
10
+
11
+ **Prerequisites:**
12
+ - Ruby 2.7 or higher
13
+
14
+ After installation, you'll have access to the `scriptorium` command-line tool, which provides an interactive interface for managing your blogs and content.
15
+
16
+ ## Interactive Setup
17
+
18
+ The easiest way to get started with Scriptorium is through the interactive setup process. Simply run:
19
+
20
+ ```bash
21
+ scriptorium
22
+ ```
23
+
24
+ This launches the interactive Scriptorium tool, which will guide you through the initial setup.
25
+
26
+ ### Creating Your First Repository
27
+
28
+ When you first run Scriptorium, it will detect that no repository exists and offer to create one:
29
+
30
+ ```
31
+ No repository found.
32
+ Create new repository? (y/n): y
33
+ ```
34
+
35
+ The repository will be created in your home directory as `~/.scriptorium` by default. This directory will contain all your views, posts, themes, and configuration.
36
+
37
+ ### Creating Your First View
38
+
39
+ After creating the repository, Scriptorium will offer to help you create your first view:
40
+
41
+ ```
42
+ Do you want assistance in creating your first view? (y/n): y
43
+ ```
44
+
45
+ A view represents a complete website or blog. You'll be prompted for:
46
+ - **View name**: A short identifier (e.g., "personal", "blog", "portfolio")
47
+ - **View title**: The full title that appears on your website
48
+ - **View subtitle**: An optional subtitle or description
49
+
50
+ For example:
51
+ ```
52
+ View name: personal
53
+ View title: My Personal Blog
54
+ View subtitle: Thoughts on programming and life
55
+ ```
56
+
57
+ ### The Sample View
58
+
59
+ Scriptorium automatically creates a sample view to help you get started. This view includes:
60
+ - A basic theme with responsive design
61
+ - Sample configuration files
62
+ - Example posts and pages
63
+ - Widget configurations
64
+
65
+ You can explore the sample view to understand how Scriptorium works, then customize it or create new views for your specific needs.
66
+
67
+ ### Basic Commands
68
+
69
+ Once your repository is set up, you can use these basic commands in the Scriptorium shell:
70
+
71
+ **View management:**
72
+ ```
73
+ view # Show current view
74
+ list views # List all views
75
+ change view <name> # Switch to a different view
76
+ new view <name> <title> # Create a new view
77
+ ```
78
+
79
+ **Content management:**
80
+ ```
81
+ list posts # List posts in current view
82
+ list drafts # List draft posts
83
+ new post <title> # Create a new post
84
+ ```
85
+
86
+ **Generation and deployment:**
87
+ ```
88
+ generate # Regenerate current view
89
+ preview # Preview current view locally
90
+ deploy # Deploy current view to server
91
+ ```
92
+
93
+ **Help and information:**
94
+ ```
95
+ help # Show available commands
96
+ version # Show Scriptorium version
97
+ quit # Exit Scriptorium shell
98
+ ```
99
+
100
+ ## Basic Configuration
101
+
102
+ ### Editor Setup
103
+
104
+ Scriptorium uses your preferred text editor for creating and editing content. For simplicity and lack of distraction, something like vim or emacs is recommended. (The ancient editor ed is mentioned here partly as a joke; but in fact, Scriptorium does use ed in automated testing.)
105
+
106
+ On first use, you'll be prompted to choose an editor:
107
+
108
+ ```
109
+ Available editors:
110
+ 1. nano
111
+ 2. vim
112
+ 3. emacs
113
+ 4. ed
114
+
115
+ Choose editor (1-4): 1
116
+ ```
117
+
118
+ Your choice is saved in `config/editor.txt` and will be used for all future editing sessions.
119
+
120
+ **Recommended editors:**
121
+ - **nano**: Simple and beginner-friendly
122
+ - **vim**: Powerful and efficient for experienced users
123
+ - **emacs**: Feature-rich with extensive customization
124
+ - **ed**: Minimal line editor for automation
125
+
126
+ ### View Configuration
127
+
128
+ Each view has its own configuration file at `views/<viewname>/config.txt`. This file contains basic settings:
129
+
130
+ ```
131
+ title My Personal Blog
132
+ subtitle Thoughts on programming and life
133
+ theme standard
134
+ ```
135
+
136
+ **Key configuration options:**
137
+ - **title**: The main title of your website
138
+ - **subtitle**: A subtitle or description
139
+ - **theme**: The theme to use for this view
140
+ - **deploy_url**: The URL where this view is deployed (optional)
141
+
142
+ ### Global Configuration
143
+
144
+ Global settings are stored in the `config/` directory:
145
+
146
+ - **editor.txt**: Your preferred text editor
147
+ - **last_post_num.txt**: Tracks the last post number used
148
+ - **currentview.txt**: Remembers which view was last active
149
+
150
+ Typically you would not change any of these manually. The last two especially are managed internally by Scriptorium.
151
+
152
+ ## Checking Dependencies
153
+
154
+ Scriptorium includes a comprehensive dependency checker to ensure all required tools are available:
155
+
156
+ ```bash
157
+ ruby scripts/check_dependencies.rb
158
+ ```
159
+
160
+ This will check for:
161
+ - **Core dependencies**: Ruby (required for all features)
162
+ - **Feature dependencies**:
163
+ - Python 3 (for syntax highlighting and RSS validation)
164
+ - Redd gem (Ruby Reddit API wrapper for autoposting)
165
+ - LiveText (Scriptorium's templating system)
166
+ - ImageMagick (for image processing and thumbnails)
167
+ - Pygments (for code syntax highlighting)
168
+ - Feed Validator (for RSS feed validation)
169
+ - **Configuration requirements**: SSH keys (for deployment), Reddit API credentials
170
+
171
+ The checker provides specific installation instructions for any missing dependencies.
172
+
173
+ **Example output:**
174
+ ```
175
+ 🔍 Scriptorium Dependency Checker
176
+ ==================================================
177
+
178
+ 📊 Dependency Status
179
+ ==================================================
180
+
181
+ Individual Dependencies:
182
+ ------------------------------
183
+ Ruby ✅ Available
184
+ Python 3 ✅ Available
185
+ Redd gem (Reddit API) ❌ Missing
186
+ LiveText ✅ Available
187
+ ImageMagick ✅ Available
188
+
189
+ Feature Availability:
190
+ ------------------------------
191
+ Core Blogging ✅ Ready
192
+ Reddit Button ✅ Ready
193
+ Reddit Autopost ❌ Missing Dependencies
194
+ Missing: redd
195
+ ```
196
+
197
+ ## The "Standard" Theme
198
+
199
+ Scriptorium comes with a single theme called "standard" that provides a clean, responsive design suitable for most blogs and websites.
200
+
201
+ The standard theme includes:
202
+ - **Responsive design**: Works well on desktop, tablet, and mobile
203
+ - **Clean typography**: Readable fonts and spacing
204
+ - **Flexible layout**: Header, footer, main content, and optional sidebars
205
+ - **Widget support**: Ready-to-use widgets for common content
206
+ - **Social integration**: Built-in support for social media features
207
+
208
+ Any future (or cloned) theme will have essentially the same structure. The standard theme is located in `themes/standard/` and includes:
209
+
210
+ ```
211
+ themes/standard/
212
+ ├── templates/ # LiveText templates
213
+ │ ├── post.lt3 # Individual post template
214
+ │ ├── index.lt3 # Front page template
215
+ │ └── widget.lt3 # Widget template
216
+ ├── layout/ # Layout configuration
217
+ │ ├── layout.txt # Layout definition
218
+ │ ├── config/ # Layout components
219
+ │ └── gen/ # Generated CSS/HTML
220
+ └── assets/ # Theme assets (images, etc.)
221
+ ```
222
+
223
+ ### Customizing the Theme
224
+
225
+ You can customize the standard theme by:
226
+ 1. **Cloning it**: `clone standard mytheme` (creates a copy to modify)
227
+ 2. **Editing templates**: Modify the LiveText templates in `templates/`
228
+ 3. **Adjusting layout**: Change the layout configuration in `layout/`
229
+ 4. **Adding assets**: Include custom images, CSS, or JavaScript
230
+
231
+ Predefined themes are considered immutable. Of course, there is only one at this point. Later on, there should be a distinction between predefined and user-defined (or cloned) themes.
232
+
233
+ [Detailed theme customization is covered in Section 7.]
@@ -0,0 +1,5 @@
1
+ # 3. LiveText Basics
2
+
3
+ ## What is LiveText?
4
+
5
+ **[TO BE DONE]
@@ -0,0 +1,221 @@
1
+ # 4. The Front Page
2
+
3
+ ## Containers and Their Uses
4
+
5
+ The front page of your Scriptorium view is built using a container-based layout system. Each container serves a specific purpose and can be configured independently:
6
+
7
+ **Front page containers:**
8
+ - **Header**: Contains the banner, navigation, and site branding
9
+ - **Left**: Optional sidebar for widgets and additional content
10
+ - **Main**: The primary content area, typically showing post listings
11
+ - **Right**: Optional sidebar for widgets and additional content
12
+ - **Footer**: Site footer with links and information
13
+
14
+ ```
15
+ +------------------------------------------+
16
+ | Header |
17
+ | (banner, title, subtitle, navigation) |
18
+ +------------------------------------------+
19
+ | | | |
20
+ | Left | Main | Right |
21
+ | Sidebar| (post index) | Sidebar |
22
+ | | | |
23
+ +------------------------------------------+
24
+ | Footer |
25
+ +------------------------------------------+
26
+ ```
27
+
28
+ ## Configuring Header
29
+
30
+ ### Banner and Title
31
+
32
+ The header configuration is defined in `views/<viewname>/config/header.txt`. The header can include:
33
+
34
+ ```
35
+ # Header configuration example
36
+ title
37
+ subtitle
38
+ banner svg
39
+ nav
40
+ ```
41
+
42
+ **Header components:**
43
+ - **title**: Displays the view title as an H1 heading
44
+ - **subtitle**: Displays the view subtitle as a paragraph
45
+ - **banner svg**: Generates an SVG banner using the BannerSVG system
46
+ - **banner <filename>**: Uses an image file as the banner
47
+ - **nav**: Includes navigation using `navbar.txt`
48
+ - **nav <filename>**: Uses a custom navigation file
49
+
50
+ ### Navigation Bar
51
+
52
+ Navigation is configured in `views/<viewname>/config/navbar.txt` using a simple syntax:
53
+
54
+ ```
55
+ =About
56
+ Vision & Mission mission
57
+ Board of Directors board
58
+ Partners partners
59
+ How You Can Help howtohelp
60
+ -Social Media socmed
61
+ =Resources
62
+ Space links links
63
+ Space on Twitter twitter
64
+ Space on Instagram instagram
65
+ Space Newsfeeds rssnews
66
+ -Companion sites oursites
67
+ -Blog embed-blog
68
+ -Contact contact
69
+ ```
70
+
71
+ **Navigation syntax:**
72
+ - **=** - Top-level menu item with children
73
+ - **space** - Child of previous "=" item
74
+ - **-** - Top-level menu item without children
75
+ - **Label** - The text displayed in the menu
76
+ - **Filename** - The HTML file to open (without .html extension)
77
+
78
+ The navigation generates a Bootstrap navbar with responsive design.
79
+
80
+ ## Configuring Sidebars
81
+
82
+ Sidebars are optional containers that can appear on the left or right side of your main content. They're perfect for widgets and additional information.
83
+
84
+ **Sidebar configuration:**
85
+ Sidebars are configured through the layout system and can contain widgets. The layout determines whether sidebars appear and on which side.
86
+
87
+ ## The Main Container: Post Index
88
+
89
+ The main container is where your primary content appears. On the front page, this typically shows a listing of your blog posts:
90
+
91
+ **Post listing features:**
92
+ - **Chronological order**: Posts appear newest first
93
+ - **Post entries**: Each post shows title, date, and excerpt
94
+ - **Pagination**: Automatically paginates when you have many posts
95
+ - **Read more links**: Links to the full post content
96
+
97
+ ## Widgets
98
+
99
+ Widgets are reusable content components that can be placed in sidebars. Scriptorium includes several built-in widgets:
100
+
101
+ ### Links Widget
102
+
103
+ The Links widget displays a list of external links. Configuration is in `config/widgets.txt`:
104
+
105
+ ```
106
+ links
107
+ ```
108
+
109
+ **Links widget data:**
110
+ Links are defined in `config/links.txt` with one link per line:
111
+
112
+ ```
113
+ https://ruby-lang.org, Ruby Language
114
+ https://github.com, GitHub
115
+ https://stackoverflow.com, Stack Overflow
116
+ ```
117
+
118
+ **Format:** `URL, Title`
119
+
120
+ **Links widget features:**
121
+ - **External links**: Link to any external website
122
+ - **Simple configuration**: One link per line in CSV format
123
+ - **Automatic generation**: Creates clickable links with titles
124
+
125
+ ### Pages Widget
126
+
127
+ The Pages widget displays links to your static pages. Configuration is in `config/widgets.txt`:
128
+
129
+ ```
130
+ pages
131
+ ```
132
+
133
+ **Pages widget data:**
134
+ Pages are defined in `config/pages.txt` with one page per line:
135
+
136
+ ```
137
+ about
138
+ contact
139
+ mission
140
+ board
141
+ ```
142
+
143
+ **Format:** `filename` (without .html extension)
144
+
145
+ **Pages widget features:**
146
+ - **Automatic discovery**: Finds pages in your `pages/` directory
147
+ - **Title extraction**: Automatically extracts titles from page HTML
148
+ - **Simple configuration**: Just list the page filenames
149
+
150
+ ### Featured Posts Widget
151
+
152
+ The Featured Posts widget highlights specific posts. Configuration is in `config/widgets.txt`:
153
+
154
+ ```
155
+ featuredposts
156
+ ```
157
+
158
+ **Featured posts data:**
159
+ Posts are defined in `config/featuredposts.txt` with one post per line:
160
+
161
+ ```
162
+ my-first-post
163
+ important-announcement
164
+ tutorial-series-part-1
165
+ ```
166
+
167
+ **Format:** `post_id` or `post_id Title` (title is optional)
168
+
169
+ **Featured posts features:**
170
+ - **Manual selection**: Choose which posts to feature
171
+ - **Title fallback**: Uses post metadata if no title specified
172
+ - **Error handling**: Shows error message if post doesn't exist
173
+
174
+ ## Widget Placement
175
+
176
+ While in theory, a widget can be placed in any container, typically they will go in a sidebar (left or right). Putting a widget anywhere else has not been tested, and you will be on your own.
177
+
178
+ **Widget configuration example:**
179
+ ```
180
+ # In config/widgets.txt
181
+ links
182
+ pages
183
+ featuredposts
184
+ ```
185
+
186
+ This enables all three available widgets. The layout system determines where they appear.
187
+
188
+ ## Widget Data Files
189
+
190
+ Each widget requires a corresponding data file in the `config/` directory:
191
+
192
+ - **links.txt** - External links for the Links widget
193
+ - **pages.txt** - Page filenames for the Pages widget
194
+ - **featuredposts.txt** - Post IDs for the Featured Posts widget
195
+
196
+ **Example data files:**
197
+
198
+ `config/links.txt`:
199
+ ```
200
+ https://ruby-lang.org, Ruby Language
201
+ https://github.com, GitHub
202
+ ```
203
+
204
+ `config/pages.txt`:
205
+ ```
206
+ about
207
+ contact
208
+ mission
209
+ ```
210
+
211
+ `config/featuredposts.txt`:
212
+ ```
213
+ my-first-post
214
+ important-announcement
215
+ ```
216
+
217
+ ## Customizing Widget Appearance
218
+
219
+ Widgets generate HTML files in `widgets/<widgetname>/<widgetname>-card.html` that can be customized. Each widget uses Bootstrap styling and can be modified through CSS classes.
220
+
221
+ The front page layout system provides flexibility while maintaining consistency across your site. By combining different containers and widgets, you can create a front page that perfectly suits your content and audience.
@@ -0,0 +1,243 @@
1
+ # 5. Managing Posts
2
+
3
+ **[Errors here - fix later. HF]
4
+
5
+ ## Creating Posts
6
+
7
+ Creating new posts is one of the most common tasks in Scriptorium. Posts are the core content of your blog or website.
8
+
9
+ ### Using the Interactive Shell
10
+
11
+ The easiest way to create a post is through the Scriptorium interactive shell:
12
+
13
+ ```
14
+ scriptorium
15
+ ```
16
+
17
+ Once in the shell, you have two options for creating content:
18
+
19
+ **Create a draft:**
20
+ ```
21
+ new draft My First Blog Post
22
+ ```
23
+
24
+ **Create a post directly:**
25
+ ```
26
+ new post My First Blog Post
27
+ ```
28
+
29
+ ### Drafts vs Posts
30
+
31
+ **Drafts** are temporary files for working on content:
32
+ - Stored in `drafts/` directory
33
+ - Filename format: `YYYYMMDD-HHMMSS-draft.lt3`
34
+ - Use `list drafts` to see all drafts
35
+ - Use `new draft` to create a draft
36
+
37
+ **Posts** are the final published content:
38
+ - Stored in `posts/` directory
39
+ - Directory format: `posts/0123/` (4-digit padded numbers)
40
+ - Use `list posts` to see all posts
41
+ - Use `new post` to create a post directly
42
+
43
+ ### Post File Structure
44
+
45
+ Each post consists of a directory with the following structure:
46
+
47
+ **Post directory:** `posts/0123/`
48
+ - **source.lt3**: The post content in LiveText format
49
+ - **meta.txt**: Post metadata
50
+ - **body.html**: Generated HTML (created during generation)
51
+ - **assets/**: Directory for post-specific assets
52
+
53
+ **Post metadata file:** `posts/0123/meta.txt`
54
+ - Contains post metadata like title, date, author
55
+ - Automatically generated and updated by Scriptorium
56
+
57
+ ### Post Content Format
58
+
59
+ Posts use LiveText format (see Section 3 for details). A typical post structure:
60
+
61
+ ```
62
+ .h1 My First Blog Post
63
+ .h2 subtitle: Getting Started with Scriptorium
64
+
65
+ .p This is my first blog post using Scriptorium.
66
+
67
+ .h2 Why Scriptorium?
68
+
69
+ .p Scriptorium makes blogging simple and powerful.
70
+
71
+ .list
72
+ **Easy to use** - Simple command-line interface
73
+ **Flexible** - Multiple views and themes
74
+ **Fast** - Static site generation
75
+ **Customizable** - LiveText templating system
76
+ .end
77
+
78
+ .p That's it for my first post!
79
+ ```
80
+
81
+ ## Listing Content
82
+
83
+ ### View All Posts
84
+
85
+ To see all posts in your current view:
86
+
87
+ ```
88
+ list posts
89
+ ```
90
+
91
+ This shows:
92
+ - Post title
93
+ - Post number
94
+
95
+ ### View All Drafts
96
+
97
+ To see all drafts:
98
+
99
+ ```
100
+ list drafts
101
+ ```
102
+
103
+ This shows:
104
+ - Draft filename
105
+ - Draft title
106
+
107
+ ## Editing Posts
108
+
109
+ ### Opening a Post for Editing
110
+
111
+ To edit an existing post, you'll need to open the post file directly in your editor. Posts are stored in `posts/0123/source.lt3`.
112
+
113
+ ### Post Numbering
114
+
115
+ Post numbers are sequential integers with 4-digit padding:
116
+ - **Format**: 4-digit padded numbers (0001, 0002, 0003, etc.)
117
+ - **Automatic**: Numbers are assigned when posts are created
118
+ - **Sequential**: Numbers increment automatically
119
+
120
+ ### Finding Post Numbers
121
+
122
+ You can find post numbers by:
123
+ 1. Using `list posts` to see all posts
124
+ 2. Looking in the `posts/` directory
125
+ 3. Checking the post metadata file
126
+
127
+ ## Deleting Posts
128
+
129
+ ### Marking Posts for Deletion
130
+
131
+ To delete a post, Scriptorium moves the post directory to a deleted state:
132
+
133
+ - **Normal post**: `posts/0001/`
134
+ - **Deleted post**: `posts/_0001/` (with underscore prefix)
135
+
136
+ ### Restoring Deleted Posts
137
+
138
+ To restore a deleted post, move the directory back from `posts/_0001/` to `posts/0001/`.
139
+
140
+ ### Post Status
141
+
142
+ Posts can be in different states:
143
+ - **Published**: Post is live and visible on your site
144
+ - **Deleted**: Post is marked for deletion (moved to `_0001/` directory)
145
+
146
+ ## Linking Posts
147
+
148
+ ### Internal Links
149
+
150
+ You can link between posts using their post numbers:
151
+
152
+ ```
153
+ .p Check out my [previous post](posts/0001.html) for more information.
154
+ ```
155
+
156
+ ### Cross-View Links
157
+
158
+ To link to a post in a different view:
159
+
160
+ ```
161
+ .p See my [technical blog post](../tech/posts/0005.html) for more details.
162
+ ```
163
+
164
+ ## Unlinking Posts
165
+
166
+ ### Removing Posts from Views
167
+
168
+ The `unlink_post` command removes a post from the current view but doesn't delete the post itself. It has no other effect on the post.
169
+
170
+ ## Featured Posts
171
+
172
+ ### Marking Posts as Featured
173
+
174
+ Featured posts appear in the Featured Posts widget (see Section 4). To feature a post:
175
+
176
+ 1. Edit `widgets/featuredposts/list.txt`
177
+ 2. Add the post number on a new line:
178
+
179
+ ```
180
+ 1
181
+ 5
182
+ 10
183
+ ```
184
+
185
+ ### Featured Post Order
186
+
187
+ Posts appear in the Featured Posts widget in the order listed in `widgets/featuredposts/list.txt`.
188
+
189
+ ### Removing Featured Status
190
+
191
+ To remove a post from featured status:
192
+
193
+ 1. Edit `widgets/featuredposts/list.txt`
194
+ 2. Remove the post number from the list
195
+ 3. Regenerate the view
196
+
197
+ ## Post Organization
198
+
199
+ ### Post Numbering
200
+
201
+ Scriptorium automatically assigns sequential post numbers:
202
+ - **Automatic**: Post numbers are assigned when posts are created
203
+ - **Sequential**: Numbers increment automatically (1, 2, 3, etc.)
204
+ - **Padded**: Stored as 4-digit padded numbers (0001, 0002, etc.)
205
+
206
+ ### Post Sorting
207
+
208
+ Posts are typically displayed in chronological order (newest first), but you can customize this through:
209
+ - **Featured posts**: Manual ordering in the Featured Posts widget
210
+ - **Theme customization**: Modify how posts are sorted in your theme
211
+
212
+ ### Post Categories
213
+
214
+ While Scriptorium doesn't have built-in categories, you can organize posts by:
215
+ - **Views**: Different views for different types of content
216
+ - **Tags**: Using tags in post content (see Section 3)
217
+ - **Featured posts**: Highlighting important posts
218
+
219
+ ## Post Workflow
220
+
221
+ ### Typical Post Creation Workflow
222
+
223
+ 1. **Create**: `new post "Post Title"`
224
+ 2. **Write**: Edit the post content in LiveText format
225
+ 3. **Generate**: Use `generate` to build the final site
226
+ 4. **Deploy**: Use `deploy` to publish to your server
227
+
228
+ ### Draft Workflow
229
+
230
+ 1. **Create draft**: `new draft "Draft Title"`
231
+ 2. **Work on content**: Edit and refine the draft
232
+ 3. **Convert**: When ready, convert draft to post
233
+
234
+ ### Post Maintenance
235
+
236
+ Regular post maintenance tasks:
237
+ - **Review posts**: Use `list posts` to see all posts
238
+ - **Review drafts**: Use `list drafts` to see all drafts
239
+ - **Check links**: Verify internal links are working
240
+ - **Update featured**: Keep featured posts current
241
+ - **Clean up**: Remove old deleted posts
242
+
243
+ Most of this is intuitive. If it's not, the software probably was written incorrectly.