{"id":18579516,"url":"https://github.com/artoria2e5/text-plistlib","last_synced_at":"2025-05-16T02:35:02.813Z","repository":{"id":41306929,"uuid":"241007364","full_name":"Artoria2e5/text-plistlib","owner":"Artoria2e5","description":"Python library for parsing old-style and GNUstep plists. Very unstable.","archived":false,"fork":false,"pushed_at":"2024-02-04T08:39:36.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T15:52:13.928Z","etag":null,"topics":["gnustep","openstep","plist"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Artoria2e5.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,"publiccode":null,"codemeta":null}},"created_at":"2020-02-17T02:57:06.000Z","updated_at":"2024-05-27T05:36:45.000Z","dependencies_parsed_at":"2024-11-06T23:41:18.428Z","dependency_job_id":"6db374fc-75da-4752-b4c8-96094e8b298d","html_url":"https://github.com/Artoria2e5/text-plistlib","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/Artoria2e5%2Ftext-plistlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artoria2e5%2Ftext-plistlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artoria2e5%2Ftext-plistlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Artoria2e5%2Ftext-plistlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Artoria2e5","download_url":"https://codeload.github.com/Artoria2e5/text-plistlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254456167,"owners_count":22074121,"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":["gnustep","openstep","plist"],"created_at":"2024-11-06T23:41:06.813Z","updated_at":"2025-05-16T02:35:02.752Z","avatar_url":"https://github.com/Artoria2e5.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"text-plistlib\r\n=============\r\n\r\nA library that parses text plists from OpenStep and GNUstep as well as `.strings` files. Has a [plistlib](https://docs.python.org/3/library/plistlib.html)-style API.\r\n\r\nUses a Packrat parser from [tatsu](https://github.com/neogeny/TatSu), because I am too lazy to manually write a recursive descent thing.\r\n\r\nFormat\r\n------\r\n\r\nText plists are [Property lists](https://en.wikipedia.org/wiki/Property_list) written in a\r\nhuman-readable, textual form. They roamed the Earth in the times of OpenStep, and is\r\ngenerally better for humans than the new XML format. This form, `NSPropertyListOpenStepFormat`, only supports strings, hexdata, arrays, and dictionaries.\r\n\r\nThe GNUstep project created an extension based on the old ASCII format called `NSPropertyListGNUstepFormat`. This format adds support for integers, floats, and dates, making it as expressive as the XML and binary formats. \r\n\r\nThe format of textual plists are quite easy to grasp:\r\n```plist\r\n{\r\n    /* Strings can be unquoted, or quoted for C-style escapes */\r\n    \"loremIpsum\" = \"A story about the good, \\n the bad \\u0000, and the ugly\\x2E\";\r\n    foo = bar;\r\n    hexdata = \u003cdeadbeef\u003e;\r\n    int = \u003c*I3\u003e;\r\n    date = \u003c*D2006-01-02 15:04:05 -0700\u003e;\r\n\r\n    // collection objects\r\n    array = (1, 2, 3);\r\n    object = {\r\n        a = (1, 2, 3);\r\n        d = ();\r\n        e = {};\r\n        f = \u003c\u003e;\r\n    };\r\n}\r\n```\r\n\r\n### `.strings` files\r\n`.strings` files are similar to OpenStep plist dictionaries, except that the braces are omitted. By convention all values are strings, and the `= value` part can be omitted for a null or empty value.\r\n\r\nExtensions\r\n----------\r\n\r\nThis library accepts the following extensions to textual plists:\r\n* Custom encoding: historically, plists may be written in a wide variety of encodings. We default to UTF-8, but this is configurable.\r\n* Trailing commas for arrays: everyone loves trailing commas. Seems to be in GNUstep and Apple.\r\n* Values in collections are nullable. This means that all dictionaries can use the `.strings` extension of `key;` and null elements of arrays can be denoted by commas. In Python they translate to `None`.\r\n  * On a second thought, it does make more sense to use something like `\u003c*N\u003e` instead of the JavaScript-like handling of array gaps.\r\n* UID. Unsigned values of the `plistlib.UID` classes are serialized in the dialect as `\u003c*U12345\u003e`. In other dialects, they are encoded as `{ \"CF$UID\" = \u003c*I12345\u003e }`.\r\n* The top level of dictionary is assumed as in `.strings` files, no matter how complex the inner data structures are. This makes for better config files.\r\n\r\nThe generation of these extension elements can be turned off by a dialect control.\r\n\r\nLicense\r\n-------\r\nMIT/Expat license or Python Software Foundation License. \r\n\r\nSee also\r\n--------\r\n* [go-plist](https://github.com/DHowett/go-plist)\r\n\r\n\r\nUseful commands \r\n-----\r\n\r\n* python3 -m text_plistlib.impl ./tests/oneval.plist \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoria2e5%2Ftext-plistlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartoria2e5%2Ftext-plistlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartoria2e5%2Ftext-plistlib/lists"}