Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romellem/get-all-links-in-eml-emails
Extract HREF's from EML email files
https://github.com/romellem/get-all-links-in-eml-emails
eml-files javascript nodejs
Last synced: about 13 hours ago
JSON representation
Extract HREF's from EML email files
- Host: GitHub
- URL: https://github.com/romellem/get-all-links-in-eml-emails
- Owner: romellem
- Created: 2018-07-10T16:33:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T18:44:59.000Z (over 6 years ago)
- Last Synced: 2024-08-02T15:52:45.859Z (3 months ago)
- Topics: eml-files, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Ever tried find that one link someone emailed you a long time ago
in Outlook for Mac?Well now you can export all your EML files (select all your emails and
just drag them to the desktop), copy them to this **emails/** folder,
and spit out _every_ link contained in all the emails.Once you have this list, you can sort / unique it, and see if you can
find the link you were looking for.## Instructions
1. Copy all EML files to **emails/** folder
2. Run `npm start`
3. Sit back and collect those links## How it works
We [glob](https://www.npmjs.com/package/globby) through our EML files, read them,
and parse its contents using [mailparser](https://www.npmjs.com/package/mailparser)
to extract the HTML body from the actual email. Then we pass that HTML into
[JSDOM](https://www.npmjs.com/package/jsdom) so we can easily `querySelectorAll`
to get all `` tags. Then, we simply write all of the href's of those links
out to a file.