From f824b13a27f2e97b2d65a10f603d2c89637bd435 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 23 Nov 2025 12:13:12 +0100 Subject: [PATCH 1/3] Strip whitespace on inline slide fillers --- slides.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides.py b/slides.py index 4ade96a..a29f3b9 100755 --- a/slides.py +++ b/slides.py @@ -26,7 +26,7 @@ def compile_slide(slide, root_directory): # very unelegant attempt at inline elements inline_key = '@' + key + '(inline)' if inline_key in slide: - filler_without_outer_paragraph = re.sub(r"

(.+)

", r"\1", filler, flags=re.DOTALL) + filler_without_outer_paragraph = re.sub(r"

(.+)

", r"\1", filler, flags=re.DOTALL).strip() slide = slide.replace( inline_key, filler_without_outer_paragraph From 9e06336cbcc9b38cff15c32ff2e66b236b0caee8 Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 23 Nov 2025 12:20:50 +0100 Subject: [PATCH 2/3] Update docs and unify flag names --- README.md | 4 +++- main.py | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9431db0..d7f6ba7 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This program is meant to be used as a git submodule of your actual presentation ```sh git submodule add -b release git@path-to-onpoint.git -```` +``` Make sure to have python3 and pandoc (the same version for all developers!) installed. Next, we can install all requirements: @@ -18,6 +18,8 @@ cd onpoint pip3 install -r requirements.txt ``` +To compile, run `python3 main.py $root_directory`. You will have to pass `--no-help-menu` to compile the slides in the `test` folder of this development repository. Use `python3 main.py -h` to learn more about all available optional parameters. + ## The Project Structure We recommend you to structure your project directory like this: diff --git a/main.py b/main.py index bc506ad..7f6c107 100755 --- a/main.py +++ b/main.py @@ -12,7 +12,7 @@ import helper # stores it in a corresponding slides.lang.html file inside the same directory. -def compile(root, language='en', force_recompile=False, lazyload_images=False, no_helpmenu=False): +def compile(root, language='en', force_recompile=False, lazyload_images=False, no_help_menu=False): wrapper = open(os.path.join(root, 'layouts/root.html'), 'r', encoding='utf8').read() compiled_chapters = chapters.compile_chapters(root, language, force_recompile) wrapper = wrapper.replace('@slides', compiled_chapters) @@ -20,7 +20,7 @@ def compile(root, language='en', force_recompile=False, lazyload_images=False, n wrapper = fragments.defragmentize(wrapper) wrapper = helper.add_lazyload(wrapper, lazyload_images) - if not no_helpmenu: + if not no_help_menu: with open(os.path.join(root, 'slides.' + language + '.html'), 'w+') as output: wrapper = helper.add_help_menu(wrapper, root) @@ -31,24 +31,24 @@ def compile(root, language='en', force_recompile=False, lazyload_images=False, n if __name__ == '__main__': parser = argparse.ArgumentParser() - parser.add_argument("rootdirectory", help="your project's root directory") + parser.add_argument("root_directory", help="your project's root directory") parser.add_argument("-l", "--language", default="all", help="the presentation language (default: all)") parser.add_argument("-f", "--force-recompile", action='store_true', help="recompile the entire presentation without caches") parser.add_argument("-i", "--lazyload-images", action='store_true', help="replace all images' src attributes by data-src for image lazyloading") - parser.add_argument("-n", "--nohelpmenu", action="store_true", help="do not compile the help menu") + parser.add_argument("-n", "--no-help-menu", action="store_true", help="do not compile the help menu") args = parser.parse_args() force_recompile = False or args.force_recompile lazyload_images = False or args.lazyload_images - no_helpmenu = False or args.nohelpmenu + no_help_menu = False or args.no_help_menu if args.language == "all": - for language in helper.get_available_languages(args.rootdirectory): - compile(args.rootdirectory, language=language, - force_recompile=force_recompile, lazyload_images=lazyload_images, no_helpmenu=no_helpmenu) + for language in helper.get_available_languages(args.root_directory): + compile(args.root_directory, language=language, + force_recompile=force_recompile, lazyload_images=lazyload_images, no_help_menu=no_help_menu) else: - compile(args.rootdirectory, language=args.language, - force_recompile=force_recompile, lazyload_images=lazyload_images, no_helpmenu=no_helpmenu) + compile(args.root_directory, language=args.language, + force_recompile=force_recompile, lazyload_images=lazyload_images, no_help_menu=no_help_menu) From 60df66dec95dfa3dd1011b2f815fc89b4db107fd Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 23 Nov 2025 12:32:07 +0100 Subject: [PATCH 3/3] Increase pointer size --- test/images/pointer.svg | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/test/images/pointer.svg b/test/images/pointer.svg index f896715..69d13f1 100644 --- a/test/images/pointer.svg +++ b/test/images/pointer.svg @@ -1,24 +1,18 @@ - - - - - - + xmlns:svg="http://www.w3.org/2000/svg" +> +