{"id":22825425,"url":"https://github.com/crabdancing/phomemo-d30","last_synced_at":"2025-04-14T02:11:41.245Z","repository":{"id":184107375,"uuid":"671319642","full_name":"crabdancing/phomemo-d30","owner":"crabdancing","description":"simple CLI userspace driver/app for the Phomemo D30 printer","archived":false,"fork":false,"pushed_at":"2024-02-07T01:30:59.000Z","size":496,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T20:56:49.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crabdancing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-07-27T03:55:31.000Z","updated_at":"2024-04-03T07:45:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"31a5f8a3-5d3c-476d-9800-5ce4952efa80","html_url":"https://github.com/crabdancing/phomemo-d30","commit_stats":null,"previous_names":["alxpettit/phomemo-d30","a7287/phomemo-d30"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabdancing%2Fphomemo-d30","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabdancing%2Fphomemo-d30/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabdancing%2Fphomemo-d30/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabdancing%2Fphomemo-d30/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crabdancing","download_url":"https://codeload.github.com/crabdancing/phomemo-d30/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247578424,"owners_count":20961263,"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":[],"created_at":"2024-12-12T17:10:46.014Z","updated_at":"2025-04-14T02:11:41.224Z","avatar_url":"https://github.com/crabdancing.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phomemo-d30\n\nLibrary \u0026 utilities for controlling the [Phomemo D30](https://phomemo.com/products/d30-label-maker) label maker, using a reverse engineered protocol.\n\nThis library contains components heavily based on code available in the [polskafan phomemo_d30](https://github.com/polskafan/phomemo_d30) repo,\nbut takes no code directly from said library. That library in turn is based heavily on the work of others,\nincluding [viver](https://github.com/vivier/phomemo-tools) and [theacodes](https://github.com/theacodes/phomemo_m02s).\n\nThe gist of it is that there are several magic sequences sent to the appliance by their 'Print Master' Android app. These were sniffed,\nand now can be blindly transmitted by a number of scripts and utilities available on Github. This is one such utility.\n\n# Usage\n\n## CLI usage (imperative)\n```sh\ncargo install d30-cli\n\n# if using internal preview mechanism (\"show_preview\")\ncargo install d30-cli-preview\n\n# Once installed\nd30-cli --help\n```\n\n\n## CLI usage (dev, imperative)\n\n```sh\ngit clone 'https://github.com/crabdancing/phomemo-d30'\ncd phomemo-d30\ncargo run --bin d30-cli -- [ARGS]\n```\n\n## CLI usage (dev, declarative)\n\n```sh\ngit clone 'https://github.com/crabdancing/phomemo-d30'\ncd phomemo-d30\nnix develop\ncargo run --bin d30-cli -- [ARGS]\n```\n\n\n\n## CLI usage (declarative, Nix)\n\n```\nnix run github:crabdancing/phomemo-d30\n```\n\nThis will fetch dependencies, compile, and run the program all in one go.\n\n## Configuration (imperative)\n\nThe program will work without any on-disk config, but if you want to use some of the more sophisticated features, here's a brief explanation of the current state of affairs.\n\nThere are two config files. On Linux, they are stored under `$XDG_CONFIG_HOME/phomemo-library`. On most systems, that will be `~/.config/phomemo-library` -- so I'll be using that path in this mini-guide to make this more concrete.\n\nUnder this directory, it expects two config files. One is for the library itself:\n\n`~/.config/phomemo-library/phomemo-config.toml`\n\n\nThe next file is for the CLI component:\n\n`~/.config/phomemo-library/phomemo-cli-config.toml`\n\nCheck [example-config](https://github.com/crabdancing/phomemo-d30/tree/master/example-config) directory for working example files.\n\n## Configuration, declarative (via NixOS \u0026 system flake)\n\nAdd to your flake inputs:\n\n```nix\ninputs = {\n  # Somewhere in your `inputs` context, put a `phomemo-d30` input:\n  phomemo-d30.url = \"github:crabdancing/phomemo-d30\";\n};\n```\n\nInsert module into `sharedModules`:\n\n\n```nix\n{pkgs, ...}: {\n  config = {\n    home-manager.sharedModules = [\n      inputs.phomemo-d30.homeManagerModules.default\n    ];\n  };\n}\n```\n\nIn home-manager context, you can then configure via:\n\n```nix\nprograms.phomemo-d30 = {\n  enable = true;\n  default_device = \"kitchen\";\n  resolution = {\n    my_desk = \"40:5B:A4:2F:05:46\";\n    kitchen = \"DB:1E:B4:E7:A3:75\";\n  };\n};\n\n```\n\nThis can be configured per-user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabdancing%2Fphomemo-d30","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrabdancing%2Fphomemo-d30","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabdancing%2Fphomemo-d30/lists"}