beckit 3.2.1__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.
- beckit-3.2.1/LICENSE +21 -0
- beckit-3.2.1/PKG-INFO +186 -0
- beckit-3.2.1/README.md +151 -0
- beckit-3.2.1/pyproject.toml +62 -0
- beckit-3.2.1/setup.cfg +4 -0
- beckit-3.2.1/src/beckit.egg-info/PKG-INFO +186 -0
- beckit-3.2.1/src/beckit.egg-info/SOURCES.txt +25 -0
- beckit-3.2.1/src/beckit.egg-info/dependency_links.txt +1 -0
- beckit-3.2.1/src/beckit.egg-info/entry_points.txt +7 -0
- beckit-3.2.1/src/beckit.egg-info/requires.txt +8 -0
- beckit-3.2.1/src/beckit.egg-info/top_level.txt +1 -0
- beckit-3.2.1/src/book_editor/__init__.py +3 -0
- beckit-3.2.1/src/book_editor/__main__.py +14 -0
- beckit-3.2.1/src/book_editor/app.py +2514 -0
- beckit-3.2.1/src/book_editor/config/__init__.py +78 -0
- beckit-3.2.1/src/book_editor/services/__init__.py +66 -0
- beckit-3.2.1/src/book_editor/services/auto_version.py +66 -0
- beckit-3.2.1/src/book_editor/services/chapter_version.py +218 -0
- beckit-3.2.1/src/book_editor/services/count_chapter_words.py +230 -0
- beckit-3.2.1/src/book_editor/services/create_chapter.py +99 -0
- beckit-3.2.1/src/book_editor/services/format_markdown.py +217 -0
- beckit-3.2.1/src/book_editor/services/github_app.py +183 -0
- beckit-3.2.1/src/book_editor/services/increment_chapters.py +98 -0
- beckit-3.2.1/src/book_editor/services/pdf_build.py +210 -0
- beckit-3.2.1/src/book_editor/services/planning.py +92 -0
- beckit-3.2.1/src/book_editor/services/repo.py +179 -0
- beckit-3.2.1/src/book_editor/utils/__init__.py +15 -0
beckit-3.2.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kicka5h
|
|
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.
|
beckit-3.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: beckit
|
|
3
|
+
Version: 3.2.1
|
|
4
|
+
Summary: Lightweight cross-platform book writing app with GitHub sync and chapter versioning
|
|
5
|
+
Author: Beckit contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kicka5h/beckit-book-editor
|
|
8
|
+
Project-URL: Source, https://github.com/kicka5h/beckit-book-editor
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/kicka5h/beckit-book-editor/issues
|
|
10
|
+
Keywords: book,writing,markdown,github,editor
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: MacOS X
|
|
13
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
14
|
+
Classifier: Environment :: X11 Applications
|
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Text Editors
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: flet>=0.24.0
|
|
28
|
+
Requires-Dist: GitPython>=3.1.0
|
|
29
|
+
Requires-Dist: PyGithub>=2.0.0
|
|
30
|
+
Requires-Dist: requests>=2.28.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
## Download and Install Beckit
|
|
37
|
+
|
|
38
|
+
Beckit is distributed as a prebuilt installer — no Python or developer tools required. Download the version for your platform from the [latest release](../../releases/latest). This app was built with the help of Claude.
|
|
39
|
+
|
|
40
|
+
### macOS
|
|
41
|
+
|
|
42
|
+
**Requirements:** macOS 11 (Big Sur) or later
|
|
43
|
+
|
|
44
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-macOS-<version>.dmg`
|
|
45
|
+
2. Open the downloaded `.dmg` file
|
|
46
|
+
3. In the window that appears, drag **Beckit** into your **Applications** folder
|
|
47
|
+
4. Eject the disk image (drag it to Trash or right-click → Eject)
|
|
48
|
+
5. Open **Launchpad** or your **Applications** folder and launch **Beckit**
|
|
49
|
+
|
|
50
|
+
> **"App can't be opened because it is from an unidentified developer"**
|
|
51
|
+
> This appears because the app is not yet signed with an Apple Developer certificate.
|
|
52
|
+
> To open it anyway: right-click (or Control-click) the app icon → click **Open** → click **Open** again in the dialog. You only need to do this once.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### Windows
|
|
57
|
+
|
|
58
|
+
**Requirements:** Windows 10 or later (64-bit)
|
|
59
|
+
|
|
60
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-Windows-<version>.zip`
|
|
61
|
+
2. Right-click the zip file and select **Extract All…** — choose a permanent location (e.g. `C:\Program Files\Beckit` or a folder on your Desktop)
|
|
62
|
+
3. Open the extracted folder and double-click **Beckit.exe** to launch the app
|
|
63
|
+
|
|
64
|
+
> **Windows Defender SmartScreen warning ("Windows protected your PC")**
|
|
65
|
+
> This appears because the app is not yet code-signed. Click **More info** → **Run anyway** to proceed.
|
|
66
|
+
|
|
67
|
+
> **Tip:** Right-click `Beckit.exe` → **Send to** → **Desktop (create shortcut)** for easier access.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## First Launch
|
|
72
|
+
|
|
73
|
+
Regardless of platform, the first time you open Beckit you will be asked to connect your GitHub account:
|
|
74
|
+
|
|
75
|
+
1. [Create a GitHub Personal Access Token](https://github.com/settings/tokens/new) with the **`repo`** scope (classic token)
|
|
76
|
+
2. Paste it into the sign-in prompt and press **Connect**
|
|
77
|
+
3. Select an existing repository to use as your book, or create a new one — Beckit will clone it locally and set up the `Chapters/` structure automatically
|
|
78
|
+
|
|
79
|
+
Your token and repository settings are stored in your system's app config directory:
|
|
80
|
+
|
|
81
|
+
| Platform | Config location |
|
|
82
|
+
|---|---|
|
|
83
|
+
| macOS | `~/Library/Application Support/beckit/` |
|
|
84
|
+
| Windows | `%APPDATA%\beckit\` |
|
|
85
|
+
|
|
86
|
+
PDF export is built in — no separate tools required.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Run from Source (Developers)
|
|
91
|
+
|
|
92
|
+
If you'd prefer to run directly from source, or want to contribute to the project:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/kicka5h/book-editor-template.git
|
|
96
|
+
cd book-editor-template
|
|
97
|
+
|
|
98
|
+
python3 -m venv .venv
|
|
99
|
+
|
|
100
|
+
# macOS / Linux
|
|
101
|
+
source .venv/bin/activate
|
|
102
|
+
|
|
103
|
+
# Windows
|
|
104
|
+
.venv\Scripts\activate
|
|
105
|
+
|
|
106
|
+
pip install -e .
|
|
107
|
+
python -m book_editor # or: beckit
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
To install dev dependencies and run tests:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install -e ".[dev]"
|
|
114
|
+
pytest
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Project Layout
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
book-editor-template/
|
|
123
|
+
├── .gitignore
|
|
124
|
+
├── pyproject.toml
|
|
125
|
+
├── README.md
|
|
126
|
+
├── LICENSE
|
|
127
|
+
├── src/
|
|
128
|
+
│ └── book_editor/
|
|
129
|
+
│ ├── __init__.py
|
|
130
|
+
│ ├── __main__.py # GUI entry (python -m book_editor)
|
|
131
|
+
│ ├── app.py # Flet desktop UI
|
|
132
|
+
│ ├── config/ # App config (repo path, token)
|
|
133
|
+
│ ├── services/ # Chapter versioning, create, increment, word count, format, git
|
|
134
|
+
│ └── utils/ # Paths, chapter number helpers
|
|
135
|
+
├── tests/
|
|
136
|
+
│ ├── api/
|
|
137
|
+
│ ├── services/
|
|
138
|
+
│ ├── repositories/
|
|
139
|
+
│ └── utils/
|
|
140
|
+
└── .github/workflows/ # CI, CD, PDF generation, major release
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Book Directory Structure
|
|
146
|
+
|
|
147
|
+
Chapters live under `Chapters/` with semantic versioning per chapter:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
Chapters/
|
|
151
|
+
Chapter 1/
|
|
152
|
+
v1.0.0/
|
|
153
|
+
v1.0.0.md
|
|
154
|
+
v1.1.0/
|
|
155
|
+
v1.1.0.md
|
|
156
|
+
Chapter 2/
|
|
157
|
+
v1.0.0/
|
|
158
|
+
v1.0.0.md
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Each chapter can have multiple version folders (`vMAJOR.MINOR.PATCH`). All tools use the **latest** version when reporting word counts, generating PDFs, or listing chapters.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## CLI Tools
|
|
166
|
+
|
|
167
|
+
After `pip install -e .`, these commands are available (run from a directory containing your `Chapters/` folder):
|
|
168
|
+
|
|
169
|
+
| Command | Description |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `chapter-version list` | List chapters and their current versions |
|
|
172
|
+
| `chapter-version minor -c 5` | Bump minor version for chapter 5 |
|
|
173
|
+
| `chapter-version patch -c 1 2 3` | Bump patch version for chapters 1–3 |
|
|
174
|
+
| `chapter-version major --all` | Bump major version for all chapters |
|
|
175
|
+
| `create-chapter` | Create the next chapter (e.g. Chapter 11) at v1.0.0 |
|
|
176
|
+
| `increment-chapters 6` | Renumber: Chapter 7→8, 8→9, … (use `-y` to skip confirm) |
|
|
177
|
+
| `count-chapter-words` | Word count for the latest version of each chapter |
|
|
178
|
+
| `format-markdown -r -i .` | Format markdown in place |
|
|
179
|
+
|
|
180
|
+
Use `-d /path/to/Chapters` to point any tool at a specific directory.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
[MIT](LICENSE)
|
beckit-3.2.1/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
## Download and Install Beckit
|
|
2
|
+
|
|
3
|
+
Beckit is distributed as a prebuilt installer — no Python or developer tools required. Download the version for your platform from the [latest release](../../releases/latest). This app was built with the help of Claude.
|
|
4
|
+
|
|
5
|
+
### macOS
|
|
6
|
+
|
|
7
|
+
**Requirements:** macOS 11 (Big Sur) or later
|
|
8
|
+
|
|
9
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-macOS-<version>.dmg`
|
|
10
|
+
2. Open the downloaded `.dmg` file
|
|
11
|
+
3. In the window that appears, drag **Beckit** into your **Applications** folder
|
|
12
|
+
4. Eject the disk image (drag it to Trash or right-click → Eject)
|
|
13
|
+
5. Open **Launchpad** or your **Applications** folder and launch **Beckit**
|
|
14
|
+
|
|
15
|
+
> **"App can't be opened because it is from an unidentified developer"**
|
|
16
|
+
> This appears because the app is not yet signed with an Apple Developer certificate.
|
|
17
|
+
> To open it anyway: right-click (or Control-click) the app icon → click **Open** → click **Open** again in the dialog. You only need to do this once.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Windows
|
|
22
|
+
|
|
23
|
+
**Requirements:** Windows 10 or later (64-bit)
|
|
24
|
+
|
|
25
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-Windows-<version>.zip`
|
|
26
|
+
2. Right-click the zip file and select **Extract All…** — choose a permanent location (e.g. `C:\Program Files\Beckit` or a folder on your Desktop)
|
|
27
|
+
3. Open the extracted folder and double-click **Beckit.exe** to launch the app
|
|
28
|
+
|
|
29
|
+
> **Windows Defender SmartScreen warning ("Windows protected your PC")**
|
|
30
|
+
> This appears because the app is not yet code-signed. Click **More info** → **Run anyway** to proceed.
|
|
31
|
+
|
|
32
|
+
> **Tip:** Right-click `Beckit.exe` → **Send to** → **Desktop (create shortcut)** for easier access.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## First Launch
|
|
37
|
+
|
|
38
|
+
Regardless of platform, the first time you open Beckit you will be asked to connect your GitHub account:
|
|
39
|
+
|
|
40
|
+
1. [Create a GitHub Personal Access Token](https://github.com/settings/tokens/new) with the **`repo`** scope (classic token)
|
|
41
|
+
2. Paste it into the sign-in prompt and press **Connect**
|
|
42
|
+
3. Select an existing repository to use as your book, or create a new one — Beckit will clone it locally and set up the `Chapters/` structure automatically
|
|
43
|
+
|
|
44
|
+
Your token and repository settings are stored in your system's app config directory:
|
|
45
|
+
|
|
46
|
+
| Platform | Config location |
|
|
47
|
+
|---|---|
|
|
48
|
+
| macOS | `~/Library/Application Support/beckit/` |
|
|
49
|
+
| Windows | `%APPDATA%\beckit\` |
|
|
50
|
+
|
|
51
|
+
PDF export is built in — no separate tools required.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Run from Source (Developers)
|
|
56
|
+
|
|
57
|
+
If you'd prefer to run directly from source, or want to contribute to the project:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/kicka5h/book-editor-template.git
|
|
61
|
+
cd book-editor-template
|
|
62
|
+
|
|
63
|
+
python3 -m venv .venv
|
|
64
|
+
|
|
65
|
+
# macOS / Linux
|
|
66
|
+
source .venv/bin/activate
|
|
67
|
+
|
|
68
|
+
# Windows
|
|
69
|
+
.venv\Scripts\activate
|
|
70
|
+
|
|
71
|
+
pip install -e .
|
|
72
|
+
python -m book_editor # or: beckit
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
To install dev dependencies and run tests:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install -e ".[dev]"
|
|
79
|
+
pytest
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Project Layout
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
book-editor-template/
|
|
88
|
+
├── .gitignore
|
|
89
|
+
├── pyproject.toml
|
|
90
|
+
├── README.md
|
|
91
|
+
├── LICENSE
|
|
92
|
+
├── src/
|
|
93
|
+
│ └── book_editor/
|
|
94
|
+
│ ├── __init__.py
|
|
95
|
+
│ ├── __main__.py # GUI entry (python -m book_editor)
|
|
96
|
+
│ ├── app.py # Flet desktop UI
|
|
97
|
+
│ ├── config/ # App config (repo path, token)
|
|
98
|
+
│ ├── services/ # Chapter versioning, create, increment, word count, format, git
|
|
99
|
+
│ └── utils/ # Paths, chapter number helpers
|
|
100
|
+
├── tests/
|
|
101
|
+
│ ├── api/
|
|
102
|
+
│ ├── services/
|
|
103
|
+
│ ├── repositories/
|
|
104
|
+
│ └── utils/
|
|
105
|
+
└── .github/workflows/ # CI, CD, PDF generation, major release
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Book Directory Structure
|
|
111
|
+
|
|
112
|
+
Chapters live under `Chapters/` with semantic versioning per chapter:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Chapters/
|
|
116
|
+
Chapter 1/
|
|
117
|
+
v1.0.0/
|
|
118
|
+
v1.0.0.md
|
|
119
|
+
v1.1.0/
|
|
120
|
+
v1.1.0.md
|
|
121
|
+
Chapter 2/
|
|
122
|
+
v1.0.0/
|
|
123
|
+
v1.0.0.md
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Each chapter can have multiple version folders (`vMAJOR.MINOR.PATCH`). All tools use the **latest** version when reporting word counts, generating PDFs, or listing chapters.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## CLI Tools
|
|
131
|
+
|
|
132
|
+
After `pip install -e .`, these commands are available (run from a directory containing your `Chapters/` folder):
|
|
133
|
+
|
|
134
|
+
| Command | Description |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `chapter-version list` | List chapters and their current versions |
|
|
137
|
+
| `chapter-version minor -c 5` | Bump minor version for chapter 5 |
|
|
138
|
+
| `chapter-version patch -c 1 2 3` | Bump patch version for chapters 1–3 |
|
|
139
|
+
| `chapter-version major --all` | Bump major version for all chapters |
|
|
140
|
+
| `create-chapter` | Create the next chapter (e.g. Chapter 11) at v1.0.0 |
|
|
141
|
+
| `increment-chapters 6` | Renumber: Chapter 7→8, 8→9, … (use `-y` to skip confirm) |
|
|
142
|
+
| `count-chapter-words` | Word count for the latest version of each chapter |
|
|
143
|
+
| `format-markdown -r -i .` | Format markdown in place |
|
|
144
|
+
|
|
145
|
+
Use `-d /path/to/Chapters` to point any tool at a specific directory.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "beckit"
|
|
7
|
+
version = "3.2.1"
|
|
8
|
+
description = "Lightweight cross-platform book writing app with GitHub sync and chapter versioning"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Beckit contributors" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["book", "writing", "markdown", "github", "editor"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Environment :: MacOS X",
|
|
19
|
+
"Environment :: Win32 (MS Windows)",
|
|
20
|
+
"Environment :: X11 Applications",
|
|
21
|
+
"Intended Audience :: End Users/Desktop",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3.9",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Text Editors",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"flet>=0.24.0",
|
|
33
|
+
"GitPython>=3.1.0",
|
|
34
|
+
"PyGithub>=2.0.0",
|
|
35
|
+
"requests>=2.28.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Homepage = "https://github.com/kicka5h/beckit-book-editor"
|
|
40
|
+
Source = "https://github.com/kicka5h/beckit-book-editor"
|
|
41
|
+
"Bug Tracker" = "https://github.com/kicka5h/beckit-book-editor/issues"
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
dev = [
|
|
45
|
+
"pytest>=7.0",
|
|
46
|
+
"pytest-cov>=4.0",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
beckit = "book_editor.__main__:run_gui"
|
|
51
|
+
chapter-version = "book_editor.services.chapter_version:main"
|
|
52
|
+
create-chapter = "book_editor.services.create_chapter:main"
|
|
53
|
+
increment-chapters = "book_editor.services.increment_chapters:main"
|
|
54
|
+
count-chapter-words = "book_editor.services.count_chapter_words:main"
|
|
55
|
+
format-markdown = "book_editor.services.format_markdown:main"
|
|
56
|
+
|
|
57
|
+
[tool.setuptools.packages.find]
|
|
58
|
+
where = ["src"]
|
|
59
|
+
|
|
60
|
+
[tool.pytest.ini_options]
|
|
61
|
+
testpaths = ["tests"]
|
|
62
|
+
pythonpath = ["src"]
|
beckit-3.2.1/setup.cfg
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: beckit
|
|
3
|
+
Version: 3.2.1
|
|
4
|
+
Summary: Lightweight cross-platform book writing app with GitHub sync and chapter versioning
|
|
5
|
+
Author: Beckit contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kicka5h/beckit-book-editor
|
|
8
|
+
Project-URL: Source, https://github.com/kicka5h/beckit-book-editor
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/kicka5h/beckit-book-editor/issues
|
|
10
|
+
Keywords: book,writing,markdown,github,editor
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: MacOS X
|
|
13
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
14
|
+
Classifier: Environment :: X11 Applications
|
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Text Editors
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: flet>=0.24.0
|
|
28
|
+
Requires-Dist: GitPython>=3.1.0
|
|
29
|
+
Requires-Dist: PyGithub>=2.0.0
|
|
30
|
+
Requires-Dist: requests>=2.28.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
## Download and Install Beckit
|
|
37
|
+
|
|
38
|
+
Beckit is distributed as a prebuilt installer — no Python or developer tools required. Download the version for your platform from the [latest release](../../releases/latest). This app was built with the help of Claude.
|
|
39
|
+
|
|
40
|
+
### macOS
|
|
41
|
+
|
|
42
|
+
**Requirements:** macOS 11 (Big Sur) or later
|
|
43
|
+
|
|
44
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-macOS-<version>.dmg`
|
|
45
|
+
2. Open the downloaded `.dmg` file
|
|
46
|
+
3. In the window that appears, drag **Beckit** into your **Applications** folder
|
|
47
|
+
4. Eject the disk image (drag it to Trash or right-click → Eject)
|
|
48
|
+
5. Open **Launchpad** or your **Applications** folder and launch **Beckit**
|
|
49
|
+
|
|
50
|
+
> **"App can't be opened because it is from an unidentified developer"**
|
|
51
|
+
> This appears because the app is not yet signed with an Apple Developer certificate.
|
|
52
|
+
> To open it anyway: right-click (or Control-click) the app icon → click **Open** → click **Open** again in the dialog. You only need to do this once.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### Windows
|
|
57
|
+
|
|
58
|
+
**Requirements:** Windows 10 or later (64-bit)
|
|
59
|
+
|
|
60
|
+
1. Go to the [latest release](../../releases/latest) and download `Beckit-Windows-<version>.zip`
|
|
61
|
+
2. Right-click the zip file and select **Extract All…** — choose a permanent location (e.g. `C:\Program Files\Beckit` or a folder on your Desktop)
|
|
62
|
+
3. Open the extracted folder and double-click **Beckit.exe** to launch the app
|
|
63
|
+
|
|
64
|
+
> **Windows Defender SmartScreen warning ("Windows protected your PC")**
|
|
65
|
+
> This appears because the app is not yet code-signed. Click **More info** → **Run anyway** to proceed.
|
|
66
|
+
|
|
67
|
+
> **Tip:** Right-click `Beckit.exe` → **Send to** → **Desktop (create shortcut)** for easier access.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## First Launch
|
|
72
|
+
|
|
73
|
+
Regardless of platform, the first time you open Beckit you will be asked to connect your GitHub account:
|
|
74
|
+
|
|
75
|
+
1. [Create a GitHub Personal Access Token](https://github.com/settings/tokens/new) with the **`repo`** scope (classic token)
|
|
76
|
+
2. Paste it into the sign-in prompt and press **Connect**
|
|
77
|
+
3. Select an existing repository to use as your book, or create a new one — Beckit will clone it locally and set up the `Chapters/` structure automatically
|
|
78
|
+
|
|
79
|
+
Your token and repository settings are stored in your system's app config directory:
|
|
80
|
+
|
|
81
|
+
| Platform | Config location |
|
|
82
|
+
|---|---|
|
|
83
|
+
| macOS | `~/Library/Application Support/beckit/` |
|
|
84
|
+
| Windows | `%APPDATA%\beckit\` |
|
|
85
|
+
|
|
86
|
+
PDF export is built in — no separate tools required.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Run from Source (Developers)
|
|
91
|
+
|
|
92
|
+
If you'd prefer to run directly from source, or want to contribute to the project:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git clone https://github.com/kicka5h/book-editor-template.git
|
|
96
|
+
cd book-editor-template
|
|
97
|
+
|
|
98
|
+
python3 -m venv .venv
|
|
99
|
+
|
|
100
|
+
# macOS / Linux
|
|
101
|
+
source .venv/bin/activate
|
|
102
|
+
|
|
103
|
+
# Windows
|
|
104
|
+
.venv\Scripts\activate
|
|
105
|
+
|
|
106
|
+
pip install -e .
|
|
107
|
+
python -m book_editor # or: beckit
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
To install dev dependencies and run tests:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install -e ".[dev]"
|
|
114
|
+
pytest
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Project Layout
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
book-editor-template/
|
|
123
|
+
├── .gitignore
|
|
124
|
+
├── pyproject.toml
|
|
125
|
+
├── README.md
|
|
126
|
+
├── LICENSE
|
|
127
|
+
├── src/
|
|
128
|
+
│ └── book_editor/
|
|
129
|
+
│ ├── __init__.py
|
|
130
|
+
│ ├── __main__.py # GUI entry (python -m book_editor)
|
|
131
|
+
│ ├── app.py # Flet desktop UI
|
|
132
|
+
│ ├── config/ # App config (repo path, token)
|
|
133
|
+
│ ├── services/ # Chapter versioning, create, increment, word count, format, git
|
|
134
|
+
│ └── utils/ # Paths, chapter number helpers
|
|
135
|
+
├── tests/
|
|
136
|
+
│ ├── api/
|
|
137
|
+
│ ├── services/
|
|
138
|
+
│ ├── repositories/
|
|
139
|
+
│ └── utils/
|
|
140
|
+
└── .github/workflows/ # CI, CD, PDF generation, major release
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Book Directory Structure
|
|
146
|
+
|
|
147
|
+
Chapters live under `Chapters/` with semantic versioning per chapter:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
Chapters/
|
|
151
|
+
Chapter 1/
|
|
152
|
+
v1.0.0/
|
|
153
|
+
v1.0.0.md
|
|
154
|
+
v1.1.0/
|
|
155
|
+
v1.1.0.md
|
|
156
|
+
Chapter 2/
|
|
157
|
+
v1.0.0/
|
|
158
|
+
v1.0.0.md
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Each chapter can have multiple version folders (`vMAJOR.MINOR.PATCH`). All tools use the **latest** version when reporting word counts, generating PDFs, or listing chapters.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## CLI Tools
|
|
166
|
+
|
|
167
|
+
After `pip install -e .`, these commands are available (run from a directory containing your `Chapters/` folder):
|
|
168
|
+
|
|
169
|
+
| Command | Description |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `chapter-version list` | List chapters and their current versions |
|
|
172
|
+
| `chapter-version minor -c 5` | Bump minor version for chapter 5 |
|
|
173
|
+
| `chapter-version patch -c 1 2 3` | Bump patch version for chapters 1–3 |
|
|
174
|
+
| `chapter-version major --all` | Bump major version for all chapters |
|
|
175
|
+
| `create-chapter` | Create the next chapter (e.g. Chapter 11) at v1.0.0 |
|
|
176
|
+
| `increment-chapters 6` | Renumber: Chapter 7→8, 8→9, … (use `-y` to skip confirm) |
|
|
177
|
+
| `count-chapter-words` | Word count for the latest version of each chapter |
|
|
178
|
+
| `format-markdown -r -i .` | Format markdown in place |
|
|
179
|
+
|
|
180
|
+
Use `-d /path/to/Chapters` to point any tool at a specific directory.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/beckit.egg-info/PKG-INFO
|
|
5
|
+
src/beckit.egg-info/SOURCES.txt
|
|
6
|
+
src/beckit.egg-info/dependency_links.txt
|
|
7
|
+
src/beckit.egg-info/entry_points.txt
|
|
8
|
+
src/beckit.egg-info/requires.txt
|
|
9
|
+
src/beckit.egg-info/top_level.txt
|
|
10
|
+
src/book_editor/__init__.py
|
|
11
|
+
src/book_editor/__main__.py
|
|
12
|
+
src/book_editor/app.py
|
|
13
|
+
src/book_editor/config/__init__.py
|
|
14
|
+
src/book_editor/services/__init__.py
|
|
15
|
+
src/book_editor/services/auto_version.py
|
|
16
|
+
src/book_editor/services/chapter_version.py
|
|
17
|
+
src/book_editor/services/count_chapter_words.py
|
|
18
|
+
src/book_editor/services/create_chapter.py
|
|
19
|
+
src/book_editor/services/format_markdown.py
|
|
20
|
+
src/book_editor/services/github_app.py
|
|
21
|
+
src/book_editor/services/increment_chapters.py
|
|
22
|
+
src/book_editor/services/pdf_build.py
|
|
23
|
+
src/book_editor/services/planning.py
|
|
24
|
+
src/book_editor/services/repo.py
|
|
25
|
+
src/book_editor/utils/__init__.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
[console_scripts]
|
|
2
|
+
beckit = book_editor.__main__:run_gui
|
|
3
|
+
chapter-version = book_editor.services.chapter_version:main
|
|
4
|
+
count-chapter-words = book_editor.services.count_chapter_words:main
|
|
5
|
+
create-chapter = book_editor.services.create_chapter:main
|
|
6
|
+
format-markdown = book_editor.services.format_markdown:main
|
|
7
|
+
increment-chapters = book_editor.services.increment_chapters:main
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
book_editor
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Entry point for the Beckit desktop app (python -m book_editor or beckit)."""
|
|
2
|
+
|
|
3
|
+
import flet as ft
|
|
4
|
+
|
|
5
|
+
from book_editor.app import main as app_main
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def run_gui() -> None:
|
|
9
|
+
"""Run the Flet desktop application."""
|
|
10
|
+
ft.app(target=app_main)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
run_gui()
|