fetch2gmail 1.0.4__tar.gz → 1.0.5__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.
- {fetch2gmail-1.0.4/src/fetch2gmail.egg-info → fetch2gmail-1.0.5}/PKG-INFO +26 -3
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/README.md +25 -2
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/pyproject.toml +1 -1
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5/src/fetch2gmail.egg-info}/PKG-INFO +26 -3
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/web_ui.py +6 -13
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/LICENSE +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/setup.cfg +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetch2gmail.egg-info/SOURCES.txt +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetch2gmail.egg-info/dependency_links.txt +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetch2gmail.egg-info/entry_points.txt +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetch2gmail.egg-info/requires.txt +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetch2gmail.egg-info/top_level.txt +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/__init__.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/auth_server.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/auth_ui.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/cli.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/config.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/env_file.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/gmail_client.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/imap_client.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/log_buffer.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/run.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/state.py +0 -0
- {fetch2gmail-1.0.4 → fetch2gmail-1.0.5}/src/fetcher/ui_auth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fetch2gmail
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Self-hosted email fetcher: IMAP to Gmail API import with idempotent state tracking
|
|
5
5
|
Author: Fetch2Gmail Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -240,9 +240,32 @@ All app files live in **one directory**: **config.json**, **credentials.json**,
|
|
|
240
240
|
| `fetch2gmail run` | Run one fetch cycle. |
|
|
241
241
|
| `fetch2gmail run --dry-run` | Connect to ISP and show what would be imported; no Gmail import, no delete. |
|
|
242
242
|
|
|
243
|
-
### Uninstall
|
|
243
|
+
### Uninstall
|
|
244
244
|
|
|
245
|
-
After copying **credentials.json** and **token.json** to the server,
|
|
245
|
+
**Machine used only to get the token (no system service):** After copying **credentials.json** and **token.json** to the server, remove the app: `pipx uninstall fetch2gmail`. Reinstall with `pipx install fetch2gmail` if you need to run `fetch2gmail auth` again later.
|
|
246
|
+
|
|
247
|
+
**Machine where the app runs (system service + app):** To remove everything so you can reinstall or run from source and see your changes:
|
|
248
|
+
|
|
249
|
+
1. **Stop and disable the systemd service, then remove the unit file:**
|
|
250
|
+
```bash
|
|
251
|
+
sudo systemctl stop fetch2gmail
|
|
252
|
+
sudo systemctl disable fetch2gmail
|
|
253
|
+
sudo rm /etc/systemd/system/fetch2gmail.service
|
|
254
|
+
sudo systemctl daemon-reload
|
|
255
|
+
```
|
|
256
|
+
(To confirm the service is gone: `systemctl status fetch2gmail` should report "not found".)
|
|
257
|
+
|
|
258
|
+
2. **Uninstall the app:**
|
|
259
|
+
- **If you installed with pipx:** `pipx uninstall fetch2gmail`
|
|
260
|
+
- **If you installed from source in a venv:** deactivate the venv (`deactivate`) and delete the project directory (e.g. `rm -rf ~/fetch2gmail`), or just use a different terminal and run from your dev clone with `pip install -e .` so the installed copy is no longer used.
|
|
261
|
+
|
|
262
|
+
3. **Optionally remove the data directory** (config, credentials, token, state, UI password file):
|
|
263
|
+
```bash
|
|
264
|
+
rm -rf /opt/fetch2gmail
|
|
265
|
+
```
|
|
266
|
+
Use the path you used as the data directory (e.g. `/opt/fetch2gmail` or `~/fetch2gmail`). Only do this if you no longer need the config or token; back them up first if you might reuse them.
|
|
267
|
+
|
|
268
|
+
**To test local changes:** Uninstall the system copy (steps 1 and 2 above), then from your git clone run `python3 -m venv .venv`, `source .venv/bin/activate`, `pip install -e .`. Use that terminal to run `fetch2gmail serve` (or reinstall the system service later with `fetch2gmail install-service` and point it at your data directory).
|
|
246
269
|
|
|
247
270
|
---
|
|
248
271
|
|
|
@@ -209,9 +209,32 @@ All app files live in **one directory**: **config.json**, **credentials.json**,
|
|
|
209
209
|
| `fetch2gmail run` | Run one fetch cycle. |
|
|
210
210
|
| `fetch2gmail run --dry-run` | Connect to ISP and show what would be imported; no Gmail import, no delete. |
|
|
211
211
|
|
|
212
|
-
### Uninstall
|
|
212
|
+
### Uninstall
|
|
213
213
|
|
|
214
|
-
After copying **credentials.json** and **token.json** to the server,
|
|
214
|
+
**Machine used only to get the token (no system service):** After copying **credentials.json** and **token.json** to the server, remove the app: `pipx uninstall fetch2gmail`. Reinstall with `pipx install fetch2gmail` if you need to run `fetch2gmail auth` again later.
|
|
215
|
+
|
|
216
|
+
**Machine where the app runs (system service + app):** To remove everything so you can reinstall or run from source and see your changes:
|
|
217
|
+
|
|
218
|
+
1. **Stop and disable the systemd service, then remove the unit file:**
|
|
219
|
+
```bash
|
|
220
|
+
sudo systemctl stop fetch2gmail
|
|
221
|
+
sudo systemctl disable fetch2gmail
|
|
222
|
+
sudo rm /etc/systemd/system/fetch2gmail.service
|
|
223
|
+
sudo systemctl daemon-reload
|
|
224
|
+
```
|
|
225
|
+
(To confirm the service is gone: `systemctl status fetch2gmail` should report "not found".)
|
|
226
|
+
|
|
227
|
+
2. **Uninstall the app:**
|
|
228
|
+
- **If you installed with pipx:** `pipx uninstall fetch2gmail`
|
|
229
|
+
- **If you installed from source in a venv:** deactivate the venv (`deactivate`) and delete the project directory (e.g. `rm -rf ~/fetch2gmail`), or just use a different terminal and run from your dev clone with `pip install -e .` so the installed copy is no longer used.
|
|
230
|
+
|
|
231
|
+
3. **Optionally remove the data directory** (config, credentials, token, state, UI password file):
|
|
232
|
+
```bash
|
|
233
|
+
rm -rf /opt/fetch2gmail
|
|
234
|
+
```
|
|
235
|
+
Use the path you used as the data directory (e.g. `/opt/fetch2gmail` or `~/fetch2gmail`). Only do this if you no longer need the config or token; back them up first if you might reuse them.
|
|
236
|
+
|
|
237
|
+
**To test local changes:** Uninstall the system copy (steps 1 and 2 above), then from your git clone run `python3 -m venv .venv`, `source .venv/bin/activate`, `pip install -e .`. Use that terminal to run `fetch2gmail serve` (or reinstall the system service later with `fetch2gmail install-service` and point it at your data directory).
|
|
215
238
|
|
|
216
239
|
---
|
|
217
240
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fetch2gmail
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Self-hosted email fetcher: IMAP to Gmail API import with idempotent state tracking
|
|
5
5
|
Author: Fetch2Gmail Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -240,9 +240,32 @@ All app files live in **one directory**: **config.json**, **credentials.json**,
|
|
|
240
240
|
| `fetch2gmail run` | Run one fetch cycle. |
|
|
241
241
|
| `fetch2gmail run --dry-run` | Connect to ISP and show what would be imported; no Gmail import, no delete. |
|
|
242
242
|
|
|
243
|
-
### Uninstall
|
|
243
|
+
### Uninstall
|
|
244
244
|
|
|
245
|
-
After copying **credentials.json** and **token.json** to the server,
|
|
245
|
+
**Machine used only to get the token (no system service):** After copying **credentials.json** and **token.json** to the server, remove the app: `pipx uninstall fetch2gmail`. Reinstall with `pipx install fetch2gmail` if you need to run `fetch2gmail auth` again later.
|
|
246
|
+
|
|
247
|
+
**Machine where the app runs (system service + app):** To remove everything so you can reinstall or run from source and see your changes:
|
|
248
|
+
|
|
249
|
+
1. **Stop and disable the systemd service, then remove the unit file:**
|
|
250
|
+
```bash
|
|
251
|
+
sudo systemctl stop fetch2gmail
|
|
252
|
+
sudo systemctl disable fetch2gmail
|
|
253
|
+
sudo rm /etc/systemd/system/fetch2gmail.service
|
|
254
|
+
sudo systemctl daemon-reload
|
|
255
|
+
```
|
|
256
|
+
(To confirm the service is gone: `systemctl status fetch2gmail` should report "not found".)
|
|
257
|
+
|
|
258
|
+
2. **Uninstall the app:**
|
|
259
|
+
- **If you installed with pipx:** `pipx uninstall fetch2gmail`
|
|
260
|
+
- **If you installed from source in a venv:** deactivate the venv (`deactivate`) and delete the project directory (e.g. `rm -rf ~/fetch2gmail`), or just use a different terminal and run from your dev clone with `pip install -e .` so the installed copy is no longer used.
|
|
261
|
+
|
|
262
|
+
3. **Optionally remove the data directory** (config, credentials, token, state, UI password file):
|
|
263
|
+
```bash
|
|
264
|
+
rm -rf /opt/fetch2gmail
|
|
265
|
+
```
|
|
266
|
+
Use the path you used as the data directory (e.g. `/opt/fetch2gmail` or `~/fetch2gmail`). Only do this if you no longer need the config or token; back them up first if you might reuse them.
|
|
267
|
+
|
|
268
|
+
**To test local changes:** Uninstall the system copy (steps 1 and 2 above), then from your git clone run `python3 -m venv .venv`, `source .venv/bin/activate`, `pip install -e .`. Use that terminal to run `fetch2gmail serve` (or reinstall the system service later with `fetch2gmail install-service` and point it at your data directory).
|
|
246
269
|
|
|
247
270
|
---
|
|
248
271
|
|
|
@@ -228,19 +228,19 @@ def api_auth_required() -> dict[str, Any]:
|
|
|
228
228
|
|
|
229
229
|
@app.get("/api/auth/session")
|
|
230
230
|
def api_auth_session(request: Request) -> dict[str, bool]:
|
|
231
|
-
"""Whether the current request is logged in
|
|
231
|
+
"""Whether the current request is logged in; ui_password_mode=True when .ui_auth is used (hide Log out)."""
|
|
232
232
|
cfg_dir = _config_dir_safe()
|
|
233
233
|
if load_ui_auth(cfg_dir):
|
|
234
|
-
return {"logged_in": True}
|
|
235
|
-
return {"logged_in": verify_request(request, cfg_dir, _config_exists())}
|
|
234
|
+
return {"logged_in": True, "ui_password_mode": True}
|
|
235
|
+
return {"logged_in": verify_request(request, cfg_dir, _config_exists()), "ui_password_mode": False}
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
@app.post("/api/logout")
|
|
239
239
|
def api_logout():
|
|
240
|
-
"""Clear session and redirect.
|
|
240
|
+
"""Clear session and redirect. Log out button is hidden when .ui_auth is used (Basic Auth cannot be cleared from the page)."""
|
|
241
241
|
cfg_dir = _config_dir_safe()
|
|
242
242
|
if load_ui_auth(cfg_dir):
|
|
243
|
-
resp = RedirectResponse(url="
|
|
243
|
+
resp = RedirectResponse(url="/", status_code=302)
|
|
244
244
|
else:
|
|
245
245
|
resp = RedirectResponse(url="/login", status_code=302)
|
|
246
246
|
clear_session_cookie(resp)
|
|
@@ -626,7 +626,6 @@ _HTML_PAGE = """
|
|
|
626
626
|
<body>
|
|
627
627
|
<h1>Fetch2Gmail <span class="logout" id="logoutSpan" style="display:none"><form method="post" action="/api/logout" style="display:inline"><button type="submit">Log out</button></form></span></h1>
|
|
628
628
|
<p id="subtitle">IMAP to Gmail import. Configure below.</p>
|
|
629
|
-
<p id="loggedOutMsg" style="display:none" class="status"></p>
|
|
630
629
|
<p id="loadingMsg">Loading...</p>
|
|
631
630
|
|
|
632
631
|
<div id="credentialsFirst" style="display:none">
|
|
@@ -723,7 +722,7 @@ _APP_JS = r"""
|
|
|
723
722
|
document.getElementById('landing').style.display = 'block';
|
|
724
723
|
return;
|
|
725
724
|
}
|
|
726
|
-
document.getElementById('logoutSpan').style.display = 'inline';
|
|
725
|
+
if (!session.ui_password_mode) document.getElementById('logoutSpan').style.display = 'inline';
|
|
727
726
|
loadConfig().then(function(c) { if (c) { loadStatus(); loadLogs(); } });
|
|
728
727
|
}).catch(function() {
|
|
729
728
|
document.getElementById('loadingMsg').style.display = 'none';
|
|
@@ -736,12 +735,6 @@ _APP_JS = r"""
|
|
|
736
735
|
document.getElementById('subtitle').textContent = 'Gmail connected. You can run a fetch now.';
|
|
737
736
|
history.replaceState({}, '', '/');
|
|
738
737
|
}
|
|
739
|
-
if (params.get('logged_out') === '1') {
|
|
740
|
-
var el = document.getElementById('loggedOutMsg');
|
|
741
|
-
el.style.display = 'block';
|
|
742
|
-
el.textContent = 'You clicked Log out. When using password protection, the browser may still send your password. To fully log out, close this tab or use a private window.';
|
|
743
|
-
history.replaceState({}, '', '/');
|
|
744
|
-
}
|
|
745
738
|
if (params.get('error') === 'no_credentials') document.getElementById('subtitle').innerHTML = '<span class="error">Put credentials.json in the app folder and try Connect Gmail again.</span>';
|
|
746
739
|
|
|
747
740
|
function hideLoading() { var el = document.getElementById('loadingMsg'); if (el) el.style.display = 'none'; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|