pyread-cli 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.
- pyread_cli-0.1.0/.github/workflows/build.yml +24 -0
- pyread_cli-0.1.0/.github/workflows/publish.yml +85 -0
- pyread_cli-0.1.0/.github/workflows/tests.yml +32 -0
- pyread_cli-0.1.0/.gitignore +223 -0
- pyread_cli-0.1.0/.python-version +1 -0
- pyread_cli-0.1.0/LICENSE +21 -0
- pyread_cli-0.1.0/PKG-INFO +57 -0
- pyread_cli-0.1.0/README.md +41 -0
- pyread_cli-0.1.0/pyproject.toml +34 -0
- pyread_cli-0.1.0/src/pyread/__init__.py +1 -0
- pyread_cli-0.1.0/src/pyread/cli.py +1088 -0
- pyread_cli-0.1.0/src/pyread/core/__init__.py +0 -0
- pyread_cli-0.1.0/src/pyread/core/budget.py +14 -0
- pyread_cli-0.1.0/src/pyread/core/cache.py +46 -0
- pyread_cli-0.1.0/src/pyread/core/extractor.py +118 -0
- pyread_cli-0.1.0/src/pyread/core/fetcher.py +317 -0
- pyread_cli-0.1.0/src/pyread/core/text_model.py +52 -0
- pyread_cli-0.1.0/src/pyread/core/timer.py +27 -0
- pyread_cli-0.1.0/src/pyread/state.py +226 -0
- pyread_cli-0.1.0/src/pyread/terminal.py +60 -0
- pyread_cli-0.1.0/tests/__init__.py +0 -0
- pyread_cli-0.1.0/tests/test_budget.py +19 -0
- pyread_cli-0.1.0/tests/test_fetcher.py +133 -0
- pyread_cli-0.1.0/tests/test_reader.py +316 -0
- pyread_cli-0.1.0/tests/test_search_navigation.py +332 -0
- pyread_cli-0.1.0/tests/test_terminal.py +108 -0
- pyread_cli-0.1.0/tests/test_timer.py +17 -0
- pyread_cli-0.1.0/uv.lock +613 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.11"
|
|
21
|
+
- name: Build wheel and source distribution
|
|
22
|
+
run: uv build --no-sources
|
|
23
|
+
- name: Smoke-test the installed wheel
|
|
24
|
+
run: uvx --python 3.11 --from "$(find dist -maxdepth 1 -name '*.whl' -print -quit)" pyread version
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
tag:
|
|
9
|
+
description: Existing GitHub release tag (for example v0.1.0)
|
|
10
|
+
required: true
|
|
11
|
+
type: string
|
|
12
|
+
publish:
|
|
13
|
+
description: Upload to PyPI (leave unchecked to build and verify only)
|
|
14
|
+
default: false
|
|
15
|
+
type: boolean
|
|
16
|
+
|
|
17
|
+
permissions: {}
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: pypi-${{ github.event.release.tag_name || inputs.tag }}
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
if: >-
|
|
26
|
+
(github.event_name == 'release' && !github.event.release.prerelease) ||
|
|
27
|
+
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
timeout-minutes: 10
|
|
30
|
+
permissions:
|
|
31
|
+
contents: read
|
|
32
|
+
env:
|
|
33
|
+
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
|
34
|
+
steps:
|
|
35
|
+
- name: Verify the release
|
|
36
|
+
env:
|
|
37
|
+
GH_TOKEN: ${{ github.token }}
|
|
38
|
+
run: |
|
|
39
|
+
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
|
|
40
|
+
test "$(gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" \
|
|
41
|
+
--json isDraft,isPrerelease --jq '(.isDraft or .isPrerelease) | not')" = true
|
|
42
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
43
|
+
with:
|
|
44
|
+
ref: refs/tags/${{ env.RELEASE_TAG }}
|
|
45
|
+
persist-credentials: false
|
|
46
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.11"
|
|
49
|
+
- name: Verify the package version
|
|
50
|
+
run: |
|
|
51
|
+
uv run --no-project python - <<'PY'
|
|
52
|
+
import os
|
|
53
|
+
import tomllib
|
|
54
|
+
from pathlib import Path
|
|
55
|
+
|
|
56
|
+
project = tomllib.loads(Path("pyproject.toml").read_text())["project"]
|
|
57
|
+
expected = f"v{project['version']}"
|
|
58
|
+
if project["name"] != "pyread-cli" or os.environ["RELEASE_TAG"] != expected:
|
|
59
|
+
raise SystemExit(f"Expected pyread-cli with release tag {expected}")
|
|
60
|
+
PY
|
|
61
|
+
- run: uv run --locked pytest -q
|
|
62
|
+
- run: uv build --no-sources
|
|
63
|
+
- name: Smoke-test the installed wheel
|
|
64
|
+
run: uvx --python 3.11 --from "$(find dist -maxdepth 1 -name '*.whl' -print -quit)" pyread version
|
|
65
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
66
|
+
with:
|
|
67
|
+
name: distributions
|
|
68
|
+
path: dist/
|
|
69
|
+
if-no-files-found: error
|
|
70
|
+
|
|
71
|
+
publish:
|
|
72
|
+
if: github.event_name == 'release' || inputs.publish
|
|
73
|
+
needs: build
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
timeout-minutes: 10
|
|
76
|
+
environment: pypi
|
|
77
|
+
permissions:
|
|
78
|
+
id-token: write
|
|
79
|
+
steps:
|
|
80
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
81
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
82
|
+
with:
|
|
83
|
+
name: distributions
|
|
84
|
+
path: dist/
|
|
85
|
+
- run: uv publish --trusted-publishing always dist/*
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Python ${{ matrix.python }} on ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
include:
|
|
19
|
+
- os: ubuntu-latest
|
|
20
|
+
python: "3.11"
|
|
21
|
+
- os: macos-latest
|
|
22
|
+
python: "3.14"
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
timeout-minutes: 10
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
28
|
+
with:
|
|
29
|
+
python-version: ${{ matrix.python }}
|
|
30
|
+
enable-cache: true
|
|
31
|
+
- run: uv sync --locked
|
|
32
|
+
- run: uv run --locked pytest -q
|
|
@@ -0,0 +1,223 @@
|
|
|
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
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
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
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Conda environments
|
|
163
|
+
conda-meta/
|
|
164
|
+
|
|
165
|
+
# Spyder project settings
|
|
166
|
+
.spyderproject
|
|
167
|
+
.spyproject
|
|
168
|
+
|
|
169
|
+
# Rope project settings
|
|
170
|
+
.ropeproject
|
|
171
|
+
|
|
172
|
+
# mkdocs/Zensical documentation
|
|
173
|
+
/site
|
|
174
|
+
|
|
175
|
+
# mypy
|
|
176
|
+
.mypy_cache/
|
|
177
|
+
.dmypy.json
|
|
178
|
+
dmypy.json
|
|
179
|
+
|
|
180
|
+
# Pyre type checker
|
|
181
|
+
.pyre/
|
|
182
|
+
|
|
183
|
+
# pytype static type analyzer
|
|
184
|
+
.pytype/
|
|
185
|
+
|
|
186
|
+
# Cython debug symbols
|
|
187
|
+
cython_debug/
|
|
188
|
+
|
|
189
|
+
# PyCharm
|
|
190
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
191
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
193
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
194
|
+
# .idea/
|
|
195
|
+
|
|
196
|
+
# Abstra
|
|
197
|
+
# Abstra is an AI-powered process automation framework.
|
|
198
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
199
|
+
# Learn more at https://abstra.io/docs
|
|
200
|
+
.abstra/
|
|
201
|
+
|
|
202
|
+
# Visual Studio Code
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
204
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
206
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
207
|
+
# .vscode/
|
|
208
|
+
# Temporary file for partial code execution
|
|
209
|
+
tempCodeRunnerFile.py
|
|
210
|
+
|
|
211
|
+
# Ruff stuff:
|
|
212
|
+
.ruff_cache/
|
|
213
|
+
|
|
214
|
+
# PyPI configuration file
|
|
215
|
+
.pypirc
|
|
216
|
+
|
|
217
|
+
# Marimo
|
|
218
|
+
marimo/_static/
|
|
219
|
+
marimo/_lsp/
|
|
220
|
+
__marimo__/
|
|
221
|
+
|
|
222
|
+
# Streamlit
|
|
223
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
pyread_cli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shafquat Mahbub
|
|
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,57 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pyread-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A terminal-based reading tool.
|
|
5
|
+
Project-URL: Repository, https://github.com/MShafquat/pyread
|
|
6
|
+
Project-URL: Issues, https://github.com/MShafquat/pyread/issues
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Requires-Dist: click>=8.5.1
|
|
11
|
+
Requires-Dist: pyyaml>=6.0.4
|
|
12
|
+
Requires-Dist: requests>=2.34.2
|
|
13
|
+
Requires-Dist: rich>=15.0.0
|
|
14
|
+
Requires-Dist: typer>=0.29.3
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# pyread
|
|
18
|
+
|
|
19
|
+
[](https://github.com/MShafquat/pyread/actions/workflows/build.yml)
|
|
20
|
+
[](https://github.com/MShafquat/pyread/actions/workflows/tests.yml)
|
|
21
|
+
|
|
22
|
+
A terminal reader for books from Project Gutenberg and the Internet Archive.
|
|
23
|
+
Find a book, read an excerpt sized to your time, and pick up where you left off.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
Requires Python 3.11 or later.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
python -m pip install "git+https://github.com/MShafquat/pyread.git"
|
|
31
|
+
pyread
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use **↑/↓** to move, **Enter** to select, and **q** to quit. First launch opens
|
|
35
|
+
Settings, where you can set your reading time and choose suggestion topics.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pyread search "science fiction"
|
|
39
|
+
pyread suggest
|
|
40
|
+
pyread next --continue
|
|
41
|
+
pyread stats
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Downloads and reading progress are stored in `~/.pyread/`. Downloaded books
|
|
45
|
+
can be read offline. Run `pyread --help` for all commands.
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
uv sync --locked
|
|
51
|
+
uv run --locked pytest -q
|
|
52
|
+
uv build --no-sources
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Stable GitHub releases publish to PyPI once you configure [Trusted Publishing](https://docs.pypi.org/trusted-publishers/).
|
|
56
|
+
For an existing release, run **Publish to PyPI** from the Actions tab with its
|
|
57
|
+
version tag and select **Upload to PyPI**.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# pyread
|
|
2
|
+
|
|
3
|
+
[](https://github.com/MShafquat/pyread/actions/workflows/build.yml)
|
|
4
|
+
[](https://github.com/MShafquat/pyread/actions/workflows/tests.yml)
|
|
5
|
+
|
|
6
|
+
A terminal reader for books from Project Gutenberg and the Internet Archive.
|
|
7
|
+
Find a book, read an excerpt sized to your time, and pick up where you left off.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires Python 3.11 or later.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
python -m pip install "git+https://github.com/MShafquat/pyread.git"
|
|
15
|
+
pyread
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use **↑/↓** to move, **Enter** to select, and **q** to quit. First launch opens
|
|
19
|
+
Settings, where you can set your reading time and choose suggestion topics.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pyread search "science fiction"
|
|
23
|
+
pyread suggest
|
|
24
|
+
pyread next --continue
|
|
25
|
+
pyread stats
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Downloads and reading progress are stored in `~/.pyread/`. Downloaded books
|
|
29
|
+
can be read offline. Run `pyread --help` for all commands.
|
|
30
|
+
|
|
31
|
+
## Development
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uv sync --locked
|
|
35
|
+
uv run --locked pytest -q
|
|
36
|
+
uv build --no-sources
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Stable GitHub releases publish to PyPI once you configure [Trusted Publishing](https://docs.pypi.org/trusted-publishers/).
|
|
40
|
+
For an existing release, run **Publish to PyPI** from the Actions tab with its
|
|
41
|
+
version tag and select **Upload to PyPI**.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyread-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A terminal-based reading tool."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"click>=8.5.1",
|
|
15
|
+
"pyyaml>=6.0.4",
|
|
16
|
+
"requests>=2.34.2",
|
|
17
|
+
"rich>=15.0.0",
|
|
18
|
+
"typer>=0.29.3",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Repository = "https://github.com/MShafquat/pyread"
|
|
23
|
+
Issues = "https://github.com/MShafquat/pyread/issues"
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
pyread = "pyread.cli:app"
|
|
27
|
+
|
|
28
|
+
[tool.hatch.build.targets.wheel]
|
|
29
|
+
packages = ["src/pyread"]
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=9.2.0",
|
|
34
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|