Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marph91/thunderbird-joplin-export
Easily export your Thunderbird emails to Joplin.
https://github.com/marph91/thunderbird-joplin-export
email javascript joplin joplin-api thunderbird thunderbird-addon thunderbird-extension
Last synced: 8 days ago
JSON representation
Easily export your Thunderbird emails to Joplin.
- Host: GitHub
- URL: https://github.com/marph91/thunderbird-joplin-export
- Owner: marph91
- License: mpl-2.0
- Created: 2022-03-19T11:42:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-13T15:50:20.000Z (5 months ago)
- Last Synced: 2024-10-24T22:37:58.047Z (15 days ago)
- Topics: email, javascript, joplin, joplin-api, thunderbird, thunderbird-addon, thunderbird-extension
- Language: TypeScript
- Homepage:
- Size: 139 KB
- Stars: 28
- Watchers: 2
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-joplin - Thunderbird Joplin Export - export-export-emails-from-thunderbird-to-joplin/24792)]. Thunderbird add-on to export mails to Joplin. (Tools / Unmaintained Themes)
README
# Joplin Export Thunderbird Addon
Easily export your Thunderbird emails to Joplin.
[![build](https://github.com/marph91/thunderbird-joplin-export/actions/workflows/build.yml/badge.svg)](https://github.com/marph91/thunderbird-joplin-export/actions/workflows/build.yml)
[![test](https://github.com/marph91/thunderbird-joplin-export/actions/workflows/test.yml/badge.svg)](https://github.com/marph91/thunderbird-joplin-export/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/marph91/thunderbird-joplin-export/branch/master/graph/badge.svg?token=YZYEW7C1VM)](https://codecov.io/gh/marph91/thunderbird-joplin-export)## Features
- Export a text selection, a single email or multiple emails to Joplin.
- Export by clicking the button or pressing the hotkey (by default "Ctrl+Alt+J")
- Export the email as note or todo.
- Add metadata to the title and body of the note:
- Set a template for note title and body.
- Trim the author or subject by regex. For example, remove "Re:" or "Fwd:".
- Include the date in a [custom format](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
- Take a look at [this section](#include-metadata) for details.
- Add tags and attachments from the email.## Installation
- Via [Thunderbird addon store](https://addons.thunderbird.net/en/thunderbird/addon/joplin-export/) (preferred)
- Via manual import:
1. Download the artifacts from the [releases page](https://github.com/marph91/thunderbird-joplin-export/releases).
2. Import to Thunderbird via the addon manager: Tools -> Add-ons -> small gear at top right -> "Install Add-on From File...".## Usage
1. Start Joplin.
2. [Enable the webclipper](https://joplinapp.org/clipper/) and copy the API token.
3. Configure the plugin:
1. Paste the API token to the token field.
2. Save
3. Refresh the available notebooks by pressing the small update button.
4. Select a destination notebook.
5. Save
4. Select any email. The Joplin button should be at the menu.
5. Export the email by clicking the button. If there is any problem, a notification will pop up. After a successful export, the email should be in the specified Joplin notebook.### Include metadata
In this section you will find some examples how to include email metadata into note title or body. All metadata of the [mail header object](https://webextension-api.thunderbird.net/en/latest/messages.html#messages-messageheader) can be used.
By default, the note title template is `{{subject}} from {{author}}`. I. e. the `subject` and `author` keys are searched in the mail header object and inserted into the template if found. Since the subject contains often strings like `Re:` or `Fwd:`, these can be removed by defining a regex. The setting is called "Trim subject". For me, the regex `^(((Re|Fw|Fwd):|(\[.*\])) ?)*` works best.
It is also possible to insert some metadata at the top of the note body. This can be done by defining a template in the "Note header" setting. The template should be specified in markdown syntax. Words surrounded by double curly brackets will be attempted to be replaced by the corresponding metadata, as done in the note title.
The following two code snippets show examples of what the templates might look like.
Plain text with closing separation line:
```text
From: {{author}}
Subject: {{subject}}
Date: {{date}}
To: {{recipients}}---
```
Table with closing separation line:
```text
| | |
| ------- | -------------- |
| From | {{author}} |
| Subject | {{subject}} |
| Date | {{date}} |
| To | {{recipients}} |---
```
## Troubleshooting
What to do when the export failed?
1. Check that Joplin is running and the webclipper is enabled.
2. Check that the plugin is configured correctly. There is a status field. The status should be "working". Make sure the API token is set correctly.
3. Check the developer console. Usually it can be opened by pressing "Ctrl + Shift + I" or going to "Extras -> Developer Tools". There should be some error message.
4. If the previous steps didn't resolve the issue, you can open a github issue or email me.## Related Projects
- [Overview in the Joplin forum](https://discourse.joplinapp.org/t/how-to-handle-emails-with-joplin-desktop/37469)
- : Add all emails of an account to Joplin.
- : Export notes from Joplin to your email client.
- : Add all emails of one or more accounts to Joplin.## Further ressources
-
-## Changelog
### 0.0.8
- Bugfix: Make export working again when mail body is not displayed ().
### 0.0.6
- Add `author` and `user_created_date` metadata.
- Add support for Thunderbird up to version 127.### 0.0.5
- Add support for Thunderbird 117 ().
### 0.0.4
- Add export via context menu ().
### 0.0.3
- Add custom author and date ().
- Fix naming of the default tags ().### 0.0.2
- Add user defined note title ().
### 0.0.1
- Initial release.