{"id":16835130,"url":"https://github.com/syfaro/reg-interface","last_synced_at":"2026-04-02T00:42:35.519Z","repository":{"id":248334287,"uuid":"828410826","full_name":"Syfaro/reg-interface","owner":"Syfaro","description":"Scanning and printing utilities for convention registration","archived":false,"fork":false,"pushed_at":"2026-03-23T04:47:05.000Z","size":254,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-24T00:58:44.914Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Syfaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-07-14T04:15:57.000Z","updated_at":"2026-03-23T04:47:09.000Z","dependencies_parsed_at":"2025-02-13T19:22:41.037Z","dependency_job_id":"9128b133-6c34-4ab8-955f-26e8466440b6","html_url":"https://github.com/Syfaro/reg-interface","commit_stats":null,"previous_names":["syfaro/reg-interface"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Syfaro/reg-interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syfaro%2Freg-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syfaro%2Freg-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syfaro%2Freg-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syfaro%2Freg-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Syfaro","download_url":"https://codeload.github.com/Syfaro/reg-interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Syfaro%2Freg-interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-13T12:09:04.565Z","updated_at":"2026-04-02T00:42:35.504Z","avatar_url":"https://github.com/Syfaro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reg-interface\n\nA utility to perform registration-related activites on staff machines.\n\nThe core features are:\n\n- Scanning, decoding, and transforming results of barcode and ID scanners\n- Enqueuing print jobs to the local machine from a remote server\n\n## Configuration\n\nA config.toml must be present in the working directory or available at a path\nspecified in the `REG_INTERFACE_CONFIG_PATH` environment variable.\n\n### Decoders\n\nThe included decoders have a number of configuration options. Many are enabled\nby default, but those requiring specific setup such as mDL and SHC are not.\n\n```toml\n[decoder]\nenabled_decoders = [\n  \"aamva\",\n  \"mdl\",\n  \"mrtd\",\n  \"cac\",\n  \"shc\",\n  \"url\",\n  \"generic\"\n]\n\n[decoder.mdl]\ninput_name = \"mdl\"\npath = \"/dev/ttyACM0\"\nbaud = 115200\ncertificates_path = \"mdl-certificates\"\n\n[decoder.mdl.request_elements.\"org.iso.18013.5.1\"]\ngiven_name = false\nfamily_name = false\nbirth_date = false\n\n[decoder.shc]\nskip_updates = false\nprohibit_lookups = false\ncache_dir = \"shc-cache\"\n\n[decoder.url]\nopen_urls = false\n```\n\n### Inputs\n\nAny number of serial and USB HID (using the point of sale protocol) barcode\nscanners can be configured.\n\n```toml\n[[inputs]]\nname = \"serial-scanner\"\npath = \"/dev/tty.usbmodemXXXX\"\nbaud_rate = 115200\n\n[[inputs]]\nname = \"hid-scanner\"\nvendor_id = 1504\nproduct_id = 1536\nusage_id = 3072\nusage_page = 65283\n```\n\n### Connections\n\nAfter a barcode has been processed, it will be transformed and then sent to the\nrelevant connections.\n\n```toml\n[[connections]]\nname = \"http\"\nconnection_type = \"http\"\nurl = \"http://localhost:8080\"\nheaders = { \"x-secret\" = \"some-value\" }\n\n[[connections]]\nname = \"mqtt\"\nconnection_type = \"mqtt\"\nurl = \"mqtt://localhost\"\nallow_actions = true\npublish_topic = \"client/12345\"\naction_topic = \"client/12345/action\"\n\n[connections.credentials]\nusername = \"user\"\npassword = \"pass\"\n```\n\nIf the connection supports bidirectional communication (such as MQTT), you\nmay enable `allow_actions` to process actions coming from the connection.\n\n### Transformations\n\nIn order to increase flexibility, a script written using [Rhai] may be used to\ntransform data between being decoded and before it's sent to connetions.\n\n[Rhai]: https://rhai.rs\n\n```toml\n[transform]\ntemplate_path = \"transform.rhai\"\n\n[transform.extra]\ndevice_name = \"test\"\n```\n\n```rhai\n// transform.rhai\n\nfn transform(input_name, decoder_type, data) {\n  switch decoder_type {\n    \"AAMVA\" =\u003e {\n      #{\n        first: data.name?.first,\n        last: data.name?.family,\n        dob: data.date_of_birth,\n        _interface: #{\n          mqtt_topic: `${extra::device_name}/id`\n        }\n      }\n    }\n  }\n}\n```\n\nThe transform function may return a map with the `_interface` key set, which can\ncontrol some connection-specific behavior. This key is removed before sending\nthe data to the relevant connections.\n\nFor example, setting `mqtt_topic` changes the topic to which the value is sent.\nIt's also possible to set `targets` to control which connections will be sent\nthe value.\n\n### Printer\n\nA printer can be configured in the actions section.\n\n```toml\n[action.print]\nprinter_uri = \"ipp://localhost:631/printers/printer_name\"\n\n[[action.print.attributes]]\nname = \"landscape\"\nvalue = {Boolean = true}\n```\n\nPrint jobs can be created by sending a print action through a connection target\nthat supports bidirectional communication.\n\n```json\n{\n  \"action\": \"print\",\n  \"url\": \"https://example.com/test.pdf\"\n}\n```\n\nThe PDF will be streamed from the provided URL and sent to the printer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyfaro%2Freg-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyfaro%2Freg-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyfaro%2Freg-interface/lists"}