Usage: seedcase-flower COMMAND Flower generates human-readable documentation from Data Packages. ╭─ Commands ───────────────────────────────────────────────────────────────────╮ │ <build> Build human-readable documentation from a │ │ datapackage.json file. │ │ <view> Display the contents of a datapackage.json in a │ │ human-friendly way. │ │ --help Display this message and exit. │ │ --install-completion Install shell completion for this application. │ │ --version Display application version. │ ╰──────────────────────────────────────────────────────────────────────────────╯
Using the CLI
Flower’s CLI has two commands: view which displays a Data Package’s metadata in the terminal, and build which generates plain text documentation files from it. The general pattern for the CLI is:
To get an overview of the available commands and flags, run the following command, which is equivalent to using the --help flag:
Viewing Data Package metadata
To view the metadata in an easy-to-read format optimised for the terminal, use the view command:
This example shows the output of running seedcase-flower view in a directory containing a datapackage.json from the example Data Package flora. Note that the output from view is optimized for rendering in a terminal, so some aspects of it might not display as expected here.
flora: Observations of flora species and seasonal development
Licenses:
• ]8;id=16720225;https://creativecommons.org/publicdomain/zero/1.0/legalcode\CCO 1.0 UNIVERSAL]8;;\
• ]8;id=16720226;https://opensource.org/licenses/AFL-3.0\Academic Free License 3.0]8;;\
Version: 1.2.3
A dataset containing flora species records and their observed growth stages
across different environments.
Contributors
• Jane Dölitz (]8;id=16720233;mailto:jane-doelitz@example.com\jane-doelitz@example.com]8;;\): creator
• John Smith (]8;id=16720234;mailto:john-smith@example.com\john-smith@example.com]8;;\): author, data collector
Resources
species_catalog: Flora Species
This resource contains a catalog of flora species.
• Path: resources/species_catalog/data.parquet
• Primary key: (species_id)
• Foreign keys:
• parent_species_id → species_catalog.species_id
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃Name ┃Title ┃Type ┃Description ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│species_id │Species ID │integer │The unique identifier for each │
│ │ │ │species. │
│scientific_name │Scientific name │string │The Latin name of the species. │
│common_name │Common name │string │The common name of the species. │
│family │Family │string │The Latin family to which the │
│ │ │ │species belongs. │
│parent_species_id │Parent Species │integer │The parent species of this │
│ │ │ │species. │
└──────────────────┴────────────────┴────────┴─────────────────────────────────┘
: Fields in the species_catalog resource.
location_catalog: Flora Species Locations
This resource contains a catalog of flora species locations.
• Path: resources/location_catalog/data.parquet
• Primary key: (region, country)
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃Name ┃Title ┃Type ┃Description ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│region │Region │string │The region the location is in. │
│country │Country │string │The country the location is in. │
│local_name │Local Name │string │The name of the location in the local │
│ │ │ │language. │
└───────────┴───────────┴───────┴──────────────────────────────────────────────┘
: Fields in the location_catalog resource.
growth_records: Growth Stage Records
This resource contains records of observed growth stages for various flora
species.
• Path: resources/growth_records/data.parquet
• Primary key: (record_id)
• Foreign keys:
• species_id → species_catalog.species_id
• location_region, location_country → location_catalog.[region, country]
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃Name ┃Title ┃Type ┃Description ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│record_id │Record ID │integer │The unique identifier for each │
│ │ │ │growth record. │
│species_id │Species │integer │The species the observation was │
│ │ │ │made for. │
│observation_date │Observation date │date │The date when the observation was│
│ │ │ │made. │
│growth_stage │Growth Stage │string │The observed growth stage of the │
│ │ │ │species. │
│location_region │Location Region │string │The region of the location. │
│location_country │Location Country │string │The country of the location. │
└─────────────────┴─────────────────┴────────┴─────────────────────────────────┘
: Fields in the growth_records resource.
Viewing metadata in a custom location
By default, view looks for a datapackage.json file in the current directory, but you can specify a different path if needed:
You can also point Flower to a remote Data Package by providing the full URL to the datapackage.json. For example:
Terminal
Note that the output from view is optimized for rendering in a terminal, so some aspects of it might not display as expected here.
example-seed-beetle: Complex mitonuclear interactions and metabolic costs of mating in male seed beetles Licenses: • ]8;id=7294402;https://creativecommons.org/publicdomain/zero/1.0/legalcode\CCO 1.0 UNIVERSAL]8;;\ Version: 0.4.1 Data from the 2015 on metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. This repository shows how to use the Seedcase Sprout tools on a data set of seed beetle data. The data is from a study by ]8;id=7294409;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\Immonen et al.]8;;\]8;id=7294409;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\ ]8;;\]8;id=7294409;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\(2015)]8;;\ and is available on ]8;id=7294410;https://zenodo.org/records/4932381\Zenodo]8;;\. Contributors • Elina Immonen: creator • Johanna Liljestrand-Rönn: creator • Christopher Watson: creator • David Berger: creator • Göran Arnqvist: creator Resources metabolic-rate: Metabolic rate of the seed beetles This dataset contains metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. • Path: resources/metabolic-rate/data.parquet • Primary key: (id) ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ ┃Name ┃Title ┃Type ┃Description ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │cycle │Cycle │integer │Focal cycle in the │ │ │ │ │respirometry. Note │ │ │ │ │that the number one │ │ │ │ │here corresponds to │ │ │ │ │the real cycle number │ │ │ │ │two, as the first one │ │ │ │ │was removed as a │ │ │ │ │burn-in. Original │ │ │ │ │field name: CYCLE. │ │o2_consumed │O2 consumed │number │Original field name: │ │ │ │ │O2. │ │co2_produced │CO2 produced │number │Original field name: │ │ │ │ │CO2. │ │respiratory_quotient │Respiratory quotient │number │Original field name: │ │ │ │ │RQ. │ │block │Block │string │Experimental block. │ │ │ │ │Original field name: │ │ │ │ │BLOCK. │ │activity │Activity │number │Original field name: │ │ │ │ │ACTIVITY. │ │strain │Strain │string │Line identity. │ │ │ │ │Original field name: │ │ │ │ │STRAIN. │ │mitochondrial_dna_li… │Mitochondrial DNA │string │Original field name: │ │ │lineage │ │MT_DNA_HAPLOTYPE. │ │nuclear_lineage │Nuclear lineage │string │Original field name: │ │ │ │ │NC_GENOTYPE. │ │mating_treatment │Mating treatment │string │Mated or virgin. │ │ │ │ │Original field name: │ │ │ │ │TREATMENT. │ │coadaptation │Coadaptation │integer │Coadaptation of the │ │ │ │ │mitochondrial and │ │ │ │ │nuclear lineage │ │ │ │ │genomes. Original │ │ │ │ │field name: COEVOL. │ │virgin_body_weight │Virgin body weight │number │Unit: g. Original │ │ │ │ │field name: W_V. │ │body_weight_after_ma… │Body weight after │number │Body weight after │ │ │mating │ │mating, prior to │ │ │ │ │respirometry │ │ │ │ │measurements. Unit: g.│ │ │ │ │Original field name: │ │ │ │ │W_M1. │ │mated_body_weight_af… │Mated body weight │number │Mated male body weight│ │ │after respirometry │ │after the │ │ │ │ │respirometry, prior to│ │ │ │ │second mating. Unit: │ │ │ │ │g. Original field [37 m│ │ │ │ │name: W_M1R. │ │ejaculate_weight_fir… │Ejaculate weight in │number │Unit: g. Original │ │ │the first mating │ │field name: EJAC1. │ │ejaculate_weight_sec… │Ejaculate weight in │number │Unit: g. Original │ │ │the second mating │ │field name: EJAC2. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the first mating │ │field name: │ │ │ │ │COPULDUR_1. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the second mating │ │field name: │ │ │ │ │COPULDUR_2. │ │id │ID │integer │Experimental subject │ │ │ │ │identity. Original │ │ │ │ │field name: ID. │ └──────────────────────┴───────────────────────┴────────┴──────────────────────┘ : Fields in the metabolic-rate resource.
For Data Packages on GitHub, use the gh: prefix as a shortcut instead of the full URL:
Note that the output from view is optimized for rendering in a terminal, so some aspects of it might not display as expected here.
example-seed-beetle: Complex mitonuclear interactions and metabolic costs of mating in male seed beetles Licenses: • ]8;id=4408516;https://creativecommons.org/publicdomain/zero/1.0/legalcode\CCO 1.0 UNIVERSAL]8;;\ Version: 0.4.1 Data from the 2015 on metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. This repository shows how to use the Seedcase Sprout tools on a data set of seed beetle data. The data is from a study by ]8;id=4408523;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\Immonen et al.]8;;\]8;id=4408523;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\ ]8;;\]8;id=4408523;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\(2015)]8;;\ and is available on ]8;id=4408524;https://zenodo.org/records/4932381\Zenodo]8;;\. Contributors • Elina Immonen: creator • Johanna Liljestrand-Rönn: creator • Christopher Watson: creator • David Berger: creator • Göran Arnqvist: creator Resources metabolic-rate: Metabolic rate of the seed beetles This dataset contains metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. • Path: resources/metabolic-rate/data.parquet • Primary key: (id) ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ ┃Name ┃Title ┃Type ┃Description ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │cycle │Cycle │integer │Focal cycle in the │ │ │ │ │respirometry. Note │ │ │ │ │that the number one │ │ │ │ │here corresponds to │ │ │ │ │the real cycle number │ │ │ │ │two, as the first one │ │ │ │ │was removed as a │ │ │ │ │burn-in. Original │ │ │ │ │field name: CYCLE. │ │o2_consumed │O2 consumed │number │Original field name: │ │ │ │ │O2. │ │co2_produced │CO2 produced │number │Original field name: │ │ │ │ │CO2. │ │respiratory_quotient │Respiratory quotient │number │Original field name: │ │ │ │ │RQ. │ │block │Block │string │Experimental block. │ │ │ │ │Original field name: │ │ │ │ │BLOCK. │ │activity │Activity │number │Original field name: │ │ │ │ │ACTIVITY. │ │strain │Strain │string │Line identity. │ │ │ │ │Original field name: │ │ │ │ │STRAIN. │ │mitochondrial_dna_li… │Mitochondrial DNA │string │Original field name: │ │ │lineage │ │MT_DNA_HAPLOTYPE. │ │nuclear_lineage │Nuclear lineage │string │Original field name: │ │ │ │ │NC_GENOTYPE. │ │mating_treatment │Mating treatment │string │Mated or virgin. │ │ │ │ │Original field name: │ │ │ │ │TREATMENT. │ │coadaptation │Coadaptation │integer │Coadaptation of the │ │ │ │ │mitochondrial and │ │ │ │ │nuclear lineage │ │ │ │ │genomes. Original │ │ │ │ │field name: COEVOL. │ │virgin_body_weight │Virgin body weight │number │Unit: g. Original │ │ │ │ │field name: W_V. │ │body_weight_after_ma… │Body weight after │number │Body weight after │ │ │mating │ │mating, prior to │ │ │ │ │respirometry │ │ │ │ │measurements. Unit: g.│ │ │ │ │Original field name: │ │ │ │ │W_M1. │ │mated_body_weight_af… │Mated body weight │number │Mated male body weight│ │ │after respirometry │ │after the │ │ │ │ │respirometry, prior to│ │ │ │ │second mating. Unit: │ │ │ │ │g. Original field │ │ │ │ │name: W_M1R. │ │ejaculate_weight_fir… │Ejaculate weight in │number │Unit: g. Original │ │ │the first mating │ │field name: EJAC1. │ │ejaculate_weight_sec… │Ejaculate weight in │number │Unit: g. Original │ │ │the second mating │ │field name: EJAC2. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the first mating │ │field name: │ │ │ │ │COPULDUR_1. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the second mating │ │field name: │ │ │ │ │COPULDUR_2. │ │id │ID │integer │Experimental subject │ │ │ │ │identity. Original │ │ │ │ │field name: ID. │ └──────────────────────┴───────────────────────┴────────┴──────────────────────┘ : Fields in the metabolic-rate resource.
Styling terminal output
Use the --style flag to format the terminal output with any of the built-in view styles. For example:
This output will look identical to the output above, since quarto-one-page is the default style for view.
Note that the output from view is optimized for rendering in a terminal, so some aspects of it might not display as expected here.
example-seed-beetle: Complex mitonuclear interactions and metabolic costs of mating in male seed beetles Licenses: • ]8;id=1003128;https://creativecommons.org/publicdomain/zero/1.0/legalcode\CCO 1.0 UNIVERSAL]8;;\ Version: 0.4.1 Data from the 2015 on metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. This repository shows how to use the Seedcase Sprout tools on a data set of seed beetle data. The data is from a study by ]8;id=1003135;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\Immonen et al.]8;;\]8;id=1003135;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\ ]8;;\]8;id=1003135;https://onlinelibrary.wiley.com/doi/10.1111/jeb.12789\(2015)]8;;\ and is available on ]8;id=1003136;https://zenodo.org/records/4932381\Zenodo]8;;\. Contributors • Elina Immonen: creator • Johanna Liljestrand-Rönn: creator • Christopher Watson: creator • David Berger: creator • Göran Arnqvist: creator Resources metabolic-rate: Metabolic rate of the seed beetles This dataset contains metabolic rate, respiratory quotient, body weight and ejaculate weight data from seed beetles with different mitonuclear genotypes. • Path: resources/metabolic-rate/data.parquet • Primary key: (id) ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓ ┃Name ┃Title ┃Type ┃Description ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩ │cycle │Cycle │integer │Focal cycle in the │ │ │ │ │respirometry. Note │ │ │ │ │that the number one │ │ │ │ │here corresponds to │ │ │ │ │the real cycle number │ │ │ │ │two, as the first one │ │ │ │ │was removed as a │ │ │ │ │burn-in. Original │ │ │ │ │field name: CYCLE. │ │o2_consumed │O2 consumed │number │Original field name: │ │ │ │ │O2. │ │co2_produced │CO2 produced │number │Original field name: │ │ │ │ │CO2. │ │respiratory_quotient │Respiratory quotient │number │Original field name: │ │ │ │ │RQ. │ │block │Block │string │Experimental block. │ │ │ │ │Original field name: │ │ │ │ │BLOCK. │ │activity │Activity │number │Original field name: │ │ │ │ │ACTIVITY. │ │strain │Strain │string │Line identity. │ │ │ │ │Original field name: │ │ │ │ │STRAIN. │ │mitochondrial_dna_li… │Mitochondrial DNA │string │Original field name: │ │ │lineage │ │MT_DNA_HAPLOTYPE. │ │nuclear_lineage │Nuclear lineage │string │Original field name: │ │ │ │ │NC_GENOTYPE. │ │mating_treatment │Mating treatment │string │Mated or virgin. │ │ │ │ │Original field name: │ │ │ │ │TREATMENT. │ │coadaptation │Coadaptation │integer │Coadaptation of the │ │ │ │ │mitochondrial and │ │ │ │ │nuclear lineage │ │ │ │ │genomes. Original │ │ │ │ │field name: COEVOL. │ │virgin_body_weight │Virgin body weight │number │Unit: g. Original │ │ │ │ │field name: W_V. │ │body_weight_after_ma… │Body weight after │number │Body weight after │ │ │mating │ │mating, prior to │ │ │ │ │respirometry │ │ │ │ │measurements. Unit: g.│ │ │ │ │Original field name: │ │ │ │ │W_M1. │ │mated_body_weight_af… │Mated body weight │number │Mated male body weight│ │ │after respirometry │ │after the │ │ │ │ │respirometry, prior to│ │ │ │ │second mating. Unit: │ │ │ │ │g. Original field │ │ │ │ │name: W_M1R. │ │ejaculate_weight_fir… │Ejaculate weight in │number │Unit: g. Original │ │ │the first mating │ │field name: EJAC1. │ │ejaculate_weight_sec… │Ejaculate weight in │number │Unit: g. Original │ │ │the second mating │ │field name: EJAC2. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the first mating │ │field name: │ │ │ │ │COPULDUR_1. │ │copulation_duration_… │Copulation duration of │number │Unit: sec. Original │ │ │the second mating │ │field name: │ │ │ │ │COPULDUR_2. │ │id │ID │integer │Experimental subject │ │ │ │ │identity. Original │ │ │ │ │field name: ID. │ └──────────────────────┴───────────────────────┴────────┴──────────────────────┘ : Fields in the metabolic-rate resource.
view only works with single-page built-in styles; multi-page styles are not supported.
view is only configurable via command line flags. This means that any options set in Flower’s configuration file are ignored, even those with the same name as the options passed to view.
For more details, see the view reference or run:
Building documentation from Data Package metadata
To convert Data Package metadata into human-friendly plain text files for building shareable documentation, such as a website or PDF, use the build command:
This example shows the output files generated when running seedcase-flower build --style quarto-resource listing in a directory containing a datapackage.json from the example Data Package flora.
index.qmd
This command generates one new file, docs/index.qmd, since build by default uses the quarto-one-page style. The qmd extension means that this file is a Quarto-flavored Markdown file. While this is the default format, you can specify your own custom templates as detailed in the custom styles guide.
Changing input and output directory
By default, build will look for a datapackage.json file in the current directory, but you can use a different source location if you want, just like with view:
To generate files in a different location, use the --output-dir flag with a folder name. For example:
This will generate my-dir/index.qmd instead of docs/index.qmd.
Styling the output
Like view, build accepts a --style option to control how metadata content and files are organised using one of the built-in styles. For example, to split each resource into its own file, use the quarto-resource-listing style:
This example shows the output files generated when running seedcase-flower build --style quarto-resource listing in a directory containing a datapackage.json from the example Data Package flora.
index.qmd resources
Like the default quarto-one-page style, quarto-resource-listing creates a docs/index.qmd. In addition, it creates a separate file for each data resource in the docs/resources/ folder.
You can see examples of the available built-in styles on the Examples page and read more about how to create your own custom style in the custom styles guide.
For more details, see the build reference or run: