Skip to content

[info] command general improvements #287

@anuveyatsu

Description

@anuveyatsu

Original issue created by @rufuspollock :

All of the following commands should do something sensible:

data info my.pdf
data info my.xls
data info abc.xx

My sense is that info command should do the following (mimicking what i do as a data wrangler):

  1. Is this a Data Package? If so jump to step 2. If this is a directory. Jump to step 2 after walking this directory and turning it into an (implicit) data package. Else: this is a file and go to step 1
  2. Output the kind of thing ls does i.e. name, size, last modified, mimetype
    • Could have a bonus for telling the user something about this file type if it is a known wrangling file type
  3. If this is a "dataset" file e.g. excel (multiple sheets in a one file), sqlite, zip etc THEN: display the manifest (i.e. resources in the "datapackage.json") for this file if that is discernable. For each such resource display appropriate "ls" type info.
  4. For each "subfile" (i.e. resource) in this dataset (data package) display more info and in particular seek to preview the data in a sensible way (maybe also print out instructions for doing a full cat on this subfile e.g. data cat --sheet=3 myfile.xls)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions