diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-22 23:20:56 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-22 23:20:56 -0600 |
| commit | 3a2445080c880544985f50fb0d916534698cc073 (patch) | |
| tree | 909f98edbbb940aafb95de02457d4d6f7db3cba4 /docs/scripts/eml-view-and-extract-attachments-readme.org | |
| parent | 3595aa8a8122da543676717fb5825044eee99a9d (diff) | |
| download | archangel-3a2445080c880544985f50fb0d916534698cc073.tar.gz archangel-3a2445080c880544985f50fb0d916534698cc073.zip | |
chore: add docs/ to .gitignore and untrack personal files
docs/ contains session history, personal workflows, and private
protocols that shouldn't be in a public repository.
Diffstat (limited to 'docs/scripts/eml-view-and-extract-attachments-readme.org')
| -rw-r--r-- | docs/scripts/eml-view-and-extract-attachments-readme.org | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/docs/scripts/eml-view-and-extract-attachments-readme.org b/docs/scripts/eml-view-and-extract-attachments-readme.org deleted file mode 100644 index c132df8..0000000 --- a/docs/scripts/eml-view-and-extract-attachments-readme.org +++ /dev/null @@ -1,47 +0,0 @@ -#+TITLE: eml-view-and-extract-attachments.py - -Extract email content and attachments from EML files with auto-renaming. - -* Usage - -#+begin_src bash -# View mode — print metadata and body to stdout, extract attachments alongside EML -python3 docs/scripts/eml-view-and-extract-attachments.py inbox/message.eml - -# Pipeline mode — extract, auto-rename, refile to output dir, clean up -python3 docs/scripts/eml-view-and-extract-attachments.py inbox/message.eml --output-dir assets/ -#+end_src - -* Naming Convention - -Files are auto-renamed as =YYYY-MM-DD-HHMM-Sender-TYPE-Description.ext=: - -- =2026-02-05-1136-Jonathan-EMAIL-Re-Fw-4319-Danneel-Street.eml= -- =2026-02-05-1136-Jonathan-EMAIL-Re-Fw-4319-Danneel-Street.txt= -- =2026-02-05-1136-Jonathan-ATTACH-Ltr-Carrollton.pdf= - -Date and sender are parsed from email headers. Falls back to "unknown" for missing values. - -* Dependencies - -- Python 3 (stdlib only for core functionality) -- =html2text= (optional — used for HTML-only emails, falls back to tag stripping) - -* Pipeline Mode Behavior - -1. Creates a temp directory alongside the source EML -2. Copies and renames the EML, writes a =.txt= of the body, extracts attachments -3. Checks for filename collisions in the output directory -4. Moves all files to the output directory -5. Cleans up the temp directory -6. Prints a summary of created files - -Source EML is never modified or moved. - -* Tests - -#+begin_src bash -python3 -m pytest docs/scripts/tests/ -v -#+end_src - -48 tests: unit tests for parsing, filename generation, and attachment saving; integration tests for both pipeline and stdout modes. Requires =pytest=. |
