{"id":20779134,"url":"https://github.com/mattdibi/metadata-generator","last_synced_at":"2025-03-11T22:19:00.529Z","repository":{"id":262715346,"uuid":"886819395","full_name":"mattdibi/metadata-generator","owner":"mattdibi","description":"Kura projects metadata generator","archived":false,"fork":false,"pushed_at":"2025-02-17T07:39:33.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T23:26:13.299Z","etag":null,"topics":[],"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/mattdibi.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":"2024-11-11T16:58:43.000Z","updated_at":"2025-02-17T07:38:18.000Z","dependencies_parsed_at":"2025-02-14T18:31:31.137Z","dependency_job_id":null,"html_url":"https://github.com/mattdibi/metadata-generator","commit_stats":null,"previous_names":["mattdibi/metadata-generator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2Fmetadata-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2Fmetadata-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2Fmetadata-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2Fmetadata-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattdibi","download_url":"https://codeload.github.com/mattdibi/metadata-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243119537,"owners_count":20239321,"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-11-17T13:26:12.730Z","updated_at":"2025-03-11T22:19:00.524Z","avatar_url":"https://github.com/mattdibi.png","language":"Python","readme":"# Kura projects metadata generator\n\nThis project is a simple tool to generate Eclipse metadata for Kura projects. Its main goal is to provide a simple to use solution to generate the metadata files required by VSCode to provide code completion and validation for Kura projects.\n\n## How to use\n\n### Installation\n\nTo use this tool, you need to have Python 3 installed in your system. You can download it from the [official website](https://www.python.org/downloads/).\n\nAfter installing Python, you can download the latest release of this tool from the [releases page](https://github.com/mattdibi/metadata-generator/releases). Simply install the tool by running the following command:\n\n```bash\npip3 install metadata_generator-\u003cversion\u003e.whl\n```\n\n### Usage\n\n```bash\nusage: kura-gen [-h] [-d] [--dry-run] [-t TARGET_PLATFORM] [--patch-target-platform]\n\nKura projects metadata generator\n\noptions:\n  -h, --help            show this help message and exit\n  -d, --debug           Print debug information\n  --dry-run             Dry run. Do not write any files to disk\n  -t, --target-platform TARGET_PLATFORM\n                        Path to the target platform file\n  --patch-target-platform\n                        Patch the target platform file with the correct paths\n```\n\n\u003e [!NOTE]\nThe `--patch-target-platform` option is used to substitute the `${git_work_tree}` variable in the target platform file with the path of the git repository root. **This is only needed for the Kura repository**.\n\n### Generating metadata files\n\nTo generate the metadata files, you need to change the current working directory to the root directory of your Kura project. You can do this by running the following command:\n\n\u003e [!IMPORTANT]\n\u003e A successfull maven build is required before running the metadata generator.\n\n```bash\ncd /path/to/your/kura/project\n```\n\nAfter changing the working directory, you can run the following command to generate the metadata files:\n\n```bash \nkura-gen\n```\n\nThe tool will generate the following files:\n- `javaConfig.json` at the root of the project. This config file is used to tell the PDE extension about the locations of the sub projects and target platform file.\n- `.project` file in each sub project. This file is used by Eclipse to identify the project type and dependencies.\n- `.classpath` file in each sub project. This file is used by Eclipse to identify the classpath of the project.\n- **if the `--patch-target-platform` option is used** the script will also update the target platform file with the correct paths (i.e. substitute the `${git_work_tree}` variable with the path of the git repository root).\n\nAfter generating the metadata files, you can open the project in VSCode and install the required extensions. The following extensions are required to provide code completion and validation for Kura projects:\n\n- [Eclipse PDE support for VS Code](https://marketplace.visualstudio.com/items?itemName=yaozheng.vscode-pde)\n- [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)\n- [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)\n- [Java Test Runner](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test)\n\n#### Example setup\n\nHere follows an example of how to setup a project in VSCode using the metadata generator:\n\n1. Clone the project repository\n\n```bash\ngit clone https://github.com/my-awesome-kura-project.git \u0026\u0026 cd my-awesome-kura-project\n```\n\n2. Build the project\n\n```bash\nmvn clean install\n```\n\n3. Generate the metadata files (assuming the `kura-gen` tool is installed)\n\n```bash\nkura-gen\n```\n\n4. Open the project in VSCode\n\n```bash\ncode .\n```\n\n5. Install the required extensions\n\n6. ...and you're done!\n\n## Development environment setup\n\n#### Install uv\n\nTake a look at the official documentation [here](https://docs.astral.sh/uv/getting-started/installation/)\n\n#### Run the tool\n\n```bash\nuv run generator.py\n```\n\n#### Build the sources and wheels archives\n\n```bash\nuv build\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdibi%2Fmetadata-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattdibi%2Fmetadata-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdibi%2Fmetadata-generator/lists"}