Metadata-Version: 2.4
Name: coolstuffscrape
Version: 0.3.0
Summary: Terminal UI for managing card collections and exporting to Excel
Author-email: Pedro <87550035+odiseo0@users.noreply.github.com>
License: MIT
Project-URL: Homepage, https://github.com/odiseo0/ygo-coolstuff
Project-URL: Repository, https://github.com/odiseo0/ygo-coolstuff
Keywords: yugioh,cards,tui,textual,collection,excel,scraper
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: httpx>=0.28.1
Requires-Dist: aiofiles>=25.1.0
Requires-Dist: rich>=14.3.1
Requires-Dist: textual>=0.80.0
Requires-Dist: aiosqlite>=0.22.1
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: pillow>=12.1.1
Requires-Dist: platformdirs>=4.0.0
Provides-Extra: dev
Requires-Dist: textual-dev>=1.8.0; extra == "dev"
Dynamic: license-file

## coolstuffscrape

### Install and run

- **Install** (from PyPI when published): `pip install coolstuffscrape`
- **Install from source**: see [Install from source](#install-from-source) below.
- **Run**: `coolstuffscrape`  
  On first run the app creates the database and app data directory automatically.
- **Optional setup**: `coolstuffscrape init` — creates the database and app data dir only (no TUI). Use for scripting or CI.

### Install from source

Requires **Python 3.13 or newer**.

1. Clone the repo and go into the project directory:
   ```bash
   git clone https://github.com/your-username/scripting.git
   cd scripting
   ```
2. Install the package in editable mode using Python 3.13:
   ```bash
   pip install -e .
   ```
   If you have multiple Python versions (e.g. 3.11 and 3.13) and get an error like *"Package requires a different Python: 3.11.x not in '>=3.13'"*, use the 3.13 interpreter explicitly:
   - **Windows** (Python launcher): `py -3.13 -m pip install -e .`
   - **Windows** (full path): `"C:\Path\To\Python313\python.exe" -m pip install -e .`
   - **macOS/Linux**: `python3.13 -m pip install -e .` or `pip3.13 install -e .`
3. Run the app (with the same Python you used to install):
   - **Windows**: `py -3.13 -m coolstuffscrape` or just `coolstuffscrape` if that environment is active.
   - **macOS/Linux**: `coolstuffscrape` or `python3.13 -m coolstuffscrape`.

One-liner from repo (Windows, Python 3.13): `py -3.13 -m pip install -e . && py -3.13 -m coolstuffscrape`

### Overview
**coolstuffscrape** is a terminal user interface for managing card collections without constantly switching between browser tabs. Instead of searching on a website and juggling multiple pages, you stay inside this app, search for cards, and build collections that can later be exported into a template.

### flow
- **Search**: Press `s` to enter Search then press `/` to focus the search, then search for the card you want.
- **Browse results**: Use the arrow keys to move through the results table.
- **Add cards**: Press `space` to select a row and then press `a` to add that card to the current collection.
- **Adjust quantities**: Use `-` to decrease the quantity for the selected card, and use `Shift` + `+` to increase the quantity.

### Collections
- **Save collection**: Press `Ctrl+S` to save the current collection.
- **Rename or delete**: After saving, you can rename or delete collections from within the app.
- **Export**: Press `x` to export the collection.


### Imports
- **Import .ydk files**: Press `i` to import a `.ydk` file and turn it into a collection you can review and edit.

---

### Publishing (maintainers)

- **CI**: On push/PR to `main` or `master`, GitHub Actions builds the package and runs `coolstuffscrape init` to verify the install.
- **PyPI**: Creating a **GitHub Release** (tag + “Publish release”) triggers a workflow that builds and publishes to PyPI.

**Setup for PyPI:**

1. Create an API token at [pypi.org/manage/account/token/](https://pypi.org/manage/account/token/) (scope: entire account or just this project).
2. In the repo: **Settings → Secrets and variables → Actions** → **New repository secret** → name `PYPI_API_TOKEN`, value = the token.
3. To release: create a new **Release** (e.g. tag `v0.1.0`), publish it. The “Publish to PyPI” workflow will run and upload the package.

Optional: [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/) lets you drop the token; remove the `password` input from the workflow and add the publisher on PyPI.
