{"id":17046614,"url":"https://github.com/sebobo/yamlsplitter","last_synced_at":"2025-04-12T15:33:17.174Z","repository":{"id":57049169,"uuid":"269618778","full_name":"Sebobo/YamlSplitter","owner":"Sebobo","description":"CLI tool to split Neos CMS node type files","archived":false,"fork":false,"pushed_at":"2022-12-08T19:37:52.000Z","size":28,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T10:04:25.393Z","etag":null,"topics":["hacktoberfest","neos-cms","split","yaml"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Sebobo.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"shelzle","github":"sebobo"}},"created_at":"2020-06-05T11:46:50.000Z","updated_at":"2023-10-20T10:11:24.000Z","dependencies_parsed_at":"2023-01-25T15:31:45.802Z","dependency_job_id":null,"html_url":"https://github.com/Sebobo/YamlSplitter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sebobo%2FYamlSplitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sebobo%2FYamlSplitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sebobo%2FYamlSplitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sebobo%2FYamlSplitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sebobo","download_url":"https://codeload.github.com/Sebobo/YamlSplitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589878,"owners_count":21129694,"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":["hacktoberfest","neos-cms","split","yaml"],"created_at":"2024-10-14T09:46:53.845Z","updated_at":"2025-04-12T15:33:17.146Z","avatar_url":"https://github.com/Sebobo.png","language":"PHP","funding_links":["https://patreon.com/shelzle","https://github.com/sponsors/sebobo"],"categories":[],"sub_categories":[],"readme":"# Neos CMS node type YAML file splitter and reorganizer\n\nFeatures:\n\n* split YAML files containing multiple nodetypes into separate files each containing one nodetype \n* reorganize nodetypes files from the old style `Configuration` folder to the new `NodeTypes` folder and will also create subfolders based on their naming scheme\n\n## Installation\n\n### Recommended\n\nDownload the Phar version of the [latest release](https://github.com/Sebobo/YamlSplitter/releases). \nYou can find it after the individual change log in the `Assets` section.\n\nAfterwards you should make the file executable by running \n\n```console\nchmod a+x yaml-splitter.phar\n```\n\nNow you can follow the usage examples below.\n\n### Via composer \n\nAdd this tool as dependency to your project via\n\n```console\ncomposer require --dev shel/yaml-splitter \n```\n\nOr install the package [globally](https://getcomposer.org/doc/03-cli.md#global) via\n\n```console\ncomposer global require shel/yaml-splitter \n```\n\nAfterwards you can run the commands in your project by prefixing the usage examples like this:\n\n```console\nbin/yaml-splitter.php split ...\n```\n\n## Usage\n\n### List commands\n\n    ./yaml-splitter.phar list\n\n### Show options for split command\n\n    ./yaml-splitter.phar help split\n\n### Split a file\n\n    ./yaml-splitter.phar split [options] [--] \u003cpath\u003e [\u003coutput-path\u003e]\n    \nThis will copy each node type found in the input file into a new file.\nEach new file be have a name like `NodeTypes.MyNodeType.yaml`.\n\nAdditionally, each filename will get a prefix after `NodeTypes` like `Document`, `Content` or `Mixin`\nbased on the name of the actual node type.\n\nAlso, when the option `package-key` is provided, node types matching the package key will\nhave the standard naming and others will get names like `NodeTypes.Override.SomeOtherNodeType.yaml`.\n    \n#### Options\n\n* `dry-run` allows seeing what would happen without writing any file\n* `use-folders` splits the nodetypes into a folder structure for Neos 7.2+\n* `package-key` allows to define the main package key of your node types, so node types with different package keys would be written to `NodeTypes.Override.xyz` files.\n* `indentation` number of spaces for indentation in the resulting YAML files\n    \n#### Example\n\n```console\n./yaml-splitter.phar split --dry-run --package-key MyVendor path/to/MyVendor.NodeTypes.yaml path/to/package\n```\n\n\n### Reorganize the nodetypes in a Configuration folder into Neos 7.2+ nodetype subfolders\n\nWith Neos 7.2 it's possible to organize nodetypes into separate folders than `Configuration`.\nIt also allows you to use subfolders.\n\nWith the following command you can move all `NodeTypes.*.yaml` from a `Configuration` folder into\nanother folder. They will automatically be put into subfolders based on their naming scheme.\n\nSo for example you have the following files in your `Configuration` folder of your site package:\n\n```console     \nConfiguration\n├── NodeTypes.Content.Image.yaml\n├── NodeTypes.Content.Text.yaml\n├── NodeTypes.Document.Abstract.Page.yaml\n├── NodeTypes.Document.Home.yaml\n├── NodeTypes.Document.Page.yaml\n├── NodeTypes.Override.Content.Popup.yaml\n├── NodeTypes.Override.Mixin.Document.yaml\n└── NodeTypes.Override.Mixin.MarginMixin.yaml\n\n```\n                                                                                    \nNow you run the `reorganize` command:\n\n```console\n./yaml-splitter.phar reorganize path/to/sitepackage/Configuration path/to/sitepackage/NodeTypes\n```\n                                                                                     \nAfter you execute the command you will have the following structure:\n\n```console\nNodeTypes\n├── Content\n│   ├── Image.yaml\n│   └── Text.yaml\n├── Document\n│  ├── Abstract\n│  │   └── Page.yaml\n│  ├── Home.yaml\n│  └── Page.yaml\n└── Override\n    ├── Content\n    │   └── Popup.yaml\n    └── Mixin\n        ├── Document.yaml\n        └── MarginMixin.yaml\n```\n\n**Note:** If you still have multiple nodetypes inside one file, it's recommended to first run the `split` command and then `reorganize`.\n\n## Contributing\n\nThe tool is based on the Symfony console component.\n\n### Building the phar\n\nFirst [install box](https://github.com/humbug/box/blob/master/doc/installation.md#installation).\n\nThen run\n\n    composer run compile \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebobo%2Fyamlsplitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebobo%2Fyamlsplitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebobo%2Fyamlsplitter/lists"}