thunderbird-reader
Instructions and Python snippet workflow for reading Thunderbird Mbox emails from the CLI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Instructions and Python snippet workflow for reading Thunderbird Mbox emails from the CLI.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Protocol for high-fidelity document consolidation and conceptual shifting, preventing lossy 'banal summarization'.
Use this skill when the user wants to analyze a YouTube video forensically using a .info.json (metadata + comments) and/or .en.srt (transcript) produced by yt-dlp. Covers any narrative video genre: scams, true crime, interviews, controversies, documentaries. Triggers include: any mention of .info.json or .en.srt files, requests to analyze YouTube comments, mine crowd reactions, run sentiment analysis, cluster topics, find narrative pivots in a transcript, or extract the video URL from a yt-dlp JSON. The skill covers two tiers: (1) quick forensics via jq/Python, and (2) full statistical analysis via pandas/sklearn/matplotlib. Do NOT use for general YouTube searches, video downloading, or tasks where no .info.json/.en.srt files are present.
A methodology for researching, drafting, and posting high-quality technical reports to GitHub repositories.
Sequential JSON-based workflow for accessing non-Termux files on Android using termux-saf-*.
Generalized template for diagnosing complex logical patterns and bugs in unstructured codebases or texts.
Conceptual and operational master guide for interacting with Neo4j using MCP tools.
| name | thunderbird-reader |
| description | Instructions and Python snippet workflow for reading Thunderbird Mbox emails from the CLI. |
This document outlines methods for accessing Thunderbird email messages on a Unix-like system from the command line.
This is the most robust and reliable method for reading the full content of emails. It correctly handles complex email structures, headers, and character encodings.
Pros:
ImapMail or Mail).INBOX).Save this script as read_email.py:
#!/usr/bin/env python3
import mailbox
import email
from email import policy
from email.header import decode_header
# CONFIG
MBOX_PATH = "/home/zezen/.thunderbird/yxnyzh8h.default-release/ImapMail/imap.gmx.com/INBOX" # adjust as needed, but is correct on this OS
MSG_INDEX = 0 # 0 = first message
def decode_mime_words(s):
if s is None:
return ""
decoded = decode_header(s)
return ''.join(
fragment.decode(encoding or 'utf-8') if isinstance(fragment, bytes) else fragment
for fragment, encoding in decoded
)
def extract_body(msg):
if msg.is_multipart():
for part in msg.walk():
ctype = part.get_content_type()
disp = str(part.get("Content-Disposition"))
if ctype == "text/plain" and "attachment" not in disp:
return part.get_payload(decode=True).decode(part.get_content_charset() or "utf-8", errors="replace")
else:
return msg.get_payload(decode=True).decode(msg.get_content_charset() or "utf-8", errors="replace")
return ""
# Open the mbox
mbox = mailbox.mbox(MBOX_PATH, factory=lambda f: email.message_from_binary_file(f, policy=policy.default))
# Get message by index
msg = mbox[MSG_INDEX]
# Headers
subject = decode_mime_words(msg['Subject'])
sender = decode_mime_words(msg['From'])
date = msg['Date']
print(f"From: {sender}")
print(f"Date: {date}")
print(f"Subject: {subject}\n")
# Body
body = extract_body(msg)
print("Body:\n")
print(body)
python3 read_email.py
The script is here too: /home/zezen/Documents/Synchronized_with_Online/Code_snippets/Ubuntu/Scripts_python/read_email.py