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 snapd/snapsheet.xlsx
2022-06-09T08:09:31 | SUCCESS  | 🚀 Renamed to snapd/20220609T080931_snapsheet.xlsx

Docs and Repository

PyPI - Downloads PyPI - Downloads PyPI - Downloads

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

Book-mode: with --config argument

$ 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

Sheet-mode: with --url argument

$ 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.

  • 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 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


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.0.0.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

snapsheets-1.0.0-py3-none-any.whl (13.5 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