scriptorium 0.6.1 → 0.7.2
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.
- checksums.yaml +4 -4
- data/assets/icons/social/reddit.png +0 -0
- data/assets/icons/social/x-logo.png +0 -0
- data/assets/imagenotfound.jpg +0 -0
- data/bin/sblog +84 -5
- data/bin/scriptorium +1 -0
- data/doc/anti-amnesia/20250727-054000-scriptorium-overview.md +0 -1
- data/doc/anti-amnesia/20250727-123000-anti-amnesia-conventions.md +0 -29
- data/doc/anti-amnesia/20250727-172600-cursor-rbenv-ruby-version-mystery.md +0 -19
- data/doc/anti-amnesia/20250727-172900-ai-cognitive-assessment-capabilities.md +1 -1
- data/doc/anti-amnesia/20250728-124243-aaa-syntax-clarification.md +1 -1
- data/doc/anti-amnesia/20250729-210000-reddit-autopost-integration-complete.md +1 -1
- data/doc/anti-amnesia/20250804-190500-cognitive-loop-bug.md +0 -10
- data/doc/anti-amnesia/20250804-190700-anti-amnesia-timestamping-fix.md +1 -4
- data/doc/anti-amnesia/20250901-211714-codemirror-integration-and-web-tests.md +172 -0
- data/doc/anti-amnesia/20250902-002402-backup-restore-system.md +126 -0
- data/doc/anti-amnesia/20250907-203339-backup-metadata-implementation.md +66 -0
- data/doc/imported/0001-elixir-conf-2014/metadata.txt +7 -0
- data/doc/imported/0001-elixir-conf-2014/post.html +37 -0
- data/doc/imported/0001-elixir-conf-2014/source.lt3 +22 -0
- data/doc/imported/0002-programmers-and-word-processing/metadata.txt +7 -0
- data/doc/imported/0002-programmers-and-word-processing/post.html +192 -0
- data/doc/imported/0002-programmers-and-word-processing/source.lt3 +146 -0
- data/doc/imported/0003-how-to-turn-your-brain-sideways/metadata.txt +7 -0
- data/doc/imported/0003-how-to-turn-your-brain-sideways/post.html +60 -0
- data/doc/imported/0003-how-to-turn-your-brain-sideways/source.lt3 +40 -0
- data/doc/imported/0004-upcoming-lone-star-ruby-conference/metadata.txt +7 -0
- data/doc/imported/0004-upcoming-lone-star-ruby-conference/post.html +42 -0
- data/doc/imported/0004-upcoming-lone-star-ruby-conference/source.lt3 +24 -0
- data/doc/imported/0005-elixir-conf-2015-announced/metadata.txt +7 -0
- data/doc/imported/0005-elixir-conf-2015-announced/post.html +30 -0
- data/doc/imported/0005-elixir-conf-2015-announced/source.lt3 +16 -0
- data/doc/imported/0006-ruby-for-dinosaurs/metadata.txt +7 -0
- data/doc/imported/0006-ruby-for-dinosaurs/post.html +43 -0
- data/doc/imported/0006-ruby-for-dinosaurs/source.lt3 +27 -0
- data/doc/imported/0007-phoenix-isnt-rails/metadata.txt +7 -0
- data/doc/imported/0007-phoenix-isnt-rails/post.html +116 -0
- data/doc/imported/0007-phoenix-isnt-rails/source.lt3 +87 -0
- data/doc/imported/0008-concerning-the-term-monkeypatching/metadata.txt +7 -0
- data/doc/imported/0008-concerning-the-term-monkeypatching/post.html +129 -0
- data/doc/imported/0008-concerning-the-term-monkeypatching/source.lt3 +92 -0
- data/doc/imported/0009-announcement-coming-soon/metadata.txt +7 -0
- data/doc/imported/0009-announcement-coming-soon/post.html +33 -0
- data/doc/imported/0009-announcement-coming-soon/source.lt3 +19 -0
- data/doc/imported/0010-immutable-data-ditching-the-wax-tablet/metadata.txt +7 -0
- data/doc/imported/0010-immutable-data-ditching-the-wax-tablet/post.html +175 -0
- data/doc/imported/0010-immutable-data-ditching-the-wax-tablet/source.lt3 +139 -0
- data/doc/imported/0011-computer-science-as-a-lost-art/metadata.txt +7 -0
- data/doc/imported/0011-computer-science-as-a-lost-art/post.html +139 -0
- data/doc/imported/0011-computer-science-as-a-lost-art/source.lt3 +104 -0
- data/doc/imported/0012-ruby-day-in-turin-italy/metadata.txt +7 -0
- data/doc/imported/0012-ruby-day-in-turin-italy/post.html +42 -0
- data/doc/imported/0012-ruby-day-in-turin-italy/source.lt3 +24 -0
- data/doc/imported/0013-rubyday-was-a-success/metadata.txt +7 -0
- data/doc/imported/0013-rubyday-was-a-success/post.html +44 -0
- data/doc/imported/0013-rubyday-was-a-success/source.lt3 +27 -0
- data/doc/imported/0014-working-on-the-blogging-software/metadata.txt +7 -0
- data/doc/imported/0014-working-on-the-blogging-software/post.html +63 -0
- data/doc/imported/0014-working-on-the-blogging-software/source.lt3 +41 -0
- data/doc/imported/0015-ok-its-not-really-a-lost-art/metadata.txt +7 -0
- data/doc/imported/0015-ok-its-not-really-a-lost-art/post.html +172 -0
- data/doc/imported/0015-ok-its-not-really-a-lost-art/source.lt3 +134 -0
- data/doc/imported/0016-an-in-operator-for-ruby/metadata.txt +7 -0
- data/doc/imported/0016-an-in-operator-for-ruby/post.html +155 -0
- data/doc/imported/0016-an-in-operator-for-ruby/source.lt3 +106 -0
- data/doc/imported/0017-the-forgotten-mathematician/metadata.txt +7 -0
- data/doc/imported/0017-the-forgotten-mathematician/post.html +161 -0
- data/doc/imported/0017-the-forgotten-mathematician/source.lt3 +119 -0
- data/doc/imported/0018-ruby-puns/metadata.txt +7 -0
- data/doc/imported/0018-ruby-puns/post.html +46 -0
- data/doc/imported/0018-ruby-puns/source.lt3 +28 -0
- data/doc/imported/0019-custom-exceptions-via-metaprogramming/metadata.txt +7 -0
- data/doc/imported/0019-custom-exceptions-via-metaprogramming/post.html +138 -0
- data/doc/imported/0019-custom-exceptions-via-metaprogramming/source.lt3 +101 -0
- data/doc/imported/0020-fffff/metadata.txt +7 -0
- data/doc/imported/0020-fffff/post.html +24 -0
- data/doc/imported/0020-fffff/source.lt3 +12 -0
- data/doc/imported/0021-trying-ror-yet-again/metadata.txt +7 -0
- data/doc/imported/0021-trying-ror-yet-again/post.html +26 -0
- data/doc/imported/0021-trying-ror-yet-again/source.lt3 +12 -0
- data/doc/imported/0023-doctor-sleep/metadata.txt +7 -0
- data/doc/imported/0023-doctor-sleep/post.html +63 -0
- data/doc/imported/0023-doctor-sleep/source.lt3 +44 -0
- data/doc/imported/0024-just-a-test/metadata.txt +7 -0
- data/doc/imported/0024-just-a-test/post.html +24 -0
- data/doc/imported/0024-just-a-test/source.lt3 +12 -0
- data/doc/imported/import_summary.txt +98 -0
- data/doc/livetext-informal-spec.txt +65 -0
- data/doc/myuserdoc/ch-0.lt3 +31 -0
- data/doc/myuserdoc/ch-1.lt3 +37 -0
- data/doc/myuserdoc/ch-10.lt3 +22 -0
- data/doc/myuserdoc/ch-2.lt3 +37 -0
- data/doc/myuserdoc/ch-3.lt3 +19 -0
- data/doc/myuserdoc/ch-4.lt3 +43 -0
- data/doc/myuserdoc/ch-5.lt3 +22 -0
- data/doc/myuserdoc/ch-6.lt3 +19 -0
- data/doc/myuserdoc/ch-7.lt3 +16 -0
- data/doc/myuserdoc/ch-8.lt3 +13 -0
- data/doc/myuserdoc/ch-9.lt3 +19 -0
- data/doc/myuserdoc/tweak.rb +18 -0
- data/doc/{userdoc-toc.txt → myuserdoc/userdoc-toc.txt} +27 -27
- data/doc/old-posts/0001-elixir-conf-2014.lt3 +24 -0
- data/doc/old-posts/0002-programmers-and-word-processing.lt3 +150 -0
- data/doc/old-posts/0003-how-to-turn-your-brain-sideways.lt3 +43 -0
- data/doc/old-posts/0004-upcoming-lone-star-ruby-conference.lt3 +26 -0
- data/doc/old-posts/0005-elixir-conf-2015-announced.lt3 +17 -0
- data/doc/old-posts/0006-ruby-for-dinosaurs.lt3 +30 -0
- data/doc/old-posts/0007-phoenix-isnt-rails.lt3 +90 -0
- data/doc/old-posts/0008-concerning-the-term-monkeypatching.lt3 +105 -0
- data/doc/old-posts/0009-announcement-coming-soon.lt3 +20 -0
- data/doc/old-posts/0010-immutable-data-ditching-the-wax-tablet.lt3 +142 -0
- data/doc/old-posts/0011-computer-science-as-a-lost-art.lt3 +117 -0
- data/doc/old-posts/0012-ruby-day-in-turin-italy.lt3 +26 -0
- data/doc/old-posts/0013-rubyday-was-a-success.lt3 +28 -0
- data/doc/old-posts/0014-working-on-the-blogging-software.lt3 +42 -0
- data/doc/old-posts/0015-ok-its-not-really-a-lost-art.lt3 +137 -0
- data/doc/old-posts/0016-an-in-operator-for-ruby.lt3 +142 -0
- data/doc/old-posts/0017-the-forgotten-mathematician.lt3 +129 -0
- data/doc/old-posts/0018-ruby-puns.lt3 +31 -0
- data/doc/old-posts/0019-custom-exceptions-via-metaprogramming.lt3 +116 -0
- data/doc/old-posts/0021-trying-ror-yet-again.lt3 +35 -0
- data/doc/old-posts/0023-doctor-sleep.lt3 +43 -0
- data/doc/old-posts/0024-just-a-test.lt3 +12 -0
- data/doc/old-posts/0025-trying-another-post.lt3 +12 -0
- data/doc/old-repo +1 -0
- data/doc/reddit_integration.md +2 -2
- data/doc/user.lt3 +0 -3
- data/lib/scriptorium/api.rb +1811 -78
- data/lib/scriptorium/banner_svg.rb +55 -68
- data/lib/scriptorium/contract.rb +3 -2
- data/lib/scriptorium/exceptions.rb +133 -102
- data/lib/scriptorium/helpers.rb +282 -82
- data/lib/scriptorium/post.rb +81 -17
- data/lib/scriptorium/reddit.rb +1 -1
- data/lib/scriptorium/repo.rb +478 -164
- data/lib/scriptorium/standard_files.rb +30 -396
- data/lib/scriptorium/support/common_js/clipboard.js +35 -0
- data/lib/scriptorium/support/common_js/content-loader.js +187 -0
- data/lib/scriptorium/support/common_js/navigation.js +52 -0
- data/lib/scriptorium/support/common_js/syntax-highlighting.js +27 -0
- data/lib/scriptorium/support/config/reddit_template.txt +17 -0
- data/{test/scriptorium-TEST-1754622690-146/views/sample → lib/scriptorium/support}/config/social.txt +1 -0
- data/lib/scriptorium/support/highlight/css.txt +2 -0
- data/lib/scriptorium/support/highlight/custom.css +119 -0
- data/lib/scriptorium/support/highlight/js.txt +1 -0
- data/lib/scriptorium/support/post_index/config.txt +15 -0
- data/lib/scriptorium/support/post_index/style.css +55 -0
- data/lib/scriptorium/support/templates/index_entry.lt3 +16 -0
- data/{test/scriptorium-TEST-1754622690-146/themes/standard/initial/post.lt3 → lib/scriptorium/support/templates/initial_post.lt3} +5 -5
- data/lib/scriptorium/support/templates/post.lt3 +104 -0
- data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/header.txt → lib/scriptorium/support/theme/header.lt3} +1 -1
- data/lib/scriptorium/theme.rb +83 -70
- data/lib/scriptorium/version.rb +2 -2
- data/lib/scriptorium/view.rb +194 -149
- data/lib/scriptorium.rb +24 -1
- data/lib/skeleton.rb +4 -1
- data/scriptorium.gemspec +2 -1
- data/test/WEB_INTEGRATION_README.md +196 -0
- data/test/all +40 -0
- data/test/banner_svg/unit.rb +267 -35
- data/test/config/deployment.txt +5 -0
- data/test/integration/integration_test.rb +7 -7
- data/test/integration/preview_flow_test.rb +94 -0
- data/test/livetext_plugin_test.rb +453 -182
- data/test/manual/banner-tests/test01.html +82 -18
- data/test/manual/banner-tests/test02.html +82 -18
- data/test/manual/banner-tests/test03.html +82 -18
- data/test/manual/banner-tests/test04.html +89 -25
- data/test/manual/banner-tests/test05.html +89 -25
- data/test/manual/banner-tests/test06.html +89 -25
- data/test/manual/banner-tests/test07.html +89 -25
- data/test/manual/banner-tests/test08.html +82 -18
- data/test/manual/banner-tests/test09.html +82 -18
- data/test/manual/banner-tests/test10.html +82 -18
- data/test/manual/banner-tests/test11.html +82 -18
- data/test/manual/banner-tests/test12.html +82 -18
- data/test/manual/banner-tests/test13.html +82 -18
- data/test/manual/banner-tests/test14.html +82 -18
- data/test/manual/banner-tests/test15.html +82 -18
- data/test/manual/banner-tests/test16.html +82 -18
- data/test/manual/banner-tests/test17.html +82 -18
- data/test/manual/banner-tests/test18.html +90 -26
- data/test/manual/banner-tests/test19.html +90 -26
- data/test/manual/banner-tests/test20.html +90 -26
- data/test/manual/banner-tests/test21.html +90 -26
- data/test/manual/banner-tests/test22.html +90 -26
- data/test/manual/banner-tests/test23.html +90 -26
- data/test/manual/banner-tests/test24.html +90 -26
- data/test/manual/banner-tests/test25.html +89 -25
- data/test/manual/banner_environment.rb +15 -2
- data/test/manual/codemirror_demo.html +773 -0
- data/test/manual/create_posts_for_web.rb +114 -0
- data/test/manual/preview_manual_test.rb +129 -0
- data/test/manual/test_banner_features.rb +14 -14
- data/test/manual/test_banner_integration.rb +115 -0
- data/test/manual/test_banner_radial.rb +87 -0
- data/test/manual/test_syntax_highlighting.rb +60 -40
- data/test/support/preview_utils.rb +88 -0
- data/test/test_gem_assets.rb +48 -0
- data/test/test_helpers.rb +10 -0
- data/test/tui_editor_integration_test.rb +15 -15
- data/test/tui_integration_test.rb +687 -441
- data/test/unit/api.rb +757 -37
- data/test/unit/asset_management.rb +195 -221
- data/test/unit/backup_test.rb +451 -0
- data/test/unit/contract_test.rb +1 -23
- data/test/unit/core.rb +415 -61
- data/test/unit/deploy_config_test.rb +248 -0
- data/test/unit/deploy_test.rb +312 -21
- data/test/unit/edit_post_test.rb +168 -0
- data/test/unit/gem_asset_management.rb +36 -42
- data/test/unit/livetext_basic.rb +23 -35
- data/test/unit/livetext_compatibility.rb +7 -14
- data/test/unit/parse_cmd_test.rb +260 -0
- data/test/unit/{symlink_test.rb → permalink_copy_test.rb} +47 -49
- data/test/unit/post.rb +91 -26
- data/test/unit/post_index_config_test.rb +258 -0
- data/test/unit/post_state_helpers_test.rb +137 -0
- data/test/unit/read_commented_file_test.rb +8 -6
- data/test/unit/repo.rb +75 -54
- data/test/unit/social_test.rb +41 -44
- data/test/unit/syntax_highlighting.rb +70 -0
- data/test/unit/theme_management_test.rb +91 -0
- data/test/unit/view.rb +79 -12
- data/test/unit/widgets.rb +8 -8
- data/test/web_integration_test.rb +231 -0
- data/test/web_test_helper.rb +218 -0
- data/test/web_workflow_test.rb +527 -0
- data/ui/tui/bin/scriptorium +885 -415
- data/ui/web/app/app.rb +1398 -176
- data/ui/web/app/assets/livetext_mode.js +244 -0
- data/ui/web/app/error_helpers.rb +16 -16
- data/ui/web/app/views/advanced_config.erb +8 -2
- data/ui/web/app/views/asset_management.erb +56 -0
- data/ui/web/app/views/backup_management.erb +238 -0
- data/ui/web/app/views/config_widget.erb +232 -0
- data/ui/web/app/views/dashboard.erb +64 -72
- data/ui/web/app/views/deploy_config.erb +3 -0
- data/ui/web/app/views/edit_pages.erb +170 -2
- data/ui/web/app/views/edit_post.erb +130 -9
- data/ui/web/app/views/edit_theme.erb +73 -0
- data/ui/web/app/views/edit_theme_file.erb +74 -0
- data/ui/web/app/views/theme_management.erb +130 -0
- data/ui/web/app/views/view_dashboard.erb +666 -25
- data/ui/web/app/views/widgets.erb +249 -0
- data/ui/web/bin/scriptorium-web +35 -24
- data/ui/web/tmp/timing.log +17 -0
- data/ui/web/tmp/web_server.log +0 -5
- metadata +190 -116
- data/assets/back-icon.png +0 -0
- data/assets/icons/facebook.svg +0 -1
- data/assets/icons/github.svg +0 -1
- data/assets/icons/instagram.svg +0 -1
- data/assets/icons/reddit.svg +0 -1
- data/assets/icons/x.svg +0 -1
- data/assets/icons/youtube.svg +0 -1
- data/bin/scriptorium +0 -1511
- data/doc/anti-amnesia/20250727-060000-api-design-tui-planning.md +0 -34
- data/doc/anti-amnesia/20250727-061000-runeblog-tui-analysis.md +0 -50
- data/doc/anti-amnesia/20250727-154000-livetext-plugin-file-stats.md +0 -73
- data/doc/anti-amnesia/20250727-172600-unified-minitest-framework.md +0 -70
- data/doc/anti-amnesia/20250727-173000-widget-testing-achievement.md +0 -110
- data/doc/anti-amnesia/20250727-180000-post-id-num-refactoring.md +0 -73
- data/doc/anti-amnesia/20250728-124421-conversation-summary-concise.md +0 -124
- data/doc/anti-amnesia/20250729-190000-scriptorium-tui-testing-complete.md +0 -46
- data/doc/anti-amnesia/20250729-200000-scriptorium-tui-testing-edit-file-workflow.md +0 -97
- data/doc/anti-amnesia/20250729-211500-dependency-management-system.md +0 -211
- data/doc/anti-amnesia/20250729-213000-python-virtual-environment-setup.md +0 -141
- data/doc/anti-amnesia/20250729-214500-theme-management-commands.md +0 -211
- data/doc/anti-amnesia/20250729-215000-version-update-to-0.6.0.md +0 -134
- data/doc/anti-amnesia/20250729-220000-user-guide-complete.md +0 -41
- data/doc/anti-amnesia/20250804-213700-publishing-test-fix.md +0 -49
- data/doc/anti-amnesia/20250804-214400-additional-test-fixes.md +0 -46
- data/doc/anti-amnesia/20250804-220000-asset-function-logic-clarification.md +0 -41
- data/doc/anti-amnesia/20250806-202032-asset-function-logic-clarification.md +0 -41
- data/doc/anti-amnesia/20250813-082428-syntax-highlighting-and-navigation-improvements.md +0 -256
- data/lib/scriptorium/syntax_highlighter.rb +0 -234
- data/test/manual/deploy_symlink_demo.rb +0 -142
- data/test/manual/symlink_demo.rb +0 -117
- data/test/manual/test2.rb +0 -12
- data/test/manual/test_banner_from_file.rb +0 -150
- data/test/manual/test_banner_in_header.rb +0 -35
- data/test/manual/test_code_highlighting.rb +0 -68
- data/test/manual/test_complex_header.rb +0 -74
- data/test/manual/test_empty_header.rb +0 -32
- data/test/manual/test_radial_custom.rb +0 -58
- data/test/manual/test_radial_large_radius.rb +0 -52
- data/test/manual/test_svg_debug.rb +0 -47
- data/test/pages-demo/config/currentview.txt +0 -1
- data/test/pages-demo/views/demo/config/common.js +0 -57
- data/test/pages-demo/views/demo/config/footer.txt +0 -1
- data/test/pages-demo/views/demo/config/global-head.txt +0 -8
- data/test/pages-demo/views/demo/config/header.txt +0 -1
- data/test/pages-demo/views/demo/config/layout.txt +0 -1
- data/test/pages-demo/views/demo/config/left.txt +0 -1
- data/test/pages-demo/views/demo/config/main.txt +0 -1
- data/test/pages-demo/views/demo/config/right.txt +0 -1
- data/test/pages-demo/views/demo/config.txt +0 -3
- data/test/pages-demo/views/demo/output/panes/footer.html +0 -1
- data/test/pages-demo/views/demo/output/panes/header.html +0 -1
- data/test/pages-demo/views/demo/output/panes/left.html +0 -1
- data/test/pages-demo/views/demo/output/panes/main.html +0 -1
- data/test/pages-demo/views/demo/output/panes/right.html +0 -1
- data/test/scriptorium-TEST-1754622690-146/config/bootstrap_css.txt +0 -5
- data/test/scriptorium-TEST-1754622690-146/config/bootstrap_js.txt +0 -4
- data/test/scriptorium-TEST-1754622690-146/config/common.js +0 -57
- data/test/scriptorium-TEST-1754622690-146/config/currentview.txt +0 -1
- data/test/scriptorium-TEST-1754622690-146/config/global-head.txt +0 -9
- data/test/scriptorium-TEST-1754622690-146/config/last_post_num.txt +0 -1
- data/test/scriptorium-TEST-1754622690-146/config/os_helpers.rb +0 -4
- data/test/scriptorium-TEST-1754622690-146/config/widgets.txt +0 -3
- data/test/scriptorium-TEST-1754622690-146/posts/0001/meta.txt +0 -8
- data/test/scriptorium-TEST-1754622690-146/posts/0001/source.lt3 +0 -6
- data/test/scriptorium-TEST-1754622690-146/themes/standard/README.txt +0 -1
- data/test/scriptorium-TEST-1754622690-146/themes/standard/config.txt +0 -1
- data/test/scriptorium-TEST-1754622690-146/themes/standard/layout/gen/text.css +0 -1
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index.lt3 +0 -1
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/index_entry.lt3 +0 -14
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/post.lt3 +0 -13
- data/test/scriptorium-TEST-1754622690-146/themes/standard/templates/widget.lt3 +0 -1
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_css.txt +0 -5
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/bootstrap_js.txt +0 -4
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/common.js +0 -57
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/deploy.txt +0 -5
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/footer.txt +0 -2
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/global-head.txt +0 -9
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/header.txt +0 -4
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/layout.txt +0 -5
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/left.txt +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/main.txt +0 -5
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/right.txt +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/config/status.txt +0 -7
- data/test/scriptorium-TEST-1754622690-146/views/sample/config.txt +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/footer.html +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/header.html +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/left.html +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/main.html +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/layout/right.html +0 -3
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/footer.html +0 -1
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/header.html +0 -1
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/left.html +0 -1
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/main.html +0 -1
- data/test/scriptorium-TEST-1754622690-146/views/sample/output/panes/right.html +0 -1
- data/ui/web/tmp/web_server.pid +0 -1
- /data/{test/pages-demo/views/demo/config/bootstrap_css.txt → lib/scriptorium/support/bootstrap/css.txt} +0 -0
- /data/{test/pages-demo/views/demo/config/bootstrap_js.txt → lib/scriptorium/support/bootstrap/js.txt} +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/views/sample → lib/scriptorium/support}/config/reddit.txt +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout → lib/scriptorium/support/templates}/layout.txt +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/footer.txt → lib/scriptorium/support/theme/footer.lt3} +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/left.txt → lib/scriptorium/support/theme/left.lt3} +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/main.txt → lib/scriptorium/support/theme/main.lt3} +0 -0
- /data/{test/scriptorium-TEST-1754622690-146/themes/standard/layout/config/right.txt → lib/scriptorium/support/theme/right.lt3} +0 -0
- /data/test/manual/banner-tests/{config.txt → svg.txt} +0 -0
- /data/test/manual/{test6.rb → test_advanced_widgets.rb} +0 -0
- /data/test/manual/{test1.rb → test_basic_posts.rb} +0 -0
- /data/test/manual/{test4.rb → test_layout_widgets.rb} +0 -0
- /data/test/manual/{test5.rb → test_pagination.rb} +0 -0
- /data/test/manual/{test3.rb → test_random_posts.rb} +0 -0
@@ -1,211 +0,0 @@
|
|
1
|
-
# Dependency Management System Complete
|
2
|
-
|
3
|
-
**Date**: 2025-07-29 21:15:00
|
4
|
-
**Status**: Complete
|
5
|
-
**Feature**: Comprehensive dependency management and checking system
|
6
|
-
|
7
|
-
## Overview
|
8
|
-
|
9
|
-
Created a complete dependency and configuration management system for Scriptorium that helps users understand what external tools, libraries, and configuration requirements they need for different features. This addresses the challenge of users not knowing what to install or configure for specific functionality.
|
10
|
-
|
11
|
-
## Implementation Details
|
12
|
-
|
13
|
-
### Core Components Created
|
14
|
-
|
15
|
-
1. **`doc/dependencies.md`** - Comprehensive dependency documentation
|
16
|
-
- Feature-specific dependency lists
|
17
|
-
- Platform-specific installation instructions
|
18
|
-
- Feature dependency matrix
|
19
|
-
- Troubleshooting guide
|
20
|
-
- Verification commands
|
21
|
-
|
22
|
-
2. **`scripts/check_dependencies.rb`** - Interactive dependency checker
|
23
|
-
- Checks all dependencies automatically
|
24
|
-
- Shows feature availability status
|
25
|
-
- Provides installation guidance
|
26
|
-
- Visual status indicators (✅/❌)
|
27
|
-
|
28
|
-
### Dependency Categories Covered
|
29
|
-
|
30
|
-
#### Core Dependencies
|
31
|
-
- **Ruby** (2.7+) - Required for all features
|
32
|
-
- **Git** - Version control and repository management
|
33
|
-
|
34
|
-
#### Software Dependencies
|
35
|
-
- **Reddit Integration**: Python 3, PRAW
|
36
|
-
- **LiveText Integration**: LiveText gem
|
37
|
-
- **Web Development**: Webrick, browser
|
38
|
-
- **File Operations**: Text editors (ed, nano, vim, emacs)
|
39
|
-
- **Image Processing**: ImageMagick
|
40
|
-
- **Markdown Processing**: Pygments (syntax highlighting)
|
41
|
-
- **RSS/Atom Feeds**: Feed validator
|
42
|
-
|
43
|
-
#### Configuration Requirements
|
44
|
-
- **Reddit Integration**: Reddit app, API credentials, credentials file
|
45
|
-
- **Deployment**: SSH keys, server access, deployment configuration
|
46
|
-
- **Domain/DNS**: Domain name setup, SSL certificates (optional)
|
47
|
-
|
48
|
-
#### Platform-Specific Dependencies
|
49
|
-
- **macOS**: Homebrew, Xcode Command Line Tools
|
50
|
-
- **Linux**: Build essentials, package managers
|
51
|
-
- **Windows**: RubyInstaller, Git for Windows, WSL
|
52
|
-
|
53
|
-
## Key Features
|
54
|
-
|
55
|
-
### Dependency Matrix
|
56
|
-
Created visual matrices showing which dependencies and configuration requirements are needed for each feature:
|
57
|
-
|
58
|
-
#### Software Dependencies
|
59
|
-
| Feature | Ruby | Git | Python3 | PRAW | LiveText | ImageMagick | Editor |
|
60
|
-
|---------|------|-----|---------|------|----------|-------------|---------|
|
61
|
-
| Core Blogging | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
62
|
-
| Reddit Button | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
63
|
-
| Reddit Autopost | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
|
64
|
-
| LiveText Plugins | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
|
65
|
-
| File Statistics | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
|
66
|
-
| Web Server | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
67
|
-
| Image Processing | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
68
|
-
| Markdown + Syntax | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
|
69
|
-
| RSS Feeds | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
|
70
|
-
| File Editing | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
|
71
|
-
| Deployment | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
72
|
-
|
73
|
-
#### Configuration Requirements
|
74
|
-
| Feature | Reddit Credentials | SSH Keys | Server Access | Domain/DNS | SSL Cert |
|
75
|
-
|---------|-------------------|----------|---------------|------------|----------|
|
76
|
-
| Core Blogging | ❌ | ❌ | ❌ | ❌ | ❌ |
|
77
|
-
| Reddit Button | ❌ | ❌ | ❌ | ❌ | ❌ |
|
78
|
-
| Reddit Autopost | ✅ | ❌ | ❌ | ❌ | ❌ |
|
79
|
-
| LiveText Plugins | ❌ | ❌ | ❌ | ❌ | ❌ |
|
80
|
-
| File Statistics | ❌ | ❌ | ❌ | ❌ | ❌ |
|
81
|
-
| Web Server | ❌ | ❌ | ❌ | ❌ | ❌ |
|
82
|
-
| Image Processing | ❌ | ❌ | ❌ | ❌ | ❌ |
|
83
|
-
| Markdown + Syntax | ❌ | ❌ | ❌ | ❌ | ❌ |
|
84
|
-
| RSS Feeds | ❌ | ❌ | ❌ | ❌ | ❌ |
|
85
|
-
| File Editing | ❌ | ❌ | ❌ | ❌ | ❌ |
|
86
|
-
| Deployment | ❌ | ✅ | ✅ | ⚠️ | ⚠️ |
|
87
|
-
|
88
|
-
### Interactive Checker
|
89
|
-
The dependency checker script provides:
|
90
|
-
- **Real-time status** - Shows what's available and what's missing
|
91
|
-
- **Feature readiness** - Indicates which features are ready to use
|
92
|
-
- **Installation guidance** - Specific commands for missing dependencies
|
93
|
-
- **Visual feedback** - Clear ✅/❌ indicators
|
94
|
-
|
95
|
-
### Platform Support
|
96
|
-
Comprehensive support for:
|
97
|
-
- **macOS** - Homebrew-based installation
|
98
|
-
- **Ubuntu/Debian** - apt-based installation
|
99
|
-
- **Windows** - Manual installation guidance
|
100
|
-
- **Cross-platform** - Python packages via pip3
|
101
|
-
|
102
|
-
## Usage Examples
|
103
|
-
|
104
|
-
### Check Dependencies
|
105
|
-
```bash
|
106
|
-
# Run the dependency checker
|
107
|
-
ruby scripts/check_dependencies.rb
|
108
|
-
```
|
109
|
-
|
110
|
-
### Sample Output
|
111
|
-
```
|
112
|
-
🔍 Scriptorium Dependency Checker
|
113
|
-
==================================================
|
114
|
-
|
115
|
-
📊 Dependency Status
|
116
|
-
==================================================
|
117
|
-
|
118
|
-
Individual Dependencies:
|
119
|
-
------------------------------
|
120
|
-
Ruby ✅ Available
|
121
|
-
Git ✅ Available
|
122
|
-
Python 3 ✅ Available
|
123
|
-
PRAW (Reddit API) ❌ Missing
|
124
|
-
LiveText ✅ Available
|
125
|
-
ImageMagick ✅ Available
|
126
|
-
|
127
|
-
Feature Availability:
|
128
|
-
------------------------------
|
129
|
-
Core Blogging ✅ Ready
|
130
|
-
Reddit Button ✅ Ready
|
131
|
-
Reddit Autopost ❌ Missing Dependencies
|
132
|
-
Missing: praw
|
133
|
-
LiveText Plugins ✅ Ready
|
134
|
-
```
|
135
|
-
|
136
|
-
### Installation Scripts
|
137
|
-
Provided ready-to-use installation scripts for:
|
138
|
-
- **macOS with Homebrew**
|
139
|
-
- **Ubuntu/Debian with apt**
|
140
|
-
|
141
|
-
## Benefits
|
142
|
-
|
143
|
-
### For Users
|
144
|
-
1. **Clear guidance** - Know exactly what to install for desired features
|
145
|
-
2. **Time saving** - Avoid trial-and-error dependency installation
|
146
|
-
3. **Platform-specific help** - Tailored instructions for their OS
|
147
|
-
4. **Troubleshooting** - Common issues and solutions documented
|
148
|
-
|
149
|
-
### For Developers
|
150
|
-
1. **Documentation** - Clear record of all dependencies
|
151
|
-
2. **Testing** - Easy to verify dependency availability
|
152
|
-
3. **Maintenance** - Centralized dependency management
|
153
|
-
4. **Onboarding** - New users can quickly get up to speed
|
154
|
-
|
155
|
-
## Integration with Existing Features
|
156
|
-
|
157
|
-
### Reddit Integration
|
158
|
-
- **Dependency checker** identifies missing PRAW installation
|
159
|
-
- **Documentation** provides step-by-step Reddit app setup
|
160
|
-
- **Verification** confirms Reddit integration readiness
|
161
|
-
|
162
|
-
### LiveText Integration
|
163
|
-
- **Dependency checker** verifies LiveText gem availability
|
164
|
-
- **Documentation** explains LiveText plugin system
|
165
|
-
- **Testing** confirms LiveText functionality
|
166
|
-
|
167
|
-
### Web Development
|
168
|
-
- **Dependency checker** verifies web server capabilities
|
169
|
-
- **Documentation** explains browser integration
|
170
|
-
- **Testing** confirms web server functionality
|
171
|
-
|
172
|
-
## Future Enhancements
|
173
|
-
|
174
|
-
Potential improvements identified:
|
175
|
-
1. **Automated installation** - Scripts that install missing dependencies
|
176
|
-
2. **Version checking** - Verify minimum version requirements
|
177
|
-
3. **Dependency conflicts** - Check for incompatible versions
|
178
|
-
4. **Update checking** - Suggest updates for outdated dependencies
|
179
|
-
5. **Container support** - Docker/container dependency management
|
180
|
-
|
181
|
-
## Files Created
|
182
|
-
|
183
|
-
### New Files
|
184
|
-
- `doc/dependencies.md` - Complete dependency documentation
|
185
|
-
- `scripts/check_dependencies.rb` - Interactive dependency checker
|
186
|
-
|
187
|
-
### Modified Files
|
188
|
-
- None (standalone system)
|
189
|
-
|
190
|
-
## Testing Status
|
191
|
-
|
192
|
-
- **Dependency checker tested** - Successfully identifies available/missing dependencies
|
193
|
-
- **Documentation reviewed** - Complete and accurate installation instructions
|
194
|
-
- **Cross-platform verified** - Instructions work for macOS, Linux, Windows
|
195
|
-
- **Integration tested** - Works with existing Scriptorium features
|
196
|
-
|
197
|
-
## User Impact
|
198
|
-
|
199
|
-
This system significantly improves the user experience by:
|
200
|
-
1. **Reducing setup friction** - Clear dependency requirements
|
201
|
-
2. **Preventing confusion** - Users know what they need before starting
|
202
|
-
3. **Enabling self-service** - Users can resolve dependency issues independently
|
203
|
-
4. **Improving adoption** - Lower barrier to entry for new users
|
204
|
-
|
205
|
-
## Notes
|
206
|
-
|
207
|
-
- Dependency checker is executable (`chmod +x scripts/check_dependencies.rb`)
|
208
|
-
- Documentation follows existing Scriptorium documentation patterns
|
209
|
-
- Checker uses Open3 for safe command execution
|
210
|
-
- Visual indicators make status easy to understand at a glance
|
211
|
-
- Installation guidance is platform-specific and actionable
|
@@ -1,141 +0,0 @@
|
|
1
|
-
# Python Virtual Environment Setup for Reddit Integration
|
2
|
-
|
3
|
-
**Date**: 2025-07-29 21:30:00
|
4
|
-
**Status**: Complete
|
5
|
-
**Feature**: Python virtual environment setup for Reddit integration
|
6
|
-
|
7
|
-
## Overview
|
8
|
-
|
9
|
-
Successfully resolved the "externally-managed-environment" error when installing PRAW on macOS with Homebrew Python. This is a common issue with modern Python installations that protect system packages.
|
10
|
-
|
11
|
-
## Problem Encountered
|
12
|
-
|
13
|
-
When trying to install PRAW with `pip3 install praw`, user encountered:
|
14
|
-
```
|
15
|
-
error: externally-managed-environment
|
16
|
-
× This environment is externally managed
|
17
|
-
╰─> To install Python packages system-wide, try brew install xyz
|
18
|
-
```
|
19
|
-
|
20
|
-
This is PEP 668 protection in modern Python installations.
|
21
|
-
|
22
|
-
## Solution Implemented
|
23
|
-
|
24
|
-
### Virtual Environment Approach (Recommended)
|
25
|
-
```bash
|
26
|
-
# Create dedicated virtual environment for Scriptorium
|
27
|
-
python3 -m venv ~/.scriptorium-python
|
28
|
-
|
29
|
-
# Activate virtual environment
|
30
|
-
source ~/.scriptorium-python/bin/activate
|
31
|
-
|
32
|
-
# Install PRAW in isolated environment
|
33
|
-
pip install praw
|
34
|
-
|
35
|
-
# Test installation
|
36
|
-
python -c "import praw; print('PRAW installed successfully')"
|
37
|
-
|
38
|
-
# Deactivate when done
|
39
|
-
deactivate
|
40
|
-
```
|
41
|
-
|
42
|
-
### Alternative Solutions Available
|
43
|
-
1. **--user flag**: `pip3 install --user praw`
|
44
|
-
2. **pipx**: `brew install pipx && pipx install praw`
|
45
|
-
3. **Override protection**: `pip3 install --break-system-packages praw` (not recommended)
|
46
|
-
|
47
|
-
## Code Updates Made
|
48
|
-
|
49
|
-
### 1. Enhanced Reddit Integration (`lib/scriptorium/reddit.rb`)
|
50
|
-
- Added `find_python_environment` method to detect virtual environments
|
51
|
-
- Updated autopost method to use appropriate Python environment
|
52
|
-
- Automatic fallback to system Python if virtual environment not found
|
53
|
-
|
54
|
-
### 2. Updated Dependency Checker (`scripts/check_dependencies.rb`)
|
55
|
-
- Enhanced `check_python_package` to check multiple Python environments
|
56
|
-
- Added virtual environment detection logic
|
57
|
-
- Updated installation guidance to include virtual environment setup
|
58
|
-
|
59
|
-
### 3. Updated Documentation (`doc/reddit_integration.md`)
|
60
|
-
- Added virtual environment setup instructions
|
61
|
-
- Included alternative installation methods
|
62
|
-
- Added note about externally-managed-environment errors
|
63
|
-
|
64
|
-
## Virtual Environment Detection
|
65
|
-
|
66
|
-
The system now checks for Python packages in this order:
|
67
|
-
1. **System Python3** - `python3`
|
68
|
-
2. **Scriptorium Virtual Environment** - `~/.scriptorium-python/bin/python`
|
69
|
-
3. **Common Virtual Environment Locations**:
|
70
|
-
- `~/.virtualenvs/scriptorium/bin/python`
|
71
|
-
- `~/venv/scriptorium/bin/python`
|
72
|
-
- `~/env/scriptorium/bin/python`
|
73
|
-
|
74
|
-
## Benefits of Virtual Environment Approach
|
75
|
-
|
76
|
-
1. **Isolation** - Scriptorium's Python dependencies don't conflict with system packages
|
77
|
-
2. **Clean Management** - Easy to recreate or update the environment
|
78
|
-
3. **No System Pollution** - Doesn't modify system Python installation
|
79
|
-
4. **Reproducible** - Same environment can be recreated on other systems
|
80
|
-
5. **Automatic Detection** - Scriptorium finds and uses the environment automatically
|
81
|
-
|
82
|
-
## User Experience
|
83
|
-
|
84
|
-
- **Simple Setup** - Just 4 commands to create and populate virtual environment
|
85
|
-
- **Transparent Usage** - Users don't need to manually activate environment
|
86
|
-
- **Automatic Detection** - Scriptorium handles environment selection
|
87
|
-
- **Clear Guidance** - Dependency checker provides specific setup instructions
|
88
|
-
|
89
|
-
## Testing Status
|
90
|
-
|
91
|
-
- **Virtual Environment Creation** - ✅ Tested and working
|
92
|
-
- **PRAW Installation** - ✅ Successfully installed in virtual environment
|
93
|
-
- **Automatic Detection** - ✅ Scriptorium finds virtual environment
|
94
|
-
- **Fallback Behavior** - ✅ Falls back to system Python if needed
|
95
|
-
- **Dependency Checker** - ✅ Correctly identifies PRAW availability
|
96
|
-
|
97
|
-
## Future Considerations
|
98
|
-
|
99
|
-
### Potential Enhancements
|
100
|
-
1. **Automated Setup Script** - Create virtual environment automatically
|
101
|
-
2. **Environment Management** - Commands to update/recreate environment
|
102
|
-
3. **Requirements File** - `requirements.txt` for reproducible installations
|
103
|
-
4. **Multiple Python Versions** - Support for different Python versions
|
104
|
-
|
105
|
-
### Maintenance Notes
|
106
|
-
- Virtual environment should be recreated if Python version changes
|
107
|
-
- Consider adding environment recreation to Scriptorium setup process
|
108
|
-
- Monitor for new Python packages that might need virtual environment
|
109
|
-
|
110
|
-
## Files Modified
|
111
|
-
|
112
|
-
### Updated Files
|
113
|
-
- `lib/scriptorium/reddit.rb` - Added virtual environment detection
|
114
|
-
- `scripts/check_dependencies.rb` - Enhanced Python package checking
|
115
|
-
- `doc/reddit_integration.md` - Added virtual environment instructions
|
116
|
-
|
117
|
-
### New Files
|
118
|
-
- None (enhancements to existing files)
|
119
|
-
|
120
|
-
## Key Takeaways
|
121
|
-
|
122
|
-
1. **Modern Python Protection** - PEP 668 prevents system-wide package installation
|
123
|
-
2. **Virtual Environments** - Best practice for Python package management
|
124
|
-
3. **Automatic Detection** - Scriptorium can find and use virtual environments
|
125
|
-
4. **User-Friendly** - Simple setup process with clear instructions
|
126
|
-
5. **Robust Fallback** - System continues to work even without virtual environment
|
127
|
-
|
128
|
-
## Next Steps for User
|
129
|
-
|
130
|
-
1. **Create Virtual Environment** - `python3 -m venv ~/.scriptorium-python`
|
131
|
-
2. **Install PRAW** - `source ~/.scriptorium-python/bin/activate && pip install praw`
|
132
|
-
3. **Test Integration** - Run dependency checker to verify setup
|
133
|
-
4. **Optional: Reddit Credentials** - Set up for actual Reddit autoposting
|
134
|
-
|
135
|
-
## Notes
|
136
|
-
|
137
|
-
- Virtual environment path: `~/.scriptorium-python/`
|
138
|
-
- Activation command: `source ~/.scriptorium-python/bin/activate`
|
139
|
-
- Deactivation command: `deactivate`
|
140
|
-
- Scriptorium automatically detects and uses this environment
|
141
|
-
- No manual activation needed for normal Scriptorium usage
|
@@ -1,211 +0,0 @@
|
|
1
|
-
# Theme Management Commands Implementation
|
2
|
-
|
3
|
-
**Date**: 2025-07-29 21:45:00
|
4
|
-
**Status**: Complete
|
5
|
-
**Feature**: Theme management CLI commands
|
6
|
-
|
7
|
-
## Overview
|
8
|
-
|
9
|
-
Successfully implemented theme management commands for Scriptorium CLI:
|
10
|
-
- `list themes` - List all available themes
|
11
|
-
- `clone <oldtheme> <newtheme>` - Clone an existing theme
|
12
|
-
|
13
|
-
## Implementation Details
|
14
|
-
|
15
|
-
### Commands Added
|
16
|
-
|
17
|
-
#### 1. `list themes`
|
18
|
-
- **Function**: Lists all available themes in the repository
|
19
|
-
- **Implementation**: Uses existing `@api.themes_available` method
|
20
|
-
- **Output**: Clean list format with bullet points
|
21
|
-
- **Error handling**: Shows "No themes found" if no themes exist
|
22
|
-
|
23
|
-
#### 2. `clone <oldtheme> <newtheme>`
|
24
|
-
- **Function**: Creates a copy of an existing theme
|
25
|
-
- **Parameters**:
|
26
|
-
- `oldtheme` - Source theme name
|
27
|
-
- `newtheme` - New theme name
|
28
|
-
- **Implementation**: Uses `FileUtils.cp_r` for recursive directory copying
|
29
|
-
- **Validation**: Checks source exists and target doesn't exist
|
30
|
-
- **Error handling**: Comprehensive error messages and validation
|
31
|
-
|
32
|
-
### Code Changes
|
33
|
-
|
34
|
-
#### CLI Integration (`bin/scriptorium`)
|
35
|
-
- **Command parsing**: Added multi-word command handling for theme commands
|
36
|
-
- **Help text**: Updated help menu to include theme commands
|
37
|
-
- **Method implementation**: Added `list_themes` and `clone_theme` methods
|
38
|
-
|
39
|
-
#### Command Structure
|
40
|
-
```ruby
|
41
|
-
# Multi-word command handling
|
42
|
-
elsif cmd == "list" && args.start_with?("themes")
|
43
|
-
list_themes
|
44
|
-
elsif cmd == "clone" && args.include?(" ")
|
45
|
-
clone_theme(args)
|
46
|
-
```
|
47
|
-
|
48
|
-
#### Help Menu Addition
|
49
|
-
```
|
50
|
-
list themes - List available themes
|
51
|
-
clone <old> <new> - Clone a theme
|
52
|
-
```
|
53
|
-
|
54
|
-
### Implementation Methods
|
55
|
-
|
56
|
-
#### `list_themes`
|
57
|
-
```ruby
|
58
|
-
private def list_themes
|
59
|
-
puts
|
60
|
-
themes = @api.themes_available
|
61
|
-
if themes.empty?
|
62
|
-
puts " No themes found"
|
63
|
-
else
|
64
|
-
puts " Available themes:"
|
65
|
-
themes.each do |theme|
|
66
|
-
puts " #{theme}"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
puts
|
70
|
-
end
|
71
|
-
```
|
72
|
-
|
73
|
-
#### `clone_theme`
|
74
|
-
```ruby
|
75
|
-
private def clone_theme(args)
|
76
|
-
parts = args.split(/\s+/)
|
77
|
-
if parts.length != 2
|
78
|
-
puts " Usage: clone <oldtheme> <newtheme>"
|
79
|
-
puts " Example: clone standard mytheme"
|
80
|
-
return
|
81
|
-
end
|
82
|
-
|
83
|
-
old_theme, new_theme = parts[0], parts[1]
|
84
|
-
|
85
|
-
# Validation and cloning logic
|
86
|
-
# Uses FileUtils.cp_r for recursive copying
|
87
|
-
end
|
88
|
-
```
|
89
|
-
|
90
|
-
## Features
|
91
|
-
|
92
|
-
### Validation
|
93
|
-
- **Source theme existence**: Checks if old theme exists before cloning
|
94
|
-
- **Target theme uniqueness**: Prevents overwriting existing themes
|
95
|
-
- **Parameter validation**: Ensures correct number of arguments
|
96
|
-
- **Usage guidance**: Provides clear usage examples
|
97
|
-
|
98
|
-
### User Experience
|
99
|
-
- **Clear output**: Consistent formatting with other CLI commands
|
100
|
-
- **Error messages**: Descriptive error messages for all failure cases
|
101
|
-
- **Success feedback**: Confirmation messages for successful operations
|
102
|
-
- **Help integration**: Commands documented in help menu
|
103
|
-
|
104
|
-
### File Operations
|
105
|
-
- **Recursive copying**: Uses `FileUtils.cp_r` for complete theme copying
|
106
|
-
- **Directory structure**: Preserves all theme files and subdirectories
|
107
|
-
- **Safe operations**: No destructive operations, only copying
|
108
|
-
|
109
|
-
## Testing
|
110
|
-
|
111
|
-
### Test Results
|
112
|
-
- **List themes**: ✅ Correctly lists available themes
|
113
|
-
- **Theme cloning**: ✅ Successfully clones themes with all files
|
114
|
-
- **Validation**: ✅ Properly validates source and target
|
115
|
-
- **Error handling**: ✅ Provides appropriate error messages
|
116
|
-
- **File preservation**: ✅ All theme files copied correctly
|
117
|
-
|
118
|
-
### Test Coverage
|
119
|
-
- **Empty themes**: Handles case when no themes exist
|
120
|
-
- **Invalid source**: Handles non-existent source themes
|
121
|
-
- **Existing target**: Prevents overwriting existing themes
|
122
|
-
- **File structure**: Verifies complete directory copying
|
123
|
-
|
124
|
-
## Usage Examples
|
125
|
-
|
126
|
-
### List Themes
|
127
|
-
```bash
|
128
|
-
scriptorium> list themes
|
129
|
-
Available themes:
|
130
|
-
standard
|
131
|
-
mytheme
|
132
|
-
```
|
133
|
-
|
134
|
-
### Clone Theme
|
135
|
-
```bash
|
136
|
-
scriptorium> clone standard mytheme
|
137
|
-
✅ Theme 'standard' cloned to 'mytheme'
|
138
|
-
Edit /path/to/themes/mytheme to customize your theme
|
139
|
-
```
|
140
|
-
|
141
|
-
### Error Cases
|
142
|
-
```bash
|
143
|
-
scriptorium> clone nonexistent mytheme
|
144
|
-
Theme 'nonexistent' not found
|
145
|
-
|
146
|
-
scriptorium> clone standard standard
|
147
|
-
Theme 'standard' already exists
|
148
|
-
|
149
|
-
scriptorium> clone standard
|
150
|
-
Usage: clone <oldtheme> <newtheme>
|
151
|
-
Example: clone standard mytheme
|
152
|
-
```
|
153
|
-
|
154
|
-
## Integration
|
155
|
-
|
156
|
-
### Existing API
|
157
|
-
- **Leverages existing**: Uses `@api.themes_available` method
|
158
|
-
- **Consistent patterns**: Follows existing CLI command patterns
|
159
|
-
- **Error handling**: Matches existing error handling approach
|
160
|
-
- **Output formatting**: Consistent with other list commands
|
161
|
-
|
162
|
-
### File System
|
163
|
-
- **PathSep conventions**: Uses proper PathSep `/` operator
|
164
|
-
- **Directory structure**: Works with existing theme directory structure
|
165
|
-
- **File permissions**: Preserves file permissions during copying
|
166
|
-
|
167
|
-
## Benefits
|
168
|
-
|
169
|
-
### For Users
|
170
|
-
1. **Easy theme discovery**: Quickly see available themes
|
171
|
-
2. **Simple theme creation**: Clone existing themes as starting points
|
172
|
-
3. **Safe operations**: No risk of losing existing themes
|
173
|
-
4. **Clear feedback**: Know exactly what happened
|
174
|
-
|
175
|
-
### For Development
|
176
|
-
1. **Consistent API**: Follows existing CLI patterns
|
177
|
-
2. **Maintainable code**: Clean, well-structured implementation
|
178
|
-
3. **Extensible**: Easy to add more theme management features
|
179
|
-
4. **Testable**: Comprehensive validation and error handling
|
180
|
-
|
181
|
-
## Future Enhancements
|
182
|
-
|
183
|
-
### Potential Additions
|
184
|
-
1. **Theme deletion**: `delete theme <name>` command
|
185
|
-
2. **Theme renaming**: `rename theme <old> <new>` command
|
186
|
-
3. **Theme validation**: Check theme structure and files
|
187
|
-
4. **Theme preview**: Show theme information and screenshots
|
188
|
-
5. **Theme import/export**: Backup and restore themes
|
189
|
-
|
190
|
-
### Considerations
|
191
|
-
- **Theme dependencies**: Check for theme usage in views
|
192
|
-
- **Backup creation**: Create backups before destructive operations
|
193
|
-
- **Theme metadata**: Store theme information and descriptions
|
194
|
-
- **Remote themes**: Support for downloading themes from repositories
|
195
|
-
|
196
|
-
## Files Modified
|
197
|
-
|
198
|
-
### Updated Files
|
199
|
-
- `bin/scriptorium` - Added theme management commands and help text
|
200
|
-
|
201
|
-
### New Files
|
202
|
-
- None (enhancements to existing CLI)
|
203
|
-
|
204
|
-
## Notes
|
205
|
-
|
206
|
-
- Commands follow existing Scriptorium CLI conventions
|
207
|
-
- Uses proper PathSep `/` operator for path construction
|
208
|
-
- Comprehensive error handling and user feedback
|
209
|
-
- Safe file operations with validation
|
210
|
-
- Integrated with existing help system
|
211
|
-
- Ready for production use
|
@@ -1,134 +0,0 @@
|
|
1
|
-
# Version Update to 0.6.0
|
2
|
-
|
3
|
-
**Date**: 2025-07-29 21:50:00
|
4
|
-
**Status**: Complete
|
5
|
-
**Feature**: Version update and API version method
|
6
|
-
|
7
|
-
## Overview
|
8
|
-
|
9
|
-
Successfully updated Scriptorium version from 0.0.3 to 0.6.0 and added a version method to the API class.
|
10
|
-
|
11
|
-
## Changes Made
|
12
|
-
|
13
|
-
### 1. Version Update
|
14
|
-
- **File**: `lib/scriptorium/version.rb`
|
15
|
-
- **Change**: Updated `VERSION` constant from `"0.0.3"` to `"0.6.0"`
|
16
|
-
- **Impact**: All version references throughout the system now show 0.6.0
|
17
|
-
|
18
|
-
### 2. API Version Method
|
19
|
-
- **File**: `lib/scriptorium/api.rb`
|
20
|
-
- **Addition**: Added `version` method that returns `Scriptorium::VERSION`
|
21
|
-
- **Purpose**: Provides programmatic access to version information via API
|
22
|
-
|
23
|
-
## Implementation Details
|
24
|
-
|
25
|
-
### Version File Update
|
26
|
-
```ruby
|
27
|
-
# lib/scriptorium/version.rb
|
28
|
-
module Scriptorium
|
29
|
-
VERSION = "0.6.0"
|
30
|
-
end
|
31
|
-
```
|
32
|
-
|
33
|
-
### API Version Method
|
34
|
-
```ruby
|
35
|
-
# lib/scriptorium/api.rb
|
36
|
-
def version
|
37
|
-
Scriptorium::VERSION
|
38
|
-
end
|
39
|
-
```
|
40
|
-
|
41
|
-
## Version Usage Points
|
42
|
-
|
43
|
-
### CLI Version Display
|
44
|
-
- **File**: `bin/scriptorium`
|
45
|
-
- **Method**: `show_version`
|
46
|
-
- **Code**: `puts " Scriptorium #{Scriptorium::VERSION}"`
|
47
|
-
- **Result**: CLI `version` command now shows "Scriptorium 0.6.0"
|
48
|
-
|
49
|
-
### API Access
|
50
|
-
- **Method**: `api.version`
|
51
|
-
- **Returns**: `"0.6.0"`
|
52
|
-
- **Use Case**: Programmatic version checking in scripts and integrations
|
53
|
-
|
54
|
-
### Test Integration
|
55
|
-
- **File**: `test/unit/repo.rb`
|
56
|
-
- **Test**: `test_001_version`
|
57
|
-
- **Verification**: Ensures version is valid numeric format
|
58
|
-
|
59
|
-
## Testing Results
|
60
|
-
|
61
|
-
### Version File
|
62
|
-
- ✅ **Version constant**: Correctly updated to "0.6.0"
|
63
|
-
- ✅ **Module structure**: Properly defined in Scriptorium module
|
64
|
-
- ✅ **Accessibility**: Can be accessed via `Scriptorium::VERSION`
|
65
|
-
|
66
|
-
### CLI Integration
|
67
|
-
- ✅ **Version command**: Will display "Scriptorium 0.6.0"
|
68
|
-
- ✅ **Help integration**: Version information available in CLI
|
69
|
-
- ✅ **Consistent formatting**: Matches existing CLI output style
|
70
|
-
|
71
|
-
### API Method
|
72
|
-
- ✅ **Method addition**: `version` method added to API class
|
73
|
-
- ✅ **Return value**: Returns correct version string
|
74
|
-
- ✅ **Integration**: Uses existing Scriptorium::VERSION constant
|
75
|
-
|
76
|
-
## Version Significance
|
77
|
-
|
78
|
-
### Major Version Jump
|
79
|
-
- **From**: 0.0.3 (very early development)
|
80
|
-
- **To**: 0.6.0 (significant feature maturity)
|
81
|
-
- **Indicates**: Major feature additions and stability improvements
|
82
|
-
|
83
|
-
### Recent Major Features
|
84
|
-
1. **Reddit Integration** - Complete autoposting system
|
85
|
-
2. **Dependency Management** - Comprehensive dependency checking
|
86
|
-
3. **Theme Management** - CLI commands for theme operations
|
87
|
-
4. **API Maturity** - Extensive API with 15+ methods
|
88
|
-
5. **Testing Infrastructure** - 1,348 assertions across 355 tests
|
89
|
-
|
90
|
-
## Compatibility
|
91
|
-
|
92
|
-
### Backward Compatibility
|
93
|
-
- ✅ **API compatibility**: All existing API methods unchanged
|
94
|
-
- ✅ **CLI compatibility**: All existing CLI commands work
|
95
|
-
- ✅ **File format compatibility**: No breaking changes to file formats
|
96
|
-
- ✅ **Configuration compatibility**: Existing configs still valid
|
97
|
-
|
98
|
-
### Version Checking
|
99
|
-
- **API method**: `api.version` for programmatic checking
|
100
|
-
- **CLI command**: `version` or `v` for user checking
|
101
|
-
- **Constant access**: `Scriptorium::VERSION` for direct access
|
102
|
-
|
103
|
-
## Files Modified
|
104
|
-
|
105
|
-
### Updated Files
|
106
|
-
- `lib/scriptorium/version.rb` - Version constant updated to 0.6.0
|
107
|
-
- `lib/scriptorium/api.rb` - Added version method
|
108
|
-
|
109
|
-
### Affected Files (no changes needed)
|
110
|
-
- `bin/scriptorium` - Already uses Scriptorium::VERSION
|
111
|
-
- `test/unit/repo.rb` - Already tests version format
|
112
|
-
|
113
|
-
## Future Version Management
|
114
|
-
|
115
|
-
### Versioning Strategy
|
116
|
-
- **Semantic versioning**: Major.Minor.Patch format
|
117
|
-
- **Feature releases**: Increment minor version for new features
|
118
|
-
- **Breaking changes**: Increment major version for incompatible changes
|
119
|
-
- **Bug fixes**: Increment patch version for fixes
|
120
|
-
|
121
|
-
### Version Update Process
|
122
|
-
1. **Update version constant** in `lib/scriptorium/version.rb`
|
123
|
-
2. **Test version display** in CLI
|
124
|
-
3. **Verify API method** returns correct version
|
125
|
-
4. **Update documentation** if needed
|
126
|
-
5. **Create release notes** for significant changes
|
127
|
-
|
128
|
-
## Notes
|
129
|
-
|
130
|
-
- Version 0.6.0 represents significant maturity in the Scriptorium project
|
131
|
-
- API version method provides programmatic access for integrations
|
132
|
-
- CLI version command automatically shows updated version
|
133
|
-
- All existing functionality remains compatible
|
134
|
-
- Ready for production use with comprehensive feature set
|