Skip to main content

Quick and Easy Downloader for Public Google Spreadsheets

Project description

GitLab pipeline PyPI - Licence PyPI PyPI - Status PyPI - Python Version

Snapsheets

Effortlessly download public Google Spreadsheets in bulk!

Tired of downloading Google Spreadsheets one by one through your browser? Snapsheets is here to save you time and effort! With this tool, you can quickly grab multiple Google Spreadsheets straight from your terminal --- all you need is a public link to the sheets.

No more repetitive clicking. No more hassle. No auth needed. Just fast and easy spreadsheet downloading!


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 snapshot.csv
2022-06-09T08:09:31 | SUCCESS  | 🚀 Renamed to _snapshot.csv

Docs and Repository

PyPI - Downloads PyPI - Downloads PyPI - Downloads

Help

snapsheets -h
usage: snapsheets [-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
  • For Sheet-mode: Use --url option to download single spreadsheet.
  • For Book-mode: Use --config option to download multiple spreadsheets.
    • create a directory for config files.
    • create a config file in TOML format.

Examples

Book-mode: with --config argument

$ snapsheets --config="config/"
2022-06-09T08:05:48 | SUCCESS  | 🤖 Downloaded filename.csv
2022-06-09T08:05:48 | SUCCESS  | 🚀 Renamed to 2022_filename.csv
2022-06-09T08:05:49 | SUCCESS  | 🤖 Downloaded filename.csv
2022-06-09T08:05:49 | SUCCESS  | 🚀 Renamed to 20220609_filename.csv

Sheet-mode: with --url argument

snapsheets --url "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit?gid=0#gid=0"
2024-10-02T17:25:06 | SUCCESS  | 🤖 Downloaded as snapshot.csv
2024-10-02T17:25:06 | SUCCESS  | 🚀 Renamed to _snapshot.csv
  • Downloaded file is temporarily named as snapshot.csv, then renamed to _snapshot.csv.

  • Make ./config/ directory and place your TOML files.

    • If ./config/ does not exist, it will search from . (current directory).
  • Downloaded files are saved to ./snapd/ directory

    • If ./snapd/ does not exit, it will be saved in . (current directory).

As module: import snapsheets

from snapsheets.sheet 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 snapshot.csv
🚀 Renamed to 20220602T225044_snapshot.csv

Other requirements

  • Install wget if your system doesn't have them
  • Make your spreadsheet available with shared link (OK with read-only)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapsheets-1.1.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

snapsheets-1.1.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file snapsheets-1.1.1.tar.gz.

File metadata

  • Download URL: snapsheets-1.1.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for snapsheets-1.1.1.tar.gz
Algorithm Hash digest
SHA256 35bb2cb3ec5dcb3690c09ea07acbe55241babf730bd6c43c15cc0f44d53089a2
MD5 194bdb78dd8ca7a1a0ca59cbc73ea38e
BLAKE2b-256 dc3159e3b49e57cbc9fccca5b8b1a3a871f9fd4128e96b4ce1c5191354017708

See more details on using hashes here.

File details

Details for the file snapsheets-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: snapsheets-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for snapsheets-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f5966fa58191a3765b91804c14052a75771df4bbe2730765eb305a6b32648b1
MD5 70799914250e0bee9b16a822544af737
BLAKE2b-256 50b5af33ba0234199827dcad913392ef98ab0a3041abfd7985205347b76f4641

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page