From 45f9f608d39289131548a0e1d7962617cf3c028e Mon Sep 17 00:00:00 2001 From: Qrius Date: Wed, 23 Apr 2025 14:25:05 +0200 Subject: Prepare deb packaging, switch markdown dependency --- .gitignore | 4 ++ Makefile | 40 -------------------- README | 92 ++++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 5 +++ debian/compat | 1 + debian/control | 12 ++++++ debian/files | 2 + debian/rules | 7 ++++ pyproject.toml | 6 +-- setup.py | 8 ++++ src/skaldpress/__init__.py | 3 +- src/smp/__init__.py | 1 - src/smp/builtins.py | 16 ++++---- 13 files changed, 142 insertions(+), 55 deletions(-) delete mode 100644 Makefile create mode 100644 README create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/files create mode 100755 debian/rules create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index ddc2bd1..0b0b91b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ venv/ # due to using nox and pytest .nox .cache +debian/skaldpress/ +debian/.debhelper/ +debian/debhelper-build-stamp +debian/skaldpress.substvars diff --git a/Makefile b/Makefile deleted file mode 100644 index 8394bbf..0000000 --- a/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -.PHONY: test build minorbump publish install clean - -venv/bin/tt: src/timetracker/*.py venv - . venv/bin/activate && \ - python -m pip install -e .[dev] - -venv: pyproject.toml - python3 -m venv venv - -build: venv - . venv/bin/activate && \ - python -m pip install build twine && \ - python -m build && \ - python -m twine check dist/* - -minorbump: - . venv/bin/activate && \ - bumpver update --patch - -publish: minorbump build - . venv/bin/activate && \ - twine upload dist/* - -install: venv - python -m pip install . - -clean: - rm -rf venv - rm -rf dist - -test: - . venv/bin/activate && \ - black --check src && \ - mypy src/ && \ - pyflakes src/ && \ - ./tests/test_macro_processor.sh && \ - ./tests/test_skaldpress.sh && \ - ./tests/test_unittests.sh - - diff --git a/README b/README new file mode 100644 index 0000000..713429f --- /dev/null +++ b/README @@ -0,0 +1,92 @@ +SMP(1) General Commands Manual SMP(1) + +name + Skaldpress Macro Processor - Macro processor + +SYNOPSIS + smp [input_file] + +DESCRIPTION + smp smp is a macro processor, made specifically for a usecase when doing templating of websites. + + Macros + include() + Includes a file in-place, performing macro-expansion on it. NOTE, THERE IS NO LOOP PROTECTION HERE! + + include_varbatim() + Same as include, but does not expand macros. + + define( [, ]) + This defines a macro, optionally with some content. The optional content will be expanded immediately, and later the already processed content will be included in the output. + + ifdef(, [, ]) + + ifndef(, [, ]) + + ifeq(, , [, ]) + + ifneq(, , [, ]) + + shell() + Runs command on shell, and includes the command output in the output + + expr(, , ..., ) + Shorthand for running the expr command, expands all arguments, and executes it on the shell. + + define_array() + Defines a macro as a array, this can later be used with macros like array_push and array_each. + + array_push(, [, ]) + On a macro that is defined as a array, this will add one or more elements. + + array_each(,