Skip to main content

Wget snapshots of google sheets

Project description

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

Snapsheets

Wget snapshots of Google Spreadsheets

This package enables to wget Google Spreadsheets without login. (Spreadsheets should be shared with public link)


Usage

>>> import snapsheets as ss
>>> sample_url1 = "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=0"
>>> sheet = ss.Sheet(url=sample_url1, desc="Get Sample Sheet")
>>> sheet.snapshot()
📣 Get Sample Sheet
🤖 Downloaded snapd/snapsheet.xlsx
🚀 Renamed to snapd/20210412T104727_snapsheet.xlsx

Command Line Tool with configuration files (from v0.5.0)

  • Make ./config/ directory and place your TOML/YAML configuration 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).
    • (Options to switch directory might be added later)
$ snapsheets
📣 Example for Snapshot module (in TOML)
🤖 Downloaded snapd/snapsheet.xlsx
🚀 Renamed to snapd/2021_toml_sample1.xlsx
📣 20210304_storage_comparison
🤖 Downloaded snapd/snapsheet.xlsx
🚀 Renamed to snapd/20210412_toml_sample2.xlsx

Command Line Tool with Single file (from v0.5.0)

  • Use --url option to download single spreadsheet.
  • Downloaded file is automatically named as snapsheet.xlsx
  • (More options might be added later)
$ snapsheets --url "https://docs.google.com/spreadsheets/d/1NbSH0rSCLkElG4UcNVuIhmg5EfjAk3t8TxiBERf6kBM/edit#gid=0"
📣 snapsheet
🤖 Downloaded snapd/snapsheet.xlsx
🚀 Renamed to snapd/20210412T104926_snapsheet.xlsx

v0.2.3 or older

  • Added DeprecationWarnings
  • It still works
>>> print("💥💥💥 deprecated since version 0.2.3 💥💥💥")
>>> fname = "config/config.yml"
>>> ss.config.add_config(fname)
snapsheets/sandbox/snapper.py:28: DeprecationWarning: Call to deprecated function (or staticmethod) add_config. (Will be removed.) -- Deprecated since version 0.2.3.
  ss.config.add_config(fname)
>>> fname = "config/gsheet.yml"
>>> ss.config.add_config(fname)
snapsheets/sandbox/snapper.py:30: DeprecationWarning: Call to deprecated function (or staticmethod) add_config. (Will be removed.) -- Deprecated since version 0.2.3.
  ss.config.add_config(fname)
>>> fname = ss.gsheet.get("test1", by="wget")
snapsheets/sandbox/snapper.py:31: DeprecationWarning: Call to deprecated function (or staticmethod) get. (Will be removed) -- Deprecated since version 0.3.0.
  fname = ss.gsheet.get("test1", by="wget")
2021-04-07 19:44:18 - INFO - gsheet.py - snapsheets.gsheet - download - ダウンロードするよ : test1
2021-04-07 19:44:19 - INFO - gsheet.py - snapsheets.gsheet - download - ダウンロードしたよ : snapd/test_sheet.xlsx
2021-04-07 19:44:19 - INFO - gsheet.py - snapsheets.gsheet - backup - 移動するよ : test_sheet.xlsx
2021-04-07 19:44:19 - INFO - gsheet.py - snapsheets.gsheet - backup - 移動したよ : 2021_test_sheet.xlsx

Documents


PyPI package

PyPI - Downloads PyPI - Downloads PyPI - Downloads

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-0.5.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapsheets-0.5.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snapsheets-0.5.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Darwin/20.3.0

File hashes

Hashes for snapsheets-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5c89d13e30370dbf14e242066c5a0c01ac912a05c6fdff61bca67a17cfd1a82f
MD5 ef3b678f4b7fa3e1a657d69bd50fa439
BLAKE2b-256 e35c6bcd5e524416ef84370316ee1b9e42f20a0b07d05e28e92e24b97bd77d8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snapsheets-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Darwin/20.3.0

File hashes

Hashes for snapsheets-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f126b6c32bd2f7ea63a2118fa86e4aa0861e4b0a698099577c270b86a110988c
MD5 a13a9a750f27f9e260b638c8bc6e1e07
BLAKE2b-256 2e0a9b10052f53db1c769e3b4012e39da68ee2ab971968f4c45948b1d43b5576

See more details on using hashes here.

Supported by

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