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

Hard-to-read structured output from "datalad ls" #18

Open
TobiasKadelka opened this issue Jul 24, 2019 · 8 comments
Open

Hard-to-read structured output from "datalad ls" #18

TobiasKadelka opened this issue Jul 24, 2019 · 8 comments

Comments

@TobiasKadelka
Copy link

@mih When using

datalad ls -L s3://hcp-openaccess/HCP_1200/100206/unprocessed/3T/100206_3T.csv

the output is hard to read and parse, which makes it hard to use this information.

@mih mih transferred this issue from datalad/datalad-crawler Jul 24, 2019
@mih
Copy link
Member

mih commented Jul 24, 2019

@TobiasKadelka I have transferred this issue to datalad/datalad which provides the ls command.

It would indeed be good, if ls could provide structured output in a way that makes it straightforward to wrangle it to be suitable input for addurls -t json. If addurls would additionally also support eating a JSON stream instead of an array of objects, they might even get piped together.

ATM datalad ls --long provides a custom format solution that requires a custom parser.

@kyleam
Copy link
Collaborator

kyleam commented Jul 24, 2019 via email

@yarikoptic
Copy link
Member

IMHO it also relates to datalad/datalad#2126 since that one should feed records into pyout so it would become just a matter of switching "output formatter"

@yarikoptic
Copy link
Member

Regarding original issue - let me know in which language you would prefer to see the one or two liner to parse it? Having said that may be indeed easiest just to write targeted code using boto in Python so it goes faster without trying to validate URLs etc

@kyleam
Copy link
Collaborator

kyleam commented Jul 24, 2019 via email

@kyleam
Copy link
Collaborator

kyleam commented Jul 24, 2019 via email

@yarikoptic
Copy link
Member

Re pyout - sorry I want clear. I didn't want pyout to output json , but changes in that pr could be relevant as when to restructure code so we could could switch output renderer where one could be pyout consuming the records, and another one just print them out and json

@kyleam
Copy link
Collaborator

kyleam commented Jul 24, 2019 via email

@mih mih transferred this issue from datalad/datalad Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants