{"id":15941831,"url":"https://github.com/benwr/inventory","last_synced_at":"2025-03-04T05:43:28.039Z","repository":{"id":4911112,"uuid":"6067371","full_name":"benwr/inventory","owner":"benwr","description":"inventory application for ECE2524 Intro to UNIX","archived":false,"fork":false,"pushed_at":"2012-10-04T01:08:22.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T07:45:22.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"RiotGamesCookbooks/rbenv-cookbook","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benwr.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}},"created_at":"2012-10-03T21:45:30.000Z","updated_at":"2014-05-17T01:39:14.000Z","dependencies_parsed_at":"2022-09-16T16:43:34.565Z","dependency_job_id":null,"html_url":"https://github.com/benwr/inventory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwr%2Finventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwr%2Finventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwr%2Finventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benwr%2Finventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benwr","download_url":"https://codeload.github.com/benwr/inventory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241794109,"owners_count":20021188,"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-10-07T07:21:05.660Z","updated_at":"2025-03-04T05:43:28.015Z","avatar_url":"https://github.com/benwr.png","language":"Python","readme":"# Inventory #\n\nThis is a simple program to keep track of an inventory database.\nIt reads commands from stdin, and updates a database file specified\non the command line.\n\n### Features ###\n\nExtra credit features implemented:\n\n* Sort on quantity works numerically.\n* Remove works with a pattern that can be applied to any field\n  (or multiple fields)\n\nIn addition, multiple values can be updated with only one command (with the\nsame pattern-matching syntax as works with delete),\nand the output can be sorted down to the minutest detail (you can specify\nan arbitrary number of fields to sort by, in preferential order).\n\n### Data storage design ###\n\nThe database files are composed of JSON objects, separated by newlines:\n\n    {\"part-id\":\"a123\",\"footprint\":\"dip6\",\"description\":\"Digital IMU\",\"quantity\":4}\n    {\"part-id\":\"a124\",\"footprint\":\"dip6\",\"description\":\"Digital IMU\",\"quantity\":4}\n\n### Protocol design ###\n\nMost communication is done in JSON. To add a part, you must specify all\nfields in a JSON object, similar to what appears in the database file.\nAdditional fields will be stored, for the sake of forward-compatibility,\nbut queries against unspecified fields (for example, a \"cost\" field) will\nreturn an error.\n\nThe following commands are supported:\n\n    add \u003cfull JSON object\u003e\n    remove \u003cmatch pattern\u003e\n    change \u003cmatch pattern\u003e \u003cmodification\u003e\n    list [match pattern] [sort specification]\n\n\nMatch patterns are partial JSON objects. All three of the following match the\nabove-specified part:\n\n    {\"part-id\":\"a123\"}\n    {\"footprint\":\"dip6\"}\n    {\"part-id\":\"a123\", \"footprint\":\"dip6\"}\n\nThe empty match pattern, {}, matches everything.\n\nModifications are basically identical to match patterns. The following\ncommand would change the description of the above-specified part to \"This\nis a digital IMU with I2C\".\n\n     change {\"part-id\":\"a123\"} {\"description\":\"This is a digital IMU with I2C\"}\n\nSort specifications are JSON lists of field names, which order the output\npreferentially. If, for example, you want to rank by quantity and then by\npart number, this sort specification would do it for you:\n\n     [\"quantity\", \"part-id\"]\n\nLists are returned as whitespace-separated fields for readability. They\nare separated by `%%\\n`s.\n\nSuccessful requests with no return value will return an `OK\\n`.\n\nWarning conditions are prefixed with the string \"Warning:\", and Errors are\nprefixed with the string \"Error:\".\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenwr%2Finventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenwr%2Finventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenwr%2Finventory/lists"}