leafdocs 0.1.0__tar.gz → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leafdocs
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Turn a directory of Markdown files into a self-hosted, searchable web reader.
5
5
  Author-email: Anshul <you@example.com>
6
6
  License: MIT
@@ -168,127 +168,14 @@ LEAFDOCS_SECRET_KEY=your-secret-here
168
168
  > - Running behind a production WSGI server (Gunicorn recommended)
169
169
  > - Terminating HTTPS at a reverse proxy (Nginx recommended)
170
170
  > - Managing the process with a supervisor (systemd recommended)
171
- >
172
- > The instructions below cover a standard Nginx + Gunicorn + systemd setup.
173
171
 
174
- ### AWS EC2 / GCP Compute Engine
172
+ For full production setup on **AWS EC2** or **GCP Compute Engine** — Gunicorn + Nginx + systemd, raw-IP access, and two options for a custom domain (direct DNS + Certbot, or Cloudflare Tunnel for boxes without a public IPv4) — see **[DEPLOY.md](DEPLOY.md)**.
175
173
 
176
- The steps are identical for both — the only difference is how you provision the VM.
177
-
178
- #### 1. Provision a VM
179
-
180
- - **AWS:** Launch an EC2 instance (Ubuntu 24.04 LTS, `t3.micro` or larger). Open ports 80 and 443 in the security group.
181
- - **GCP:** Create a Compute Engine instance (Ubuntu 24.04 LTS, `e2-micro` or larger). Open ports 80 and 443 in the firewall rules.
182
-
183
- SSH into the instance.
184
-
185
- #### 2. Install dependencies
186
-
187
- ```bash
188
- sudo apt update && sudo apt install -y python3-pip python3-venv nginx
189
- ```
190
-
191
- #### 3. Set up the app
192
-
193
- ```bash
194
- mkdir ~/leafdocs-app && cd ~/leafdocs-app
195
- python3 -m venv .venv
196
- source .venv/bin/activate
197
- pip install leafdocs gunicorn
198
- ```
199
-
200
- Create your `docs/` directory and add your `.md` files:
201
-
202
- ```bash
203
- mkdir docs
204
- ```
205
-
206
- Create `main.py`:
207
-
208
- ```python
209
- from leafdocs import LeafDocs
210
-
211
- ld = LeafDocs(docs_dir="./docs")
212
- app = ld.flask_app
213
- ```
214
-
215
- Create `.env`:
216
-
217
- ```
218
- LEAFDOCS_PINS=yourpin
219
- LEAFDOCS_SECRET_KEY=your-long-random-secret-here
220
- ```
221
-
222
- Test it runs:
223
-
224
- ```bash
225
- gunicorn --bind 127.0.0.1:8000 main:app
226
- ```
227
-
228
- #### 4. Configure systemd
229
-
230
- Create `/etc/systemd/system/leafdocs.service`:
231
-
232
- ```ini
233
- [Unit]
234
- Description=LeafDocs
235
- After=network.target
236
-
237
- [Service]
238
- User=ubuntu
239
- WorkingDirectory=/home/ubuntu/leafdocs-app
240
- Environment="PATH=/home/ubuntu/leafdocs-app/.venv/bin"
241
- ExecStart=/home/ubuntu/leafdocs-app/.venv/bin/gunicorn --workers 2 --bind 127.0.0.1:8000 main:app
242
- Restart=always
243
-
244
- [Install]
245
- WantedBy=multi-user.target
246
- ```
247
-
248
- Enable and start:
249
-
250
- ```bash
251
- sudo systemctl daemon-reload
252
- sudo systemctl enable leafdocs
253
- sudo systemctl start leafdocs
254
- sudo systemctl status leafdocs
255
- ```
256
-
257
- #### 5. Configure Nginx
258
-
259
- Create `/etc/nginx/sites-available/leafdocs`:
260
-
261
- ```nginx
262
- server {
263
- listen 80;
264
- server_name your-domain.com;
265
-
266
- location / {
267
- proxy_pass http://127.0.0.1:8000;
268
- proxy_set_header Host $host;
269
- proxy_set_header X-Real-IP $remote_addr;
270
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
271
- proxy_set_header X-Forwarded-Proto $scheme;
272
- }
273
- }
274
- ```
275
-
276
- Enable and reload:
277
-
278
- ```bash
279
- sudo ln -s /etc/nginx/sites-available/leafdocs /etc/nginx/sites-enabled/
280
- sudo nginx -t
281
- sudo systemctl reload nginx
282
- ```
283
-
284
- #### 6. Enable HTTPS
174
+ ---
285
175
 
