https://github.com/djsudduth/joplin-plugin-paragraph-extractor
Extract specific paragraphs out of Joplin notes using keywords, hashtags or custom tags similar to Logseq block references. Also, refresh extracted notes if source notes change.
https://github.com/djsudduth/joplin-plugin-paragraph-extractor
block-references extract-text joplin joplin-plugin note-taking notes-app notetaking plugin
Last synced: 4 months ago
JSON representation
Extract specific paragraphs out of Joplin notes using keywords, hashtags or custom tags similar to Logseq block references. Also, refresh extracted notes if source notes change.
- Host: GitHub
- URL: https://github.com/djsudduth/joplin-plugin-paragraph-extractor
- Owner: djsudduth
- License: mit
- Created: 2023-11-24T19:20:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-10T18:02:50.000Z (over 1 year ago)
- Last Synced: 2025-06-27T19:47:47.612Z (12 months ago)
- Topics: block-references, extract-text, joplin, joplin-plugin, note-taking, notes-app, notetaking, plugin
- Language: TypeScript
- Homepage:
- Size: 443 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Joplin Extract Paragraphs
Plugin to extract and combine paragraph blocks from any selected notes to a single new note based on a keyword, hashtag or custom tag contained within the paragraph. This is similar to block functionality in other note taking systems like Logseq.
Typical useage is to identify paragraphs with added hashtags (e.g., #mytag). Then, any paragraph with that tag in multiple notes can be copied and added to a single new note. However, keywords do not have to be hashtags and can just be a simple search word to identify and extract the paragraph.
Example screenshots can be found here: https://discourse.joplinapp.org/t/plugin-extract-paragraphs/35831
Bullet and sub-bullet lists are treated as single paragraphs in Joplin. Settings will allow for extracting single bullets (along with their sub-bullets) that contain the keyword rather than all the bullets in the paragraph.
**The full note can be extracted** if the hashtagged keyword is by iteself in the last paragraph. This is useful if you do not wish to add the same hashtag to every paragraph if the entire note is useful.
Any Joplin tags in the source notes will be combined as Joplin tags in the extracted note. Selected notes are not changed at all.
**Extracted notes can be refreshed from the source notes** if the setting to add extraction metadata is on. This will allow an extracted note to update if any of the source notes change. (NOTE: only one extracted note can be refrehed at a time. Also, if you use the rich text editor, you **must have the rich text metadata selection in settings turned on** so that the data isn't deleted if editing the extracted note).
## Installation
### Automatic
- Go to `Tools > Options > Plugins`
- Search for `Paragraph Extractor`
- Click Install plugin
- Restart Joplin to enable the plugin
### Manual
- Download the latest released JPL package (`io.github.djsudduth.paragraph-extractor.jpl`) from [here](https://github.com/djsudduth/joplin-plugin-paragraph-extractor/releases/latest)
- Close Joplin
- Copy the downloaded JPL package in your profile `plugins` folder
- Start Joplin
## Usage
### Extracting Paragraphs
- Select multiple notes to extract sections based on keyword into a single note
- Click on `Tools > Extract paragraphs from notes` or use the command `Extract paragraphs from notes` from the context menu
### Refreshing Extracted Notes
- Select a single note that was previously extracted with the appended metadata (see settings to turn on metadata)
- Click on `Tools > Refresh extracted paragraphs note` or use the command `Refresh extracted paragraphs note` from the context menu
Complete Video Tutorial:
https://youtu.be/tyk66PUjSCE
## Options
Go to `Tools > Options > Paragraph Extractor`
- `Preserve source note titles with backlinks`: Titles of source notes will be embedded at the top in new note with links back to the original source notes. Default `true`.
- `Embed source note titles at end of each extracted paragraph`: Titles of source notes will be embedded at the end of each extracted paragraph rather than at the top with a link back to the original source notes. Default `false`.
- `Extract content at the bulleted list item level`: Bullets will be extracted at the top bullet level (including sub-bullets) vs all bullets within a paragraph. Default `false`
- `Ignore the keyword case`: Any case for the keyword or hashtag keyword will be used for extraction. Default `false`
- `Include the header of the section extracted`: Any H1-H6 header will be included with the extracted paragraph or bullet (this is ignored for keywords embedded within the header which are always extracted). Default `false`
- `Default or Last Used Tag Prefix character`: Either the common hashtag # character (preferred) or $, %. Default `#`
- `Default or Last Used Paragraph Tag or Keyword`: The entered keyword to search in notes to extract the paragraph. If the prefix hashtag field is set, then the tag is added to the keyword for finding paragraph blocks.
- `Extract paragraphs that contain highlights`: Any paragraphs that contain highlights will also be extracted along with paragraphs with keywords. If there is a need to only extract paragraphs with highlighting then leave the keyword blank. Default `false`
- `Remove extracted paragraph keyword and add end tag`: Any tagged/hashtagged keyword will be removed from the paragraph and an endtag will be added in the new extraction note. Removal assumes the keyword has a hashtag prefix character - otherwise the setting is ignored. The end tag is always appended when this is selected. Default `false`
- `Append extracted note refresh metadata`: When paragraphs are extracted from one or many notes, the details of the plugin's settings and source note list will be appended as metadata in the form of a comment. This can be used to refresh an extracted note if the source note or notes change. Default `false`
- `Append extracted note refresh metadata`: When paragraphs are extracted from one or many notes, the details of the plugin's settings and source note list will be appended as metadata in the form of a comment (unless the rich text compatibility option is selected which will make the metadata visible). This can be used to refresh an extracted note if the source note or notes change. Default `false`
- `Enable rich text editor compatibility for refresh metadata`: If the rich text editor is used with note refresh - this must be enabled so that the appended refresh metadata isn't deleted when a refreshed note is edited within the rich editor. This does not need to be enabled if using only the markdown editor. Default `true`
- `Title of the combined note`: New title of the combined note. Default `Extracted paragraphs`.
- `Custom note title`: New note title with possible variables `{{FIRSTTITLE}}`, `{{LASTTITLE}}`, `{{ALLTITLE}}` and `{{DATE}}`.
## Keyboard Shortcuts
Under `Options > Keyboard Shortcuts` you can assign a keyboard shortcut for the following commands:
- `Extract paragraphs from notes`
## Build
See [BUILD](BUILD.md)
## Changelog
See [Changelog](CHANGELOG.md)
## Thanks
Special thanks to [Jack Gruber](https://github.com/JackGruber) for the inspiration and excellent code to help bootstrap this plugin!