{"id":16831169,"url":"https://github.com/zbjornson/myaml","last_synced_at":"2025-04-11T04:32:42.548Z","repository":{"id":85612719,"uuid":"70656769","full_name":"zbjornson/MYaml","owner":"zbjornson","description":"YAML importer for Wolfram Mathematica","archived":false,"fork":false,"pushed_at":"2017-11-10T01:59:32.000Z","size":241,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T02:39:50.532Z","etag":null,"topics":["mathematica","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Mathematica","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/zbjornson.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":"2016-10-12T02:58:30.000Z","updated_at":"2023-12-15T05:49:20.000Z","dependencies_parsed_at":"2023-03-13T06:05:06.519Z","dependency_job_id":null,"html_url":"https://github.com/zbjornson/MYaml","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/zbjornson%2FMYaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbjornson%2FMYaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbjornson%2FMYaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbjornson%2FMYaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbjornson","download_url":"https://codeload.github.com/zbjornson/MYaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345202,"owners_count":21088231,"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":["mathematica","yaml"],"created_at":"2024-10-13T11:42:33.238Z","updated_at":"2025-04-11T04:32:42.477Z","avatar_url":"https://github.com/zbjornson.png","language":"Mathematica","funding_links":[],"categories":[],"sub_categories":[],"readme":"YAML importer for *Mathematica*.\n\n### Installation\n\nThis snippet will install the converter in the `$BaseDirectory`. (You may also\nuse `$UserBaseDirectory` instead.) After installation, the format will be\navailable like any other importer.\n\n```Mathematica\ntmp = URLSave[\"https://github.com/zbjornson/MYaml/archive/master.zip\"];\ndest = FileNameJoin[{$BaseDirectory, \"SystemFiles\", \"Formats\"}];\nQuiet[CreateDirectory[dest]];\ntmpExpanded = CreateDirectory[];\nExtractArchive[tmp, tmpExpanded];\nCopyDirectory[FileNameJoin[{tmpExpanded, \"MYaml-master\", \"YAML\"}], FileNameJoin[{dest, \"YAML\"}]];\nDeleteFile[tmp];\nDeleteDirectory[tmpExpanded, DeleteContents -\u003e True];\nPrint[\"Installed YAML importer to \" \u003c\u003e dest \u003c\u003e \". Please restart Mathematica or the kernel.\"]\n```\n\n### Usage\n\nNote that the format must be specified when calling `Import` ([note](#extension-detection)).\n\n```Mathematica\nImport[\"filename.yaml\", \"YAML\"]\n```\n\n### YAML Spec Compliance\n\nThis library is a thin binding to [SnakeYAML](https://bitbucket.org/asomov/snakeyaml),\nwhich is a complete YAML 1.1 processor.\n\n* All [language-independent types](http://www.yaml.org/type/) are supported.\n* Only single documents are supported; multiple documents separated by \"---\"\n  are not supported.\n* Recursive references are not supported; these will currently cause\n  a stack overflow.\n* *Mathematica* does not have distinct types corresponding to all of the YAML\n  collection types (unordered vs. ordered maps, allowing vs. disallowing\n  duplicates; sets vs. plain lists). All of the collections are imported as\n  `List`s, and (planned) all `List`s are exported as `!!seq` (sequences).\n\n### Developer Notes\n\nThe `YAML` directory is what gets copied to `$[User]BaseDirectory/SystemFiles/Formats`.\nAll other files and folders are only needed for testing and building from\nsource. After building, generate the yaml.jar file using mbuild.jardesc.\n\n### Extension Detection\n\nI can't quite get *Mathematica* to automatically import \"*.yaml\" files as YAML.\nYou could put the following code in an `init.m` file; it does not seem to load\nproperly when placed in the importer source code.\n\n```Mathematica\nUnprotect[Import];\nImport[name_String, opts___?OptionQ] :=\n  Import[name, \"YAML\", opts] /;\n   ToLowerCase[FileExtension[name]] === \"yaml\";\nProtect[Import];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbjornson%2Fmyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbjornson%2Fmyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbjornson%2Fmyaml/lists"}