286
- ```bash
287
- sudo apt install -y certbot python3-certbot-nginx
288
- sudo certbot --nginx -d your-domain.com
289
- ```
176
+ ## Claude Code skill
290
177
 
291
- Certbot will automatically update your Nginx config and set up auto-renewal.
178
+ [`SKILL.md`](SKILL.md) is a [Claude Code](https://claude.com/claude-code) skill that generates Markdown files with the correct leafdocs frontmatter (`title`, `tags`) from raw notes or existing content, ready to drop into your `docs/` directory. Drop it into your Claude Code skills directory to use it.
292
179
 
293
180
  ---
294
181
 
@@ -144,127 +144,14 @@ LEAFDOCS_SECRET_KEY=your-secret-here
144
144
  > - Running behind a production WSGI server (Gunicorn recommended)
145
145
  > - Terminating HTTPS at a reverse proxy (Nginx recommended)
146
146
  > - Managing the process with a supervisor (systemd recommended)
147
- >
148
- > The instructions below cover a standard Nginx + Gunicorn + systemd setup.
149
147
 
150
- ### AWS EC2 / GCP Compute Engine
148
+ For full production setup on **AWS EC2** or **GCP Compute Engine** — Gunicorn + Nginx + systemd, raw-IP access, and two options for a custom domain (direct DNS + Certbot, or Cloudflare Tunnel for boxes without a public IPv4) — see **[DEPLOY.md](DEPLOY.md)**.
151
149
 
152
- The steps are identical for both — the only difference is how you provision the VM.
153
-
154
- #### 1. Provision a VM
155
-
156
- - **AWS:** Launch an EC2 instance (Ubuntu 24.04 LTS, `t3.micro` or larger). Open ports 80 and 443 in the security group.
157
- - **GCP:** Create a Compute Engine instance (Ubuntu 24.04 LTS, `e2-micro` or larger). Open ports 80 and 443 in the firewall rules.
158
-
159
- SSH into the instance.
160
-
161
- #### 2. Install dependencies
162
-
163
- ```bash
164
- sudo apt update && sudo apt install -y python3-pip python3-venv nginx
165
- ```
166
-
167
- #### 3. Set up the app
168
-
169
- ```bash
170
- mkdir ~/leafdocs-app && cd ~/leafdocs-app
171
- python3 -m venv .venv
172
- source .venv/bin/activate
173
- pip install leafdocs gunicorn
174
- ```
175
-
176
- Create your `docs/` directory and add your `.md` files:
177
-
178
- ```bash
179
- mkdir docs
180
- ```
181
-
182
- Create `main.py`:
183
-
184
- ```python
185
- from leafdocs import LeafDocs
186
-
187
- ld = LeafDocs(docs_dir="./docs")
188
- app = ld.flask_app
189
- ```
190
-
191
- Create `.env`:
192
-
193
- ```
194
- LEAFDOCS_PINS=yourpin
195
- LEAFDOCS_SECRET_KEY=your-long-random-secret-here
196
- ```
197
-
198
- Test it runs:
199
-
200
- ```bash
201
- gunicorn --bind 127.0.0.1:8000 main:app
202
- ```
203
-
204
- #### 4. Configure systemd
205
-
206
- Create `/etc/systemd/system/leafdocs.service`:
207
-
208
- ```ini
209
- [Unit]
210
- Description=LeafDocs
211
- After=network.target
212
-
213
- [Service]
214
- User=ubuntu
215
- WorkingDirectory=/home/ubuntu/leafdocs-app
216
- Environment="PATH=/home/ubuntu/leafdocs-app/.venv/bin"
217
- ExecStart=/home/ubuntu/leafdocs-app/.venv/bin/gunicorn --workers 2 --bind 127.0.0.1:8000 main:app
218
- Restart=always
219
-
220
- [Install]
221
- WantedBy=multi-user.target
222
- ```
223
-
224
- Enable and start:
225
-
226
- ```bash
227
- sudo systemctl daemon-reload
228
- sudo systemctl enable leafdocs
229
- sudo systemctl start leafdocs
230
- sudo systemctl status leafdocs
231
- ```
232
-
233
- #### 5. Configure Nginx
234
-
235
- Create `/etc/nginx/sites-available/leafdocs`:
236
-
237
- ```nginx
238
- server {
239
- listen 80;
240
- server_name your-domain.com;
241
-
242
- location / {
243
- proxy_pass http://127.0.0.1:8000;
244
- proxy_set_header Host $host;
245
- proxy_set_header X-Real-IP $remote_addr;
246
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
247
- proxy_set_header X-Forwarded-Proto $scheme;
248
- }
249
- }
250
- ```
251
-
252
- Enable and reload:
253
-
254
- ```bash
255
- sudo ln -s /etc/nginx/sites-available/leafdocs /etc/nginx/sites-enabled/
256
- sudo nginx -t
257
- sudo systemctl reload nginx
258
- ```
259
-
260
- #### 6. Enable HTTPS
150
+ ---
261
151
 
262
- ```bash
263
- sudo apt install -y certbot python3-certbot-nginx
264
- sudo certbot --nginx -d your-domain.com
265
- ```
152
+ ## Claude Code skill
266
153
 
267
- Certbot will automatically update your Nginx config and set up auto-renewal.
154
+ [`SKILL.md`](SKILL.md) is a [Claude Code](https://claude.com/claude-code) skill that generates Markdown files with the correct leafdocs frontmatter (`title`, `tags`) from raw notes or existing content, ready to drop into your `docs/` directory. Drop it into your Claude Code skills directory to use it.
268
155
 
269
156
  ---
270
157
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "leafdocs"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "Turn a directory of Markdown files into a self-hosted, searchable web reader."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leafdocs
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Turn a directory of Markdown files into a self-hosted, searchable web reader.
5
5
  Author-email: Anshul <you@example.com>
6
6
  License: MIT
@@ -168,127 +168,14 @@ LEAFDOCS_SECRET_KEY=your-secret-here
168
168
  > - Running behind a production WSGI server (Gunicorn recommended)
169
169
  > - Terminating HTTPS at a reverse proxy (Nginx recommended)
170
170
  > - Managing the process with a supervisor (systemd recommended)
171
- >
172
- > The instructions below cover a standard Nginx + Gunicorn + systemd setup.
173
171
 
174
- ### AWS EC2 / GCP Compute Engine
172
+ For full production setup on **AWS EC2** or **GCP Compute Engine** — Gunicorn + Nginx + systemd, raw-IP access, and two options for a custom domain (direct DNS + Certbot, or Cloudflare Tunnel for boxes without a public IPv4) — see **[DEPLOY.md](DEPLOY.md)**.
175
173
 
176
- The steps are identical for both — the only difference is how you provision the VM.
177
-
178
- #### 1. Provision a VM
179
-
180
- - **AWS:** Launch an EC2 instance (Ubuntu 24.04 LTS, `t3.micro` or larger). Open ports 80 and 443 in the security group.
181
- - **GCP:** Create a Compute Engine instance (Ubuntu 24.04 LTS, `e2-micro` or larger). Open ports 80 and 443 in the firewall rules.
182
-
183
- SSH into the instance.
184
-
185
- #### 2. Install dependencies
186
-
187
- ```bash
188
- sudo apt update && sudo apt install -y python3-pip python3-venv nginx
189
- ```
190
-
191
- #### 3. Set up the app
192
-
193
- ```bash
194
- mkdir ~/leafdocs-app && cd ~/leafdocs-app
195
- python3 -m venv .venv
196
- source .venv/bin/activate
197
- pip install leafdocs gunicorn
198
- ```
199
-
200
- Create your `docs/` directory and add your `.md` files:
201
-
202
- ```bash
203
- mkdir docs
204
- ```
205
-
206
- Create `main.py`:
207
-
208
- ```python
209
- from leafdocs import LeafDocs
210
-
211
- ld = LeafDocs(docs_dir="./docs")
212
- app = ld.flask_app
213
- ```
214
-
215
- Create `.env`:
216
-
217
- ```
218
- LEAFDOCS_PINS=yourpin
219
- LEAFDOCS_SECRET_KEY=your-long-random-secret-here
220
- ```
221
-
222
- Test it runs:
223
-
224
- ```bash
225
- gunicorn --bind 127.0.0.1:8000 main:app
226
- ```
227
-
228
- #### 4. Configure systemd
229
-
230
- Create `/etc/systemd/system/leafdocs.service`:
231
-
232
- ```ini
233
- [Unit]
234
- Description=LeafDocs
235
- After=network.target
236
-
237
- [Service]
238
- User=ubuntu
239
- WorkingDirectory=/home/ubuntu/leafdocs-app
240
- Environment="PATH=/home/ubuntu/leafdocs-app/.venv/bin"
241
- ExecStart=/home/ubuntu/leafdocs-app/.venv/bin/gunicorn --workers 2 --bind 127.0.0.1:8000 main:app
242
- Restart=always
243
-
244
- [Install]
245
- WantedBy=multi-user.target
246
- ```
247
-
248
- Enable and start:
249
-
250
- ```bash
251
- sudo systemctl daemon-reload
252
- sudo systemctl enable leafdocs
253
- sudo systemctl start leafdocs
254
- sudo systemctl status leafdocs
255
- ```
256
-
257
- #### 5. Configure Nginx
258
-
259
- Create `/etc/nginx/sites-available/leafdocs`:
260
-
261
- ```nginx
262
- server {
263
- listen 80;
264
- server_name your-domain.com;
265
-
266
- location / {
267
- proxy_pass http://127.0.0.1:8000;
268
- proxy_set_header Host $host;
269
- proxy_set_header X-Real-IP $remote_addr;
270
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
271
- proxy_set_header X-Forwarded-Proto $scheme;
272
- }
273
- }
274
- ```
275
-
276
- Enable and reload:
277
-
278
- ```bash
279
- sudo ln -s /etc/nginx/sites-available/leafdocs /etc/nginx/sites-enabled/
280
- sudo nginx -t
281
- sudo systemctl reload nginx
282
- ```
283
-
284
- #### 6. Enable HTTPS
174
+ ---
285
175
 
286
- ```bash
287
- sudo apt install -y certbot python3-certbot-nginx
288
- sudo certbot --nginx -d your-domain.com
289
- ```
176
+ ## Claude Code skill
290
177
 
291
- Certbot will automatically update your Nginx config and set up auto-renewal.
178
+ [`SKILL.md`](SKILL.md) is a [Claude Code](https://claude.com/claude-code) skill that generates Markdown files with the correct leafdocs frontmatter (`title`, `tags`) from raw notes or existing content, ready to drop into your `docs/` directory. Drop it into your Claude Code skills directory to use it.
292
179
 
293
180
  ---
294
181
 
File without changes
File without changes
File without changes
File without changes