opengraph stuff

This commit is contained in:
2026-02-24 21:47:36 +00:00
parent 05f0d0e8f7
commit e36908cb0b
61 changed files with 5870 additions and 178 deletions
+28
View File
@@ -0,0 +1,28 @@
---
name: Sync Gmail Inbox
description: Download all emails from the user's Gmail account and save them as files.
version: 1
author: pastilhas
tags:
- email
- gmail
- sync
tools:
- gmail
inputs: []
---
# Sync Gmail Inbox
Download all emails from the user's Gmail account and save each one as an `.eml` file in `$OFFICER_USER_ROOT/Gmail/emails/`.
## Steps
1. Create the `$OFFICER_USER_ROOT/Gmail/emails` directory if it doesn't already exist.
2. Call `gmail` with `action=get_profile` to confirm the account is connected and note the total message count.
3. Determine the current year and month.
4. Loop **month by month**, starting from the current month and going backwards:
- Call `gmail` with `action=sync_inbox`, `output_dir=$OFFICER_USER_ROOT/Gmail/emails`, and `query=after:YYYY/MM/01 before:YYYY/MM+1/01` (adjust the dates for each month).
- Report the result for that month (e.g. "February 2026: saved 47 emails").
- If **3 consecutive months** return 0 saved emails and 0 already existing, stop — you've likely reached the beginning of the account.
5. When finished, count the total `.eml` files in `$OFFICER_USER_ROOT/Gmail/emails` and report the final total.
+27
View File
@@ -0,0 +1,27 @@
---
name: Test Sync Gmail Inbox
description: Test task — download only 2026 emails from Gmail.
version: 1
author: pastilhas
tags:
- email
- gmail
- sync
- test
tools:
- gmail
inputs: []
---
# Test Sync Gmail Inbox
Download emails from 2026 only and save each one as an `.eml` file in `$OFFICER_USER_ROOT/Gmail/emails/`.
## Steps
1. Create the `$OFFICER_USER_ROOT/Gmail/emails` directory if it doesn't already exist.
2. Call `gmail` with `action=get_profile` to confirm the account is connected.
3. Loop **month by month**, starting from the current month down to January 2026:
- Call `gmail` with `action=sync_inbox`, `output_dir=$OFFICER_USER_ROOT/Gmail/emails`, and `query=after:YYYY/MM/01 before:YYYY/MM+1/01`.
- Report the result for that month (e.g. "February 2026: saved 47 emails").
4. When finished, count the total `.eml` files in `$OFFICER_USER_ROOT/Gmail/emails` and report the final total.