# v0.6.0 (in development) 1. Organizing classes : ``Sheet`` and ``Book`` 1. Add ``snapsheets-next`` command 1. Changed items in configuration 1. Keep ``snapsheets`` command (will be deprecated) ## CLI ### snapsheets ```console $ snapsheets -h usage: snapsheets [-h] [--config CONFIG] [--url URL] [--debug] [--version] options: -h, --help show this help message and exit --config CONFIG set config directory (default: ./config/) --url URL copy and paste an URL of the Google spreadsheet --debug show more messages --version show program's version number and exit ``` ### snapsheets-next ```console $ snapsheets-next -h usage: snapsheets-next [-h] [--config config | --url url] [-o filename] [-d description] [-t format] [--skip] [--debug] [--version] snapsheets options: -h, --help show this help message and exit --config config set config file or directory --url url set URL of Google spreadsheet -o filename set output filename -d description set description of a spreadsheet -t format set datetime prefix for backup filename --skip skip file --debug show more messages --version show program's version number and exit ``` ## Show version ```console $ snapsheets --version 0.5.7 $ snapsheets-next --version 0.6.4 ``` ## Configurations - ``config.toml`` or ``config/*.toml`` will be loaded if you create an instance without any argument. - You can change the filename/directory. ### Supported Format #. ``TOML`` #. ``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) ### config/snapsheets.toml ```toml [tool.snapsheets] datefmt = "%Y%m%dT%H%M%S" [tool.snapsheets.volumes] saved = "./snapd/" logd = "./varlogs/" logf = "snapsheets.log" [tool.snapsheets.options] wget = "--quiet" ``` ### config/gsheet.toml ```toml [sheets] [sheets.toml_sample1] name = "toml_sample1" desc = "Sample1 : A spreadsheet for snapsheets (in TOML)" url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=0" format = "xlsx" datefmt = "%Y" skip = false [sheets.toml_sample2] name = "toml_sample2" desc = "Sample2 : A spreadsheet for snapsheets (in TOML)" url = "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=2015536778" format = "csv" datefmt = "%Y%m%d" skip = true [sheets.toml_sample3] name = "toml_sample3" desc = "Sample3: A spreadsheet for snapsheets (in TOML)" url = "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=2015536778" format = "csv" datefmt = "%Y%m%d" skip = false ``` ### TOML Examples ```{code-block} toml --- linenos: caption: sandbox/next.toml --- [[sheets]] url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM" filename = "test_data/toml_sample1.xlsx" description = "Example for Snapshot module (in TOML)" datefmt = "%Y" skip = false [[sheets]] url = "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=0" filename = "snapd/toml_sample2.csv" desc = "20210304_storage_comparison" datefmt = "%Y%m%d" skip = false ``` ### YAML Examples ```{code-block} yaml --- linenos: caption: sandbox/next.yaml --- sheets: - url: "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=01NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM" filename: "test_data/toml_sample1.xlsx" description: "Example for Snapshot module (in TOML)" datefmt: "%Y" skip: false - url: "https://docs.google.com/spreadsheets/d/16Sc_UgShNuxMfRnBiFsjmfThE1VfVhJf3jgmxNvFeEI/edit#gid=0" filename: "snapd/toml_sample2.csv" desc: "20210304_storage_comparison" datefmt: "%Y%m%d" skip: false ```