{"id":23135751,"url":"https://github.com/slashscreen/cowboy-file-reader","last_synced_at":"2025-04-04T08:24:30.019Z","repository":{"id":95163766,"uuid":"136571627","full_name":"SlashScreen/cowboy-file-reader","owner":"SlashScreen","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-09T05:53:30.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T19:36:32.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SlashScreen.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}},"created_at":"2018-06-08T05:42:31.000Z","updated_at":"2018-06-09T05:53:31.000Z","dependencies_parsed_at":"2023-03-09T22:31:22.102Z","dependency_job_id":null,"html_url":"https://github.com/SlashScreen/cowboy-file-reader","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/SlashScreen%2Fcowboy-file-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashScreen%2Fcowboy-file-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashScreen%2Fcowboy-file-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SlashScreen%2Fcowboy-file-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SlashScreen","download_url":"https://codeload.github.com/SlashScreen/cowboy-file-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247143850,"owners_count":20891015,"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-17T12:16:49.714Z","updated_at":"2025-04-04T08:24:30.007Z","avatar_url":"https://github.com/SlashScreen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cowboy-file-reader\nThis is the read/writer for my filetype, .cowboy, I made as a multi-purpose sort of file I would use for config, dialog, savegame, etc.\nThe two .cowboy files are to test reading and writing\n\ncowboytestdemo.py is a demonstration piece on how to use the module\nreadcowboy.py is the module itself, and doesn't do anything on its own\n\n# Module Documentation\n\n`read(path)`\nreads the file specified at *path*. **The .cowboy extension is added at the end automatically.**\n`write(name,doctype,data)`\nwrites to a new file, and creates one if there isn't one already there. \n*name* is the filename (again, automatically adds extension)\n*doctype* is the document type. Refer to style guide.\n*data* is an array or whatever of data that can be put into text form.\n\n# .cowboy Style Guide\n.cowboy files aren't super forgiving. it goes as follows:\n\n```python\ndocument_type\n\ndataA:1 \n\ndataB:Ralph \n\ndataC:5.0 \n```\n\n`document_type`: all lowercase, can be 1 of several types that are more or less handled differently: \"testdoc\", \"savegame\", \"text\"\n\n`data`: this reads sorta like JSON, in that instead of an = there is a :, because it looks cooler. there are syntax requirements, however, that are listed below.\n\n1. Each data point must be on a new line (no minification, sorry!)\n2. Data points can be as far away from eachother as you like, as long as they are on the same line. Ex. \"a    :      5.3\"\n3. Data point can only equal 1 value. you can't do \"a:3:6\" because it will ignore everything past the second colon.\n4. Numbers are always detected and converted automatically to floats. Ex. \"a:3\" will be converted \"a:3.0\" either in memory when the file is read or in the file itself if it is writing.\n\ntext: all you need to do for this is have 'text' as the first line of your document, and then put in anything afterwards\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashscreen%2Fcowboy-file-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashscreen%2Fcowboy-file-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashscreen%2Fcowboy-file-reader/lists"}