From 4327e150cd8160e3762830380a09419bc3e75cca Mon Sep 17 00:00:00 2001 From: nomike Date: Sun, 11 May 2025 03:25:49 +0200 Subject: [PATCH 1/3] Doc: Document versionng scheme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d3bd4cc..6e007d1 100644 --- a/README.md +++ b/README.md @@ -145,3 +145,15 @@ This template is used to render error pages (e.g. HTTP/404). Optionally you could create templates for specific erro codes. The name has to be [errorcode].html (e.g. '404.html'). If no specific error template is found, sscm falls back to 'error.html'. + +## Development + +### Versioning + +This project uses [EffVer](https://jacobtomlinson.dev/effver/). + +Version numbers are comprised of three parts: Macro, Meso, Micro. + +If the macro version is incremented, expect a lare effort when upgrading. +Meso version increments are usually small changes, but may require some effort. +Micro version increments are usually bugfixes or small changes, which should not require any effort when upgrading. From fd9cc8bc55ec40677fea707ba6773eb2d5eaea07 Mon Sep 17 00:00:00 2001 From: nomike Date: Sun, 11 May 2025 03:26:43 +0200 Subject: [PATCH 2/3] Add support for org-files. Squashed commit of the following: commit 05d64a06e8712bfc40ca3431e6567921cb23b6f5 Author: nomike Date: Sun May 11 03:21:00 2025 +0200 Add: Detect and properly render index.org files commit 9b9bb76a50bed30f86e7940261a1f10d7dbec6c8 Author: nomike Date: Sun May 11 03:20:38 2025 +0200 Change: Do not list index.org files in directory listings commit a501436e97e284247e6fc5fa660ef77e0291bc96 Author: nomike Date: Sun May 11 03:20:05 2025 +0200 Import orgpython in templatehelper commit 020310de96d0836c042a7211d17e20a7ca868011 Author: nomike Date: Sun May 11 03:19:35 2025 +0200 Add org-python to requirements. --- requirements.txt | 1 + templatehelper.py | 6 ++++-- templates/nomike.com/directory.html | 7 ++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7d10615..a6212a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ flask markdown +org-python pyyaml regex diff --git a/templatehelper.py b/templatehelper.py index 068855b..49860b3 100644 --- a/templatehelper.py +++ b/templatehelper.py @@ -24,6 +24,8 @@ # pylint: disable=unused-import import markdown +# pylint: disable=unused-import +import orgpython import regex import yaml @@ -80,7 +82,7 @@ def listdir(path): If a file named "index" is present, it is supposed to be rendered as the main content of the page and thus it will be ommited from the list as well. """ - ignorelist = ['index', 'index.md', '*.scmsfasicon', '*.scmstarget'] + ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')): with open( os.path.join(pathprefix, path, '.scmsignore'), @@ -113,7 +115,7 @@ def listchildren(path): If a file named "index" is present, it is supposed to be rendered as the main content of the page and thus it will be ommited from the list as well. """ - ignorelist = ['index', 'index.md', '*.scmsfasicon', '*.scmstarget'] + ignorelist = ['index', 'index.md', 'index.org', '*.scmsfasicon', '*.scmstarget'] if os.path.exists(os.path.join(pathprefix, path, '.scmsignore')): with open( os.path.join(pathprefix, path, '.scmsignore'), diff --git a/templates/nomike.com/directory.html b/templates/nomike.com/directory.html index 755514d..fc513e5 100644 --- a/templates/nomike.com/directory.html +++ b/templates/nomike.com/directory.html @@ -12,7 +12,8 @@ {{ name }} {% else %} {{ name }} {% endif %} {% endfor %} - {% endif -%} {% endblock -%} {% block content -%} {% if templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path,'index.md')) -%} {{ templatehelper.markdown.markdown(templatehelper.readfile(templatehelper.os.path.join(pathprefix,path,'index.md')),extensions=['fenced_code','toc','tables']) - | safe }} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path, 'index')) -%} {{ templatehelper.readfile(templatehelper.os.path.join(pathprefix, path, 'index')) | safe -}} {% else -%} + {% endif -%} {% endblock -%} {% block content -%} {% if templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path,'index.org')) -%} {{ templatehelper.orgpython.to_html(templatehelper.readfile(templatehelper.os.path.join(pathprefix,path,'index.org'))) + | safe }} {% elif templatehelper.os.path.isfile(templatehelper.os.path.join(pathprefix, path,'index.md')) -%} {{ templatehelper.markdown.markdown(templatehelper.readfile(templatehelper.os.path.join(pathprefix,path,'index.md')),extensions=['fenced_code','toc','tables']) + | safe }} {% else -%}

/{{ path }}

- {% endif -%} {% if templatehelper.os.path.isdir(templatehelper.os.path.join(pathprefix, path, 'image')) %} {% include templatehelper.os.path.join(templatehelper.config['template'], 'gallery.html') %} {% endif %} {% endblock %} \ No newline at end of file + {% endif -%} {% if templatehelper.os.path.isdir(templatehelper.os.path.join(pathprefix, path, 'image')) %} {% include templatehelper.os.path.join(templatehelper.config['template'], 'gallery.html') %} {% endif %} {% endblock %} From f455179a2b8879d34246ce0b9b233f62fa905882 Mon Sep 17 00:00:00 2001 From: nomike Date: Sun, 11 May 2025 03:30:39 +0200 Subject: [PATCH 3/3] Update changelog. --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a4a87..1a33b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.1.0](https://github.com/nomike/scms/releases/tag/1.1.0) - 2025-05-11 + +[Compare with 1.0.0](https://github.com/nomike/scms/compare/1.0.0...1.1.0) + +This release adds support for org-files, which are a popular format for notes and task management. +So instead of 'index' or 'index.md' files, you can now also use 'index.org'. + +This release adds `org-python` as a requirement. Be sure to run +`pip install -r requirements.txt --upgrade` in your virtual environment to install the new +dependency. + +Depending on your setup, you might also want to `killall scms.fcgi` to force the webserver to +reload the application. + +### Added + +- Add support for org-files. ([fd9cc8b](https://github.com/nomike/scms/commit/fd9cc8bc55ec40677fea707ba6773eb2d5eaea07) by nomike). + ## [1.0.0](https://github.com/nomike/scms/releases/tag/1.0.0) - 2025-05-11 [Compare with first commit](https://github.com/nomike/scms/compare/a880905b6acb03a98f817cde20d1dc552536e7e1...1.0.0)