Getting tired of downloading Google Spreadsheets one by one from the browser ?
Project description
Snapsheets
Getting tired of downloading Google Spreadsheets one by one from the browser ?
This package enables to wget Google Spreadsheets without login. (Spreadsheets should be shared with public link)
Install
$ pip3 install snapsheets
$ pipx install snapsheets
$ uv tool install snapsheets
Usage
$ snapsheets --url="copy_and_paste_url_here"
2022-06-09T08:09:31 | SUCCESS | 🤖 Downloaded snapd/snapsheet.xlsx
2022-06-09T08:09:31 | SUCCESS | 🚀 Renamed to snapd/20220609T080931_snapsheet.xlsx
Docs and Repository
- GitLab Pages : https://qumasan.gitlab.io/snapsheets/
- GitLab Repos : https://gitlab.com/qumasan/snapsheets/
- PyPI package : https://pypi.org/project/snapsheets/
Help
$ 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
- Use
--url
option to download single spreadsheet. - Use
--config
option to download multiple spreadsheets.- create a directory for config files.
- create a config file in TOML format.
Examples
with --url
option
$ snapsheets --url="https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=0"
2022-06-09T08:09:31 | SUCCESS | 🤖 Downloaded snapd/snapsheet.xlsx
2022-06-09T08:09:31 | SUCCESS | 🚀 Renamed to snapd/20220609T080931_snapsheet.xlsx
- Downloaded file is temporarily named as
snapsheet.xlsx
, then renamed with current-time based prefix.
with --config
option
$ snapsheets --config="config/"
2022-06-09T08:05:48 | SUCCESS | 🤖 Downloaded snapd/snapsheet.xlsx
2022-06-09T08:05:48 | SUCCESS | 🚀 Renamed to snapd/2022_toml_sample1.xlsx
2022-06-09T08:05:49 | SUCCESS | 🤖 Downloaded snapd/snapsheet.xlsx
2022-06-09T08:05:49 | SUCCESS | 🚀 Renamed to snapd/20220609_toml_sample3.csv
- Make
./config/
directory and place your TOML files.- If
./config/
does not exist, it will search from. (current directory)
.
- If
- Downloaded files are saved to
./snapd/
directory- If
./snapd/
does not exit, it will be saved in. (current directory)
.
- If
with module import
>>> from snapsheets import Sheet
>>> url = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=0"
>>> sheet = Sheet(url=url, desc="Get Sample Sheet")
>>> sheet.snapshot()
📣 Get Sample Sheet
🤖 Downloaded snapd/snapsheet.xlsx
🚀 Renamed to snapd/20220602T225044_snapsheet.xlsx
Other requirements
- Install
wget
if your system doesn't have them - Make your spreadsheet available with shared link (OK with read-only)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snapsheets-0.7.1.tar.gz
(11.8 kB
view hashes)
Built Distribution
snapsheets-0.7.1-py3-none-any.whl
(13.1 kB
view hashes)
Close
Hashes for snapsheets-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f267047ff302ff0f5edbb228c2f4161626f7406931685bb8fef1d038a2449ba |
|
MD5 | 15b7d8cabe6b5199b236bbc3760bffaa |
|
BLAKE2b-256 | 46d872a9f57d67d360686082e1b07c164b0ba02d21eeca9b759e719f110ed99c |