From 44b538fcbde6f840d58cf55a2adb725b0fc0c6cf Mon Sep 17 00:00:00 2001 From: Sebastian Andersson Date: Wed, 6 Mar 2024 13:19:38 +0100 Subject: [PATCH] Add --help output to README, fix superslicer reference --- README.md | 30 ++++++++++++++++++++++++------ spoolman2slicer.py | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bb1b0b8..20a78ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,28 @@ # Spoolman to slicer filament transfer Create [SuperSlicer](https://github.com/supermerill/SuperSlicer) filament configuration from the filaments in [Spoolman](https://github.com/Donkie/Spoolman). +## Usage + +```sh +usage: spoolman2slicer.py [-h] [--version] -d DIR + [-s {orcaslicer,prusaslicer,sl1cer,superslicer}] + [-u URL] [-U] [-D] + +Fetches filaments from Spoolman and creates slicer filament config files. + +options: + -h, --help show this help message and exit + --version show program's version number and exit + -d DIR, --dir DIR the filament config dir + -s {orcaslicer,prusaslicer,sl1cer,superslicer}, --slicer {orcaslicer,prusaslicer,sl1cer,superslicer} + the slicer + -u URL, --url URL URL for the Spoolman installation + -U, --updates keep running and update filament configs if they're + updated in Spoolman + -D, --delete-all delete all filament configs before adding existing + ones +``` + ## Prepare for running Run: @@ -19,11 +41,7 @@ it creates. They are stored with the filaments' material's name in ## Run ```sh -./spoolman2slicer.py -d ~/.config/SuperSlicer/filament/ +./spoolman2slicer.py -U -d ~/.config/SuperSlicer/filament/ ``` -If `-D` is given, all ini files are removed in the directory before -the new ones are created. - -`-U` will cause the program to keep running, adding, updating and -deleting files when the filaments are changed in Spoolman. +See the other options above. diff --git a/spoolman2slicer.py b/spoolman2slicer.py index 820db6f..86db0ad 100755 --- a/spoolman2slicer.py +++ b/spoolman2slicer.py @@ -24,7 +24,7 @@ SUPERSLICER = "superslicer" parser = argparse.ArgumentParser( - description="Fetches filaments from Spoolman and creates SuperSlicer filament configs.", + description="Fetches filaments from Spoolman and creates slicer filament config files.", ) parser.add_argument("--version", action="version", version="%(prog)s 0.0.1")