Configuration

v0.6.0 (in development)

  • config.toml or config/*.toml will be loaded if you create an instance without any argument.

  • You can change the filename/directory.

Supported Format

  1. TOML

  2. YAMML

Supported Sections

  • sheets
    • url : copy and paste an URL of the Google spreadsheet

    • filename : downloaded filename

    • desc : description for you not to forget

    • datefmt : used as prefix of downloaded filename

    • skip : set true if you wanna skip downloading (default: false)

TOML Examples

sandbox/next.toml
 1[[sheets]]
 2url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM"
 3filename = "test_data/toml_sample1.xlsx"
 4description = "Example for Snapshot module (in TOML)"
 5datefmt = "%Y"
 6skip = false
 7
 8[[sheets]]
 9url = "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=0"
10filename = "snapd/toml_sample2.csv"
11desc = "20210304_storage_comparison"
12datefmt = "%Y%m%d"
13skip = false

YAML Examples

sandbox/next.yaml
 1sheets:
 2- url:  "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM"
 3  filename: "test_data/toml_sample1.xlsx"
 4  description: "Example for Snapshot module (in TOML)"
 5  datefmt: "%Y"
 6  skip: false
 7- url: "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=0"
 8  filename: "snapd/toml_sample2.csv"
 9  desc: "20210304_storage_comparison"
10  datefmt: "%Y%m%d"
11  skip: false

v0.5.0

  • Make ./config/ directory and place your config files (TOML/YAML)

  • If confd does not exist, it will search config files in . (current directory)

  • You can change confd directory

Supported Format

  1. TOML

  2. YAML

  • Don’t mix two formats

  • TOML overrides YAML settings

Supported Sections

  • volumes
    • saved : where to put download files

    • logd : where to put logs

    • logf : name of logfile

  • options
    • wget : --quiet

  • datefmt

  • sheets
    • name : downloaded filename (without extensions)

    • desc : description for you not to forget

    • url : copy and paste an URL of the Google spreadsheet

    • format : select from xlsx, ods, csv, tsv

    • datefmt : used as prefix of downloaded filename

    • skip : set true if you wanna skip downloading (default: false)

TOML Examples

config/sheet.toml
 1[sheets]
 2[sheets.toml_sample1]
 3name = "toml_sample1"
 4desc = "Example for Snapshot module (in TOML)"
 5url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM"
 6format = "xlsx"
 7datefmt = "%Y"
 8
 9[sheets.toml_sample2]
10name = "toml_sample2"
11desc = "20210304_storage_comparison"
12url = "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=0"
13format = "csv"
14datefmt = "%Y%m%d"

YAML Examples

config/config.yml
1volumes:
2   snapd: 'snapd/'
3   logd: 'varlogs/'
4
5options:
6   wget:
7      '--quiet'
8
9datefmt: "%Y%m%dT%H%M%S"
config/sheet.yml
1sheets:
2   yaml_sample1:
3      name: "yaml_sample1"
4      desc = "Example for Snapshot module (in YAML)"
5      url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM"
6      format: "xlsx"
7      datefmt: "%Y"