A tool to convert frictionless datapackage (YAML or JSON) to markdown file (that can be used as README).
You can obtain a markdown file like this.
Download frictionless2md
wget "https://raw.githubusercontent.com/dennisangemi/frictionless2md/main/frictionless2md"
Move it to /usr/local/bin
sudo mv ./frictionless2md /usr/local/bin
Make it executable
sudo chmod +x /usr/local/bin/frictionless2md
You can simply launch
frictionless2md
in a directory where a datapackage is located. The default output file will be METADATA.md
.
Here's a summary
Short option | Long option | Requires argument | Description |
---|---|---|---|
-h |
--help |
false |
Show help. See more |
-v |
--version |
false |
Show version number. See more |
-w |
--warnings |
false |
Show warnings. See more |
-o |
--output |
true |
Set custom output filename. See more |
-t |
--tree |
false |
Add repository structure (tree). See more |
-u |
--userepo |
true |
Add GitHub URLs to files. See more |
-m |
--mention |
false |
Mention this tool at the end of the generated file. See more |
-h
or --help
If you want to open the help, you can run
frictionless2md -h
-v
or --version
If you want to understand which version of the tool you have, use -v
or --version
flag as follow
frictionless2md -v
-w
or --warnings
If you want to see the warnings, you can use -w
or --warnings
flag:
frictionless2md -w
and you will get for example
⚠️ Warning: data/contenuti.csv not found. Your METADATA.md will not contain the example column.
-o
or --output
If you want to use a custom output filename you can use -o
or --output
flag:
frictionless2md -o customfilename.md
-t
or --tree
If you want to add the tree of the folder where your datapackage is located you can add the -t
or --tree
flag:
frictionless2md -t
This option requires the tree-emoji-cli
utility.
Your output will be something like this
🌳 /Documents/GitHub/myrepo
├── 📄 CHANGELOG.md
├── 📄 METADATA.md
├── 📄 README.md
├── 📄 build
├── 📁 data
└── 📄 datapackage.yaml
-u
or --userepo
You can add "- URL" to the bulleted list of the output (Data dictionary section) specifying the flag -u
(or --userepo
) followed by your GitHub username and the repository name (username/repo
):
frictionless2md -u chiaraadornetto/dati-tv-elezioni-ue-2019
and you will get for example
-m
or --mention
Use -m
or --mention
flag to nention this tool at the end of the generated file.
frictionless2md -m
Will add this line to the output
Generated from datapackage.yaml with
frictionless2md
frictionless2md
is a bash script based on these requirements.
tool | docs | mandatory |
---|---|---|
frictionless |
frictionless-py | true |
mlr |
miller | true |
jq |
jq | true |
yq |
yq | false |
tree |
tree-emoji-cli | false |