Skip to content

Commit

Permalink
add CLI release action and improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
parrotmac committed Jan 10, 2024
1 parent d2169e8 commit 37c759c
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 3 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
# sccache: 'true'
manylinux: 2_24
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -103,7 +102,7 @@ jobs:
path: dist

release:
name: Release
name: Release to PyPI
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
Expand All @@ -118,3 +117,27 @@ jobs:
with:
command: upload
args: --non-interactive --skip-existing *

release-cli:
name: Release CLI ${{ matrix.target }}
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This module is designed to provide a standalone CLI and Python package to bulk-download Google Sheets to a single JSON file.

#### Why would I use this?
- You have a large number of Google Sheets that you want to download and use in a single application
- You want to cache the data from Google Sheets to avoid hitting the Google Sheets API rate limits

#### Why wouldn't I use this?
- You don't have a large number of Google Sheets to download. You're probably better off using the Google Sheets API directly.
- You need more control over which data is pulled back from Google Sheets. This includes either filtering for only specific values, or dynamically pulling back a specific set of sheets based on some criteria.

## Installation

```bash
Expand All @@ -27,7 +35,39 @@ load_sheets(

### CLI

__TODO__: Add CLI documentation
_Pre-built binaries are available on the [Releases](https://github.com/nvdnc/linen-closet/releases) page._

__Help Text__

```
Usage: linen_closet [OPTIONS]
Options:
-o, --output-filename <OUTPUT_FILENAME>
Output file name [default: workbooks.json]
-m, --max-download-concurrency <MAX_DOWNLOAD_CONCURRENCY>
Max download concurrency [default: 50]
-s, --sheet-configuration <SHEET_CONFIGURATION>
Sheet configuration [default: sheets.yaml]
-c, --credentials-file-path <CREDENTIALS_FILE_PATH>
Credentials file path [default: credentials.json]
-e, --existing-file <EXISTING_FILE>
Existing file to read from
-h, --help
Print help
-V, --version
Print version
```

__Example__

```bash
linen_closet \
--credentials-file-path credentials.json \
--output-filename workbooks.json \
--sheet-configuration sheets.yaml \
--max-download-concurrency 50
```

## License

Expand Down

0 comments on commit 37c759c

Please sign in to comment.