tbr-deal-finder 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Trigger on version tags
7
+
8
+ jobs:
9
+ deploy:
10
+ name: Build and publish Python 🐍 distributions 📦 to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ url: https://pypi.org/p/tbr_deal_finder # This will link to your package on PyPI
15
+
16
+ permissions:
17
+ # For PyPI's trusted publishing.
18
+ id-token: write
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+ - name: "Install uv"
23
+ uses: astral-sh/setup-uv@v5
24
+ - name: Create build
25
+ run: uv build
26
+ - name: Publish to PyPi
27
+ run: uv publish
@@ -0,0 +1,208 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ .venv/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+ #poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ #pdm.lock
117
+ #pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ #pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi
127
+
128
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
129
+ __pypackages__/
130
+
131
+ # Celery stuff
132
+ celerybeat-schedule
133
+ celerybeat.pid
134
+
135
+ # SageMath parsed files
136
+ *.sage.py
137
+
138
+ # Environments
139
+ .env
140
+ .envrc
141
+ .venv
142
+ env/
143
+ venv/
144
+ ENV/
145
+ env.bak/
146
+ venv.bak/
147
+
148
+ # Spyder project settings
149
+ .spyderproject
150
+ .spyproject
151
+
152
+ # Rope project settings
153
+ .ropeproject
154
+
155
+ # mkdocs documentation
156
+ /site
157
+
158
+ # mypy
159
+ .mypy_cache/
160
+ .dmypy.json
161
+ dmypy.json
162
+
163
+ # Pyre type checker
164
+ .pyre/
165
+
166
+ # pytype static type analyzer
167
+ .pytype/
168
+
169
+ # Cython debug symbols
170
+ cython_debug/
171
+
172
+ # PyCharm
173
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
174
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
175
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
176
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
177
+ #.idea/
178
+
179
+ # Abstra
180
+ # Abstra is an AI-powered process automation framework.
181
+ # Ignore directories containing user credentials, local state, and settings.
182
+ # Learn more at https://abstra.io/docs
183
+ .abstra/
184
+
185
+ # Visual Studio Code
186
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
187
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
188
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
189
+ # you could uncomment the following to ignore the entire vscode folder
190
+ # .vscode/
191
+
192
+ # Ruff stuff:
193
+ .ruff_cache/
194
+
195
+ # PyPI configuration file
196
+ .pypirc
197
+
198
+ # Cursor
199
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
200
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
201
+ # refer to https://docs.cursor.com/context/ignore-files
202
+ .cursorignore
203
+ .cursorindexingignore
204
+
205
+ # Marimo
206
+ marimo/_static/
207
+ marimo/_lsp/
208
+ __marimo__/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 WillNye
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.4
2
+ Name: tbr-deal-finder
3
+ Version: 0.1.0
4
+ Summary: Track price drops and find deals on books in your TBR list across audiobook and ebook formats.
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.13
8
+ Requires-Dist: aiohttp>=3.12.14
9
+ Requires-Dist: audible>=0.10.0
10
+ Requires-Dist: click>=8.2.1
11
+ Requires-Dist: duckdb>=1.3.2
12
+ Requires-Dist: pandas>=2.3.1
13
+ Requires-Dist: questionary>=2.1.0
14
+ Requires-Dist: tqdm>=4.67.1
15
+ Requires-Dist: unidecode>=1.4.0
16
+ Description-Content-Type: text/markdown
17
+
18
+ # tbr-deal-finder
19
+
20
+ Track price drops and find deals on books in your TBR (To Be Read) list across audiobook and ebook formats.
21
+
22
+ ## Features
23
+ - Uses your StoryGraph exports, Goodreads exports, and custom csvs (spreadsheet) to track book deals
24
+ - Supports multiple of the library exports above
25
+ - Supports multiple locales and currencies
26
+ - Finds the latest and active deals from supported sellers
27
+ - Simple CLI interface for setup and usage
28
+ - Only get notified for new deals or view all active deals
29
+
30
+ ## Support
31
+
32
+ ### Audiobooks
33
+ * Audible
34
+ * Chirp
35
+ * Libro.fm (Work in progress)
36
+
37
+ ### Locales
38
+ * US
39
+ * CA
40
+ * UK
41
+ * AU
42
+ * FR
43
+ * DE
44
+ * JP
45
+ * IT
46
+ * IN
47
+ * ES
48
+ * BR
49
+
50
+ ## Installation Guide
51
+
52
+ ### Python (Recommended)
53
+ 1. If it's not already on your computer, download Python https://www.python.org/downloads/
54
+ 1. tbr-deal-finder requires Python3.13 or higher
55
+ 2. Optional: Install and use virtualenv
56
+ 3. Open your Terminal/Commmand Prompt
57
+ 4. Run `pip3.13 install tbr-deal-finder`
58
+
59
+ ### UV
60
+ 1. Clone the repository:
61
+ ```sh
62
+ git clone https://github.com/yourusername/tbr-deal-finder.git
63
+ cd tbr-deal-finder
64
+ ```
65
+ 2. Install uv:
66
+ https://docs.astral.sh/uv/getting-started/installation/
67
+
68
+ ## Configuration
69
+ This tool relies on the csv generated by the app you use to track your TBRs.
70
+ Here are the steps to get your export.
71
+
72
+ ### StoryGraph
73
+ * Open https://app.thestorygraph.com/ in the browser of your choice
74
+ * Click on your profile icon in the top right corner
75
+ * Select "Manage Account"
76
+ * Scroll down to "Manage Your Data"
77
+ * Click the button "Export StoryGraph Library"
78
+ * You will be navigated to https://app.thestorygraph.com/user-export
79
+ * Click "Generate export"
80
+ * Wait a few minutes and refresh the page
81
+ * A new item will appear that says "Your export from ... - Download" will appear
82
+ * Click "Download"
83
+
84
+ ### Goodreads
85
+ * Open https://www.goodreads.com/review/import in the browser of your choice
86
+ * At the top of the page click the button "Export Library"
87
+ * Wait a few minutes and refresh the page
88
+ * A new item will appear that says "Your export from ..." will appear
89
+ * Click it to download the csv
90
+
91
+ ### Custom csv
92
+ If you've got your own CSV you're using to track your TBRs all you need are the following columns for it to be in a valid format
93
+ * `Title`
94
+ * `Authors`
95
+ * `Read Status`* (See below)
96
+
97
+ Optionally, you can add the `Read Status` column. Set `to-read` for all books you want to be tracked.
98
+ If you don't add this column the deal finder will run on ALL books in the CSV.
99
+
100
+ ### tbr-deal-finder setup
101
+
102
+ #### Python
103
+ ```sh
104
+ tbr-deal-finder setup
105
+ ```
106
+
107
+ #### UV
108
+ ```sh
109
+ uv run -m tbr_deal_finder.main setup
110
+ ```
111
+
112
+ You will be prompted to:
113
+ - Enter the path(s) to your StoryGraph export CSV file(s)
114
+ - Select your locale (country/region)
115
+ - Set your maximum price for deals
116
+ - Set your minimum discount percentage
117
+
118
+ The configuration will be saved for future runs.
119
+
120
+ ## Usage
121
+ All commands are available via the CLI:
122
+
123
+ - `setup` – Set up or update your configuration interactively.
124
+ - `latest-deals` – Find and print the latest book deals based on your config.
125
+ - `active-deals` – Show all currently active deals.
126
+
127
+ #### Python
128
+ ```sh
129
+ tbr-deal-finder [COMMAND]
130
+ ```
131
+
132
+ #### UV
133
+ ```sh
134
+ uv run -m tbr_deal_finder.main [COMMAND]
135
+ ```
136
+
137
+ Example:
138
+ ```sh
139
+ tbr-deal-finder latest-deals
140
+
141
+ # or
142
+
143
+ uv run -m tbr_deal_finder.main latest-deals
144
+ ```
145
+
146
+ ## Updating your TBR
147
+ To update tbr-deal-finder as your TBR changes, regenerate and download your library export.
148
+ See [Configuration](#Configuration) for steps.
149
+
150
+
151
+ ## Updating the tbr-deal-finder
152
+
153
+ ### Python
154
+ ```sh
155
+ pip3.13 install tbr-deal-finder --upgrade
156
+ ```
157
+
158
+ ### UV
159
+ ```sh
160
+ # From the repo directory
161
+ git checkout main && git fetch
162
+ ```
163
+
164
+
165
+ ---
166
+
167
+ Happy deal hunting!
@@ -0,0 +1,150 @@
1
+ # tbr-deal-finder
2
+
3
+ Track price drops and find deals on books in your TBR (To Be Read) list across audiobook and ebook formats.
4
+
5
+ ## Features
6
+ - Uses your StoryGraph exports, Goodreads exports, and custom csvs (spreadsheet) to track book deals
7
+ - Supports multiple of the library exports above
8
+ - Supports multiple locales and currencies
9
+ - Finds the latest and active deals from supported sellers
10
+ - Simple CLI interface for setup and usage
11
+ - Only get notified for new deals or view all active deals
12
+
13
+ ## Support
14
+
15
+ ### Audiobooks
16
+ * Audible
17
+ * Chirp
18
+ * Libro.fm (Work in progress)
19
+
20
+ ### Locales
21
+ * US
22
+ * CA
23
+ * UK
24
+ * AU
25
+ * FR
26
+ * DE
27
+ * JP
28
+ * IT
29
+ * IN
30
+ * ES
31
+ * BR
32
+
33
+ ## Installation Guide
34
+
35
+ ### Python (Recommended)
36
+ 1. If it's not already on your computer, download Python https://www.python.org/downloads/
37
+ 1. tbr-deal-finder requires Python3.13 or higher
38
+ 2. Optional: Install and use virtualenv
39
+ 3. Open your Terminal/Commmand Prompt
40
+ 4. Run `pip3.13 install tbr-deal-finder`
41
+
42
+ ### UV
43
+ 1. Clone the repository:
44
+ ```sh
45
+ git clone https://github.com/yourusername/tbr-deal-finder.git
46
+ cd tbr-deal-finder
47
+ ```
48
+ 2. Install uv:
49
+ https://docs.astral.sh/uv/getting-started/installation/
50
+
51
+ ## Configuration
52
+ This tool relies on the csv generated by the app you use to track your TBRs.
53
+ Here are the steps to get your export.
54
+
55
+ ### StoryGraph
56
+ * Open https://app.thestorygraph.com/ in the browser of your choice
57
+ * Click on your profile icon in the top right corner
58
+ * Select "Manage Account"
59
+ * Scroll down to "Manage Your Data"
60
+ * Click the button "Export StoryGraph Library"
61
+ * You will be navigated to https://app.thestorygraph.com/user-export
62
+ * Click "Generate export"
63
+ * Wait a few minutes and refresh the page
64
+ * A new item will appear that says "Your export from ... - Download" will appear
65
+ * Click "Download"
66
+
67
+ ### Goodreads
68
+ * Open https://www.goodreads.com/review/import in the browser of your choice
69
+ * At the top of the page click the button "Export Library"
70
+ * Wait a few minutes and refresh the page
71
+ * A new item will appear that says "Your export from ..." will appear
72
+ * Click it to download the csv
73
+
74
+ ### Custom csv
75
+ If you've got your own CSV you're using to track your TBRs all you need are the following columns for it to be in a valid format
76
+ * `Title`
77
+ * `Authors`
78
+ * `Read Status`* (See below)
79
+
80
+ Optionally, you can add the `Read Status` column. Set `to-read` for all books you want to be tracked.
81
+ If you don't add this column the deal finder will run on ALL books in the CSV.
82
+
83
+ ### tbr-deal-finder setup
84
+
85
+ #### Python
86
+ ```sh
87
+ tbr-deal-finder setup
88
+ ```
89
+
90
+ #### UV
91
+ ```sh
92
+ uv run -m tbr_deal_finder.main setup
93
+ ```
94
+
95
+ You will be prompted to:
96
+ - Enter the path(s) to your StoryGraph export CSV file(s)
97
+ - Select your locale (country/region)
98
+ - Set your maximum price for deals
99
+ - Set your minimum discount percentage
100
+
101
+ The configuration will be saved for future runs.
102
+
103
+ ## Usage
104
+ All commands are available via the CLI:
105
+
106
+ - `setup` – Set up or update your configuration interactively.
107
+ - `latest-deals` – Find and print the latest book deals based on your config.
108
+ - `active-deals` – Show all currently active deals.
109
+
110
+ #### Python
111
+ ```sh
112
+ tbr-deal-finder [COMMAND]
113
+ ```
114
+
115
+ #### UV
116
+ ```sh
117
+ uv run -m tbr_deal_finder.main [COMMAND]
118
+ ```
119
+
120
+ Example:
121
+ ```sh
122
+ tbr-deal-finder latest-deals
123
+
124
+ # or
125
+
126
+ uv run -m tbr_deal_finder.main latest-deals
127
+ ```
128
+
129
+ ## Updating your TBR
130
+ To update tbr-deal-finder as your TBR changes, regenerate and download your library export.
131
+ See [Configuration](#Configuration) for steps.
132
+
133
+
134
+ ## Updating the tbr-deal-finder
135
+
136
+ ### Python
137
+ ```sh
138
+ pip3.13 install tbr-deal-finder --upgrade
139
+ ```
140
+
141
+ ### UV
142
+ ```sh
143
+ # From the repo directory
144
+ git checkout main && git fetch
145
+ ```
146
+
147
+
148
+ ---
149
+
150
+ Happy deal hunting!
@@ -0,0 +1,31 @@
1
+ [project]
2
+ name = "tbr-deal-finder"
3
+ version = "0.1.0"
4
+ description = "Track price drops and find deals on books in your TBR list across audiobook and ebook formats."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = {text = "MIT"}
8
+ dependencies = [
9
+ "aiohttp>=3.12.14",
10
+ "audible>=0.10.0",
11
+ "click>=8.2.1",
12
+ "duckdb>=1.3.2",
13
+ "pandas>=2.3.1",
14
+ "questionary>=2.1.0",
15
+ "tqdm>=4.67.1",
16
+ "unidecode>=1.4.0",
17
+ ]
18
+
19
+ [project.scripts]
20
+ lotad = "lotad.cli:cli"
21
+
22
+ [tool.setuptools.package-data]
23
+ "lotad" = [
24
+ "queries/**/*.sql",
25
+ "reports/*.j2",
26
+ "data/*.json"
27
+ ]
28
+
29
+ [build-system]
30
+ requires = ["hatchling"]
31
+ build-backend = "hatchling.build"
@@ -0,0 +1,9 @@
1
+ import os
2
+ from pathlib import Path
3
+
4
+ __VERSION__ = "0.1.0"
5
+
6
+ QUERY_PATH = Path(__file__).parent.joinpath("queries")
7
+
8
+ TBR_DEALS_PATH = Path.home() / ".tbr_deal_finder"
9
+ os.makedirs(TBR_DEALS_PATH, exist_ok=True)