Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add route describing different export formats #80

Open
anne17 opened this issue Dec 12, 2023 · 3 comments
Open

Add route describing different export formats #80

anne17 opened this issue Dec 12, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@anne17
Copy link
Member

anne17 commented Dec 12, 2023

Add another route that provides information about the different Sparv export formats. This can be used by the frontend. Right now it's hard for a user to know what's what.

@anne17 anne17 added the enhancement New feature or request label Dec 12, 2023
@anne17
Copy link
Member Author

anne17 commented Dec 18, 2023

Just realized that we already have something like that in the backend: https://ws.spraakbanken.gu.se/ws/mink/sparv-exports. This information is computed by sending the sparv run -l command on the command line and parsing the output.

From the /list-exports call we get file paths like csv_export/dokument2.csv and xml_export.pretty, but it is not obvious how they should be mapped to the information from the /sparv-exports call where we get things like "export": "csv_export:csv" and "export": "xml_export:pretty".

Any ideas @MartinHammarstedt?

@MartinHammarstedt
Copy link
Member

We could have a verbose version of the export listing in Sparv (maybe in JSON format for easier parsing), which could include output info about the exporters. It would look like this for exporters with one export file per source file: export/xml_export.scrambled/{file}_export.xml.

@MartinHammarstedt
Copy link
Member

sparv modules --exporters --json now gives this info in a machine readable format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants