{"id":17861149,"url":"https://github.com/jonathanstowe/oyatul","last_synced_at":"2026-05-16T22:34:54.905Z","repository":{"id":66980436,"uuid":"51289212","full_name":"jonathanstowe/Oyatul","owner":"jonathanstowe","description":"Abstract representation of filesystem layout","archived":false,"fork":false,"pushed_at":"2023-07-01T09:11:36.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T16:13:11.556Z","etag":null,"topics":["filesystem-layout","json","raku","storage"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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-02-08T09:37:19.000Z","updated_at":"2022-08-07T08:44:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f48cfd2a-d2d5-459d-8d47-a8b666e4d55c","html_url":"https://github.com/jonathanstowe/Oyatul","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanstowe/Oyatul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FOyatul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FOyatul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FOyatul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FOyatul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/Oyatul/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FOyatul/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33121270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"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":["filesystem-layout","json","raku","storage"],"created_at":"2024-10-28T08:43:04.272Z","updated_at":"2026-05-16T22:34:54.888Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oyatul\n\nAbstract representation of a filesystem layout\n\n![Build Status](https://github.com/jonathanstowe/Tinky/workflows/CI/badge.svg)\n\n## Synopsis\n\nThis runs the tests identified by 'purpose' test which can be in any\nlocation in the layout with the library directory identified by the\npurpose 'lib' :\n\n```raku\nuse Oyatul;\n\nmy $description = q:to/LAY/;\n{\n   \"type\" : \"layout\",\n   \"children\" : [\n      {\n         \"name\" : \"t\",\n         \"purpose\" : \"tests\",\n         \"type\" : \"directory\",\n         \"children\" : [\n            {\n               \"type\" : \"file\",\n               \"purpose\" : \"test\",\n               \"template\" : true\n            }\n         ]\n      },\n      {\n         \"type\" : \"directory\",\n         \"purpose\" : \"lib\",\n         \"name\" : \"lib\",\n         \"children\" : []\n      }\n   ]\n}\nLAY\n\n# the :real adverb causes instance nodes to be inserted\n# for any templates if they exist.\nmy $layout = Oyatul::Layout.from-json($description, root =\u003e $*CWD.Str, :real);\n\n# get the directory that stands in for 'lib'\nmy $lib = $layout.nodes-for-purpose('lib').first.path;\n\n# get all the instances for 'test' excluding the template\nfor $layout.nodes-for-purpose('test', :real) -\u003e $test {\n\trun($*EXECUTABLE, '-I', $lib, $test.path);\n}\n\n```\n\n## Description\n\nThis provides a method of describing a filesystem layout in an abstract\nmanner.\n\nIt can be used in the deployment of applications which might need\nthe creation of a directory tree for data or configuration, or for\napplications which may need to locate files and directory that it needs\nbut can allow the user to define their own .\n\nThe file layout descriptions can be stored as JSON or they can be built\nprogrammatically (thus allowing other forms of storage.)\n\nThe description can define directories and files in an aribitrary tree\nstructure, each can optionally define a 'purpose' which can be used to\nlocate a node irrespective of its location in the tree and name, a node\nobject can also be given a role with the 'does' key which can give the\nnode additional behaviours (e.g. create a file of a specific format,\ncreate an object based on a file or directory etc.) Template nodes can\nbe defined which can stand in for real files or directories which can\nbe discovered at run-time.\n\nThis is based on a design that I used in a large application that relied\nheavily on file storage for its data, but is somewhat more simplified\nand abstracted as well as preferring JSON over the original XML for the\nstorage of the layout description. The features are designed to allow\n[Sofa](https://github.com/jonathanstowe/Sofa) to load a CouchDB design\ndocument from an arbitrary (possibly user defined) file hierarchy unlike\n```couchapp``` which requires a fixed directory structure. However\nhopefully it will be useful in other applications.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to install this with *zef* :\n\n    # From the source directory\n   \n    zef install .\n\n    # Remote installation\n\n    zef install Oyatul\n\n## Support\n\nSuggestions and patches that may make it more useful in your software are welcomed via github at:\n\nhttps://github.com/jonathanstowe/Oyatul/issues\n\n## Licence\n\nThis is free software.\n\nPlease see the [LICENCE](LICENCE) file in the distribution\n\n© Jonathan Stowe 2016 - 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Foyatul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Foyatul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Foyatul/lists"}