{"id":23284047,"url":"https://github.com/tnahs/printqr","last_synced_at":"2025-04-06T15:14:54.796Z","repository":{"id":267648948,"uuid":"894036457","full_name":"tnahs/PrintQR","owner":"tnahs","description":"Generate QR Codes for 3D Prints","archived":false,"fork":false,"pushed_at":"2025-03-27T14:28:18.000Z","size":536,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T15:35:01.832Z","etag":null,"topics":["3d-printing","qr-code","qr-code-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tnahs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-25T16:30:51.000Z","updated_at":"2025-03-27T14:28:22.000Z","dependencies_parsed_at":"2024-12-11T16:27:50.001Z","dependency_job_id":"456f219a-fce3-4c98-86ee-ce993fd4eaf5","html_url":"https://github.com/tnahs/PrintQR","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"59e54b0e0748d8e4146b6dfe8ea1e7d766ea022e"},"previous_names":["tnahs/printqr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnahs%2FPrintQR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnahs%2FPrintQR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnahs%2FPrintQR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnahs%2FPrintQR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tnahs","download_url":"https://codeload.github.com/tnahs/PrintQR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500474,"owners_count":20948880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","qr-code","qr-code-generator"],"created_at":"2024-12-20T01:37:22.966Z","updated_at":"2025-04-06T15:14:54.779Z","avatar_url":"https://github.com/tnahs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./images/logo-light.png#gh-light-mode-only\"\u003e\n    \u003cimg src=\"./images/logo-dark.png#gh-dark-mode-only\"\u003e\n\u003c/div\u003e\n\u003ch1 align=\"center\"\u003ePrintQR - Generate QR Codes for 3d prints\u003c/h1\u003e\n\n## Installation\n\nThe recommended method for installation requires [`uv`][uv]. This allows us to easily install\n`PrintQR` into its own virtual environment with the correct version of python and add it to `PATH`.\n\nIf that's not possible, a `requirements.txt` file is included for a manual installation using `pip`.\n\n1. Install `uv`.\n\n   See the [uv docs][uv] for the latest instructions.\n\n2. Clone this repo.\n\n   ```shell\n   $ git clone https://github.com/tnahs/PrintQR\n   $ cd PrintQR\n   ```\n\n3. Install using `uv`.\n\n   ```shell\n   $ uv tool install . --force --no-cache\n   ```\n\n4. Check the installation.\n\n   ```shell\n    $ pqr --version\n   ```\n\n5. Initialize `PrintQR`. This creates a `~/.pqr` directory and a `config.toml` file.\n\n   ```shell\n   $ pqr init\n\n      ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n      ┃                                                ┃\n      ┃   Initializing user config file in ~/.pqr...   ┃\n      ┃                                                ┃\n      ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n\n      Created directory ~/.pqr.\n      Created file config.toml.\n\n   $ tree ~/.pqr\n   .pqr\n   └── config.toml\n   ```\n\n6. That's it! Run `--help` to see available options.\n\n   ```shell\n   $ pqr --help\n   ```\n\n## Available Fields\n\nYou can access the available template fields table using:\n\n```shell\n$ pqr info fields\n```\n\n```plaintext\n                       Available template fields for generating image, TOML and GCode filenames.\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Category  Name                  Short Name  Format String                  Type   Unit   Description          ┃\n┠───────────────────────────────────────────────────────────────────────────────────────────────────────────────┨\n┃ filament  name                  -           {filament-name}                str    -      Filament name        ┃\n┃ filament  brand                 fb          {filament-brand}               str    -      Filament brand       ┃\n┃ filament  material              fm          {filament-material}            str    -      Filament material    ┃\n┠───────────────────────────────────────────────────────────────────────────────────────────────────────────────┨\n┃ printer   name                  -           {printer-name}                 str    -      Printer name         ┃\n┃ printer   nozzle-size           ns          {printer-nozzle-size}          float  mm     Nozzle size          ┃\n┃ printer   nozzle-type           nt          {printer-nozzle-type}          str    -      Nozzle type          ┃\n┠───────────────────────────────────────────────────────────────────────────────────────────────────────────────┨\n┃ slicer    name                  -           {slicer-name}                  str    -      Slicer name          ┃\n┃ slicer    setting-preset        sp          {slicer-setting-preset}        str    -      Setting preset       ┃\n┃ slicer    filament-preset       fp          {slicer-filament-preset}       str    -      Filament preset      ┃\n┃ slicer    printer-preset        pp          {slicer-printer-preset}        str    -      Printer preset       ┃\n┃ slicer    max-volumetric-speed  vs          {slicer-max-volumetric-speed}  int    mm³/s  Max volumetric speed ┃\n┃ slicer    layer-height          lh          {slicer-layer-height}          float  mm     Layer height         ┃\n┃ slicer    nozzle-temp           nt          {slicer-nozzle-temp}           int    °C     Nozzle temp          ┃\n┃ slicer    bed-temp              bt          {slicer-bed-temp}              int    °C     Bed temp             ┃\n┃ slicer    print-time            pt          {slicer-print-time}            str           Print time           ┃\n┠───────────────────────────────────────────────────────────────────────────────────────────────────────────────┨\n┃ misc      date                  -           {misc-date}                    str    -      Current date         ┃\n┃ misc      notes                 -           {misc-notes}                   str    -      Notes                ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n```\n\n## Encoding Schemas\n\n### As `toml`\n\n```toml\n[filament]\nname = \"\"\nbrand = \"\"\nmaterial = \"\"\n\n[printer]\nname = \"\"\nnozzle-size = 0.0\nnozzle-type = \"\"\n\n[slicer]\nname = \"\"\nsetting-preset = \"\"\nfilament-preset = \"\"\nprinter-preset = \"\"\nmax-volumetric-speed = 0\nlayer-height = 0.0\nnozzle-temp = 0\nbed-temp = 0\nprint-time = \"\"\n\n[misc]\ndate = \"\"\nnotes = \"\"\n```\n\n#### `toml` Example\n\n```toml\n[filament]\nname = \"Galaxy Black\"\nbrand = \"Prusament\"\nmaterial = \"PLA\"\n\n[printer]\nname = \"Prusa MK4S\"\nnozzle-size = 0.4\nnozzle-type = \"HF ObXidian\"\n\n[slicer]\nname = \"PrusaSlicer\"\nmax-volumetric-speed = 24\nlayer-height = 0.25\nnozzle-temp = 230\nbed-temp = 60\nprint-time = \"00:42\"\n```\n\n### As `compact`\n\n```plaintext\n{filament-name}\n  fb={filament-brand}\n  fm={filament-material}\n{printer-name}\n  ns={nozzle-size}\n  nt={nozzle-type}\n{slicer-name}\n  sp={setting-preset}\n  fp={filament-preset}\n  pp={printer-preset}\n  mv={max-volumetric-speed}\n  lh={layer-height}\n  nt={nozzle-temp}\n  bt={bed-temp}\n  pt={print-time}\n{date}\n{notes}\n```\n\n#### `compact` Example\n\n```plaintext\nGalaxy Black\n  fn=Prusament\n  fm=PLA\nPrusa MK4S\n  ns=0.4\n  nt=HF ObXidian\nPrusaSlicer\n  mv=24\n  lh=0.25\n  nt=230\n  bt=60\n  pt=00:42\n```\n\n## Adding a Field\n\nFor most cases, adding a new field is relatively easy.\n\n1. Add the new field to [`print-settings.toml`][print-settings]\n2. Add its default value to [`config.toml`][config]\n3. Reinstall the application.\n4. Add your default for the field in your `config.toml`.\n\n### [`print-settings.toml`][print-settings]\n\nAll fields and their associate attributes are defined in this file. A single field is defined as a\ndictionary in a list named `print-settings`. See [`print-settings.toml`][print-settings] for more\nexamples.\n\n```toml\n[[print-settings]]\n\n# Must be in \"kebab-case\".\nname = \"extrusion-width\"\n\n# Must be one of:\n#\n#   \"filament\"\n#   \"printer\"\n#   \"slicer\"\n#   \"misc\"\n#\ncategory = \"slicer\"\n\n# A valid Python type. This type is used when validating values passed into the\n# filed. The value defined here is passed to `eval` to retrieve the type.\n#\n# Must be one of:\n#\n#   \"str\"\n#   \"int\"\n#   \"float\"\n#\ntype = \"float\"\n\n# This is a two-character abbreviation of the field name.\ncompact-name = \"ew\"\n\n# The unit of measurement. For display purposes only.\nunit = \"\"\n\n# The field's description.\ndescription = \"filament preset\"\n```\n\n### [`config.toml`][config]\n\nThe field's default value is defined in this file within the `print-settings` dictionary.\n\nWhen the application starts, this file is copied to the user's config directory (`~./pqr`) if\nit doesn't already exist there. It's important to add the default value to the application's\n[`config.toml`][config] and not just your own. The application's [`config.toml`][config] acts as a\nfallback for any values not defined in the user's `config.toml`.\n\n[config]: ./src/pqr/data/config.toml\n[print-settings]: ./src/pqr/data/print-settings.toml\n[uv]: https://docs.astral.sh/uv/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnahs%2Fprintqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftnahs%2Fprintqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnahs%2Fprintqr/lists"}