Name | envidat-converters JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Converters for EnviDat metadata |
upload_time | 2025-07-18 09:17:36 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
envidat
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# EnviDat Converters
This project features converters made for [EnviDat](https://www.envidat.ch/) metadata.
- EnviDat to JSON-LD
- EnviDat to DataCite XML
- EnviDat to RIS
- EnviDat to DIF
- EnviDat to ISO 19139
- EnviDat to BIBTEX
- EnviDat to DCAT-AP
It also offers a way to download EnviDat metadata.
## So how do I use it?
All you need to do is install the package.
Clone the repository in a folder of your choosing. Then install it. Easy!
We recommend using a virtual environment as described here, but in theory you can also just run the last command.
```
# Create virtual environment:
python -m venv <virtual-environment-name>
# Activate virtual environment (depends on your OS)
# Linux/MacOS
source <virtual-environment-name>\bin\activate
# Windows
<virtual-environment-name>\Scripts\activate.bat
# Install the package.
pip install .
```
If you have set this up before and come back to the project at a different time, the only step you need to do is activate the virtual environment.
Once this project is on PyPi, I will add the according instructions here.
## Command Line Usage
<details>
<summary>Command Line Usage</summary>
Open your favourite terminal.
So far, you have two main functionalities:
- Getting the metadata directly from EnviDat
- Converting that metadata to a format of your choosing
Both have the option to either just print the output or save it as a file.
### EnviDat metadata
To show or download the metadata, use the following command:
`(python) envidat-converter get-data <query>`
Query is your search term. It can be a *DOI*, a *dataset name* or a *dataset ID*.
**Optional**:
To download the dataset, use the --download flag. This will save the file in your current directory.
If you want to specify the path, you can do that with the --outputdir flag.
**Examples**:
`(python) envidat-converter get-data labes`
... will print the dataset with the name "labes" in your terminal.
`(python) envidat-converter get-data "10.16904/envidat.228" --download --outputdir ".\foldername"`
... will save the dataset with the DOI 10.16904/envidat.228 in a new folder called "foldername".
### Convert metadata
So far you can convert to the following formats:
- Datacite (XML)
- Json LD in the style of Zenodo (JSON)
To use the converter, use:
`(python) envidat_converter.py convert <query> --converter <converter>`
Let's break that down:
- query: query is your search term. It can be a *DOI*, a *dataset name* or a *dataset ID*.
- converter: this can currently be "datacite", "jsonld", "bibtex", "dif", "ris", "iso", or "dcatap"
**Optional**:
To download the dataset, use the --download flag. This will save the file in your current directory.
If you want to specify the path, you can do that with the --outputdir flag.
**Examples**:
`(python) envidat-converter convert labes --converter datacite`
... will print the dataset with the name "labes" in the datacite format in your terminal.
`(python) envidat-converter convert "10.16904/envidat.228" --converter jsonld --download --outputdir ".\foldername"`
... will save the dataset with the DOI 10.16904/envidat.228 in a new folder called "foldername".
</details>
## API usage
<details>
<summary>API usage</summary>
Make sure you have uvicorn installed. Then it's as simple as running
`uvicorn converters.main:app --port 8080`
It should load up under http://localhost:8080/. Note that you can always change the port number to whatever fits your needs.
The docs should open up and help you use the API.
- To convert metadata, use the convert-metadata endpoint. You can use IDs, package names, or DOIs as query.
- To simply get the EnviDat metadata, use the get-data endpoint. You can use IDs, package names, or DOIs as query.
</details>
## Addtional information
This repository was tested against Python Versions 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. Version 3.8 and 3.9 did not work due to dependency issues.
### config.ini
If you are not just handling production data but, for example, have a local database that you want to test, you can add the environment to config.ini. There is no need to restart or reinstall after making changes.
Raw data
{
"_id": null,
"home_page": null,
"name": "envidat-converters",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "envidat",
"author": null,
"author_email": "Yasmin Waldeck <yasmin.waldeck@wsl.ch>",
"download_url": "https://files.pythonhosted.org/packages/0d/b0/f4d9ee18851a7968180a8a78074884d3db1a1de6b4ca9839e4c3cc078e46/envidat_converters-0.1.1.tar.gz",
"platform": null,
"description": "# EnviDat Converters\r\nThis project features converters made for [EnviDat](https://www.envidat.ch/) metadata.\r\n- EnviDat to JSON-LD\r\n- EnviDat to DataCite XML\r\n- EnviDat to RIS\r\n- EnviDat to DIF\r\n- EnviDat to ISO 19139\r\n- EnviDat to BIBTEX\r\n- EnviDat to DCAT-AP\r\nIt also offers a way to download EnviDat metadata.\r\n\r\n## So how do I use it?\r\n\r\nAll you need to do is install the package.\r\n\r\nClone the repository in a folder of your choosing. Then install it. Easy!\r\n\r\nWe recommend using a virtual environment as described here, but in theory you can also just run the last command.\r\n\r\n```\r\n# Create virtual environment:\r\npython -m venv <virtual-environment-name>\r\n\r\n# Activate virtual environment (depends on your OS)\r\n# Linux/MacOS\r\nsource <virtual-environment-name>\\bin\\activate\r\n# Windows\r\n<virtual-environment-name>\\Scripts\\activate.bat\r\n\r\n# Install the package.\r\npip install .\r\n```\r\n\r\nIf you have set this up before and come back to the project at a different time, the only step you need to do is activate the virtual environment.\r\n\r\nOnce this project is on PyPi, I will add the according instructions here.\r\n\r\n\r\n## Command Line Usage\r\n\r\n<details> \r\n\r\n<summary>Command Line Usage</summary>\r\n\r\nOpen your favourite terminal.\r\nSo far, you have two main functionalities:\r\n- Getting the metadata directly from EnviDat\r\n- Converting that metadata to a format of your choosing\r\n\r\nBoth have the option to either just print the output or save it as a file.\r\n\r\n### EnviDat metadata\r\n\r\nTo show or download the metadata, use the following command:\r\n\r\n`(python) envidat-converter get-data <query>`\r\n\r\nQuery is your search term. It can be a *DOI*, a *dataset name* or a *dataset ID*.\r\n\r\n**Optional**:\r\n\r\nTo download the dataset, use the --download flag. This will save the file in your current directory.\r\n\r\nIf you want to specify the path, you can do that with the --outputdir flag.\r\n\r\n**Examples**:\r\n\r\n`(python) envidat-converter get-data labes`\r\n\r\n... will print the dataset with the name \"labes\" in your terminal.\r\n\r\n`(python) envidat-converter get-data \"10.16904/envidat.228\" --download --outputdir \".\\foldername\"`\r\n\r\n... will save the dataset with the DOI 10.16904/envidat.228 in a new folder called \"foldername\".\r\n\r\n\r\n### Convert metadata\r\n\r\nSo far you can convert to the following formats:\r\n- Datacite (XML)\r\n- Json LD in the style of Zenodo (JSON)\r\n\r\nTo use the converter, use:\r\n\r\n`(python) envidat_converter.py convert <query> --converter <converter>`\r\n\r\nLet's break that down:\r\n- query: query is your search term. It can be a *DOI*, a *dataset name* or a *dataset ID*.\r\n- converter: this can currently be \"datacite\", \"jsonld\", \"bibtex\", \"dif\", \"ris\", \"iso\", or \"dcatap\"\r\n\r\n**Optional**:\r\n\r\nTo download the dataset, use the --download flag. This will save the file in your current directory.\r\n\r\nIf you want to specify the path, you can do that with the --outputdir flag.\r\n\r\n**Examples**:\r\n\r\n`(python) envidat-converter convert labes --converter datacite`\r\n\r\n... will print the dataset with the name \"labes\" in the datacite format in your terminal.\r\n\r\n`(python) envidat-converter convert \"10.16904/envidat.228\" --converter jsonld --download --outputdir \".\\foldername\"`\r\n\r\n... will save the dataset with the DOI 10.16904/envidat.228 in a new folder called \"foldername\".\r\n\r\n</details>\r\n\r\n## API usage\r\n<details>\r\n\r\n<summary>API usage</summary>\r\n\r\nMake sure you have uvicorn installed. Then it's as simple as running\r\n\r\n`uvicorn converters.main:app --port 8080`\r\n\r\n\r\nIt should load up under http://localhost:8080/. Note that you can always change the port number to whatever fits your needs.\r\n\r\nThe docs should open up and help you use the API.\r\n\r\n- To convert metadata, use the convert-metadata endpoint. You can use IDs, package names, or DOIs as query.\r\n- To simply get the EnviDat metadata, use the get-data endpoint. You can use IDs, package names, or DOIs as query.\r\n</details>\r\n\r\n## Addtional information\r\n\r\nThis repository was tested against Python Versions 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. Version 3.8 and 3.9 did not work due to dependency issues. \r\n\r\n### config.ini\r\nIf you are not just handling production data but, for example, have a local database that you want to test, you can add the environment to config.ini. There is no need to restart or reinstall after making changes.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Converters for EnviDat metadata",
"version": "0.1.1",
"project_urls": {
"Changelog": "https://gitlabext.wsl.ch/EnviDat/envidat-converter/-/blob/main/CHANGELOG.md",
"Repository": "https://gitlabext.wsl.ch/EnviDat/envidat-converter/"
},
"split_keywords": [
"envidat"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bdb994733fbe0be25b105d910d71789144a715997f4684a43384a76165b31247",
"md5": "982f38dfcdffa06e30c8f2cb4301e830",
"sha256": "18b5483566167a368daf542d5dd7384e3c6302f5c461048d16bb4f5e043e2d1c"
},
"downloads": -1,
"filename": "envidat_converters-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "982f38dfcdffa06e30c8f2cb4301e830",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 49648,
"upload_time": "2025-07-18T09:17:35",
"upload_time_iso_8601": "2025-07-18T09:17:35.925109Z",
"url": "https://files.pythonhosted.org/packages/bd/b9/94733fbe0be25b105d910d71789144a715997f4684a43384a76165b31247/envidat_converters-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0db0f4d9ee18851a7968180a8a78074884d3db1a1de6b4ca9839e4c3cc078e46",
"md5": "f83a599a5a12c5425b6f41d73753f29e",
"sha256": "bd028288eb59b82c403ecf33ab3031f780990075ca4227ea1ed457bd588d8e78"
},
"downloads": -1,
"filename": "envidat_converters-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "f83a599a5a12c5425b6f41d73753f29e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 42264,
"upload_time": "2025-07-18T09:17:36",
"upload_time_iso_8601": "2025-07-18T09:17:36.796952Z",
"url": "https://files.pythonhosted.org/packages/0d/b0/f4d9ee18851a7968180a8a78074884d3db1a1de6b4ca9839e4c3cc078e46/envidat_converters-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 09:17:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "envidat-converters"
}