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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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