XML plugin
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 886
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
is xml supported by the cmdline converter?
I've tried:
$ pip3 install rows[xml]
...
$ curl 'http://webservices.ingv.it/fdsnws/event/1/query?starttime=2012-05-29T00:00:00&endtime=2012-05-29T23:59:59' > test.xml
$ rows convert test.xml test.json
Traceback (most recent call last):
File "/home/andy/.local/lib/python3.6/site-packages/rows/utils.py", line 403, in import_from_source
import_function = getattr(rows, "import_from_{}".format(plugin_name))
AttributeError: module 'rows' has no attribute 'import_from_None'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/andy/.local/bin/rows", line 11, in <module>
sys.exit(cli())
File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/andy/.local/lib/python3.6/site-packages/rows/cli.py", line 201, in convert
import_fields=import_fields,
File "/home/andy/.local/lib/python3.6/site-packages/rows/cli.py", line 73, in _import_table
**kwargs,
File "/home/andy/.local/lib/python3.6/site-packages/rows/utils.py", line 424, in import_from_uri
return import_from_source(source, default_encoding, *args, **kwargs)
File "/home/andy/.local/lib/python3.6/site-packages/rows/utils.py", line 405, in import_from_source
raise ValueError('Plugin (import) "{}" not found'.format(plugin_name))
ValueError: Plugin (import) "None" not found
UPDATE: i've checked the code and it seems XML is not currently supported, so i am turning this into a feature request...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the command-line converter path shown in rows/cli.py and the plugin lookup in rows/utils.py. Reproduce the reported rows convert test.xml test.json command, then verify that XML input converts successfully to JSON through the plugin system.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100