Skip to content

Commit

Permalink
feat: supporting Logseq (#323)
Browse files Browse the repository at this point in the history
Co-authored-by: Guoboism <[email protected]>
  • Loading branch information
akosbalasko and guoboism authored Oct 14, 2021
1 parent e0090ca commit d6d8c06
Show file tree
Hide file tree
Showing 73 changed files with 2,637 additions and 3,031 deletions.
95 changes: 95 additions & 0 deletions Notes_for_Logseq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# About the export for logseq #

## How to export for logseq ##

Please use settings below
- **OutputFormate : standardMD**
- **Store Attachments in one folder: TRUE**
- Perform URL encoding : TRUE
- Keep original amount of new lines : TRUE
- **Export for Logseq : TRUE**
- **Custome resourse folder: assets**


```
{
"keepOriginalHtml": false,
"isMetadataNeeded": true,
"isNotebookNameNeeded": false,
"isZettelkastenNeeded": false,
"plainTextNotesOnly": false,
"skipWebClips": true,
"useHashTags": false,
"nestedTags": {
"separatorInEN": "_",
"replaceSeparatorWith": "---",
"replaceSpaceWith": "-"
},
"outputFormat": "StandardMD",
"urlEncodeFileNamesAndLinks": false,
"pathSeparator": "/",
"resourcesDir": "assets",
"turndownOptions": {
"headingStyle": "atx"
},
"skipLocation": true,
"skipCreationTime": true,
"skipUpdateTime": true,
"skipSourceUrl": true,
"skipTags": true,
"skipEnexFileNameFromOutputPath": false,
"keepMDCharactersOfENNotes": false,
"monospaceIsCodeBlock": false,
"dateFormat": "YYYY-MM-DD",
"currentTemplate": "{content-block}{content}{end-content-block}",
"keepOriginalAmountOfNewlines": true,
"haveEnexLevelResources": true,
"logseqSettings":{
"journalNotes": false
}
}
```

## Template ##

You should use the page template below instead of the default one

```
- This is my template
{title-block}- #{title}#{end-title-block}
-
---
{content-block}{content}{end-content-block}
-
---
{created-at-block}- _Created at {created-at}._{end-created-at-block}
{updated-at-block}- _Last updated at {updated-at}._{end-updated-at-block}
{source-url-block}- _Source URL: []({source-url})._{end-source-url-block}
{tags-block}
-
---
- Tagged:
- {tags}
{end-tags-block}
```

## Further Notes ##

If successful, in the output folder there are two folders:
- assets
- pages

You can merge these folders into Logseq

If these notes are journals then set Page type dropdown to Journal. It will
- rename `pages` into `journals`
- rename all generated note files as `2021-01-01.md` (based on dateFormat property) to let logseq auto detect the dates
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![logo](screens/yarle-logo.png)

![Last Commit](https://img.shields.io/github/last-commit/akosbalasko/yarle?style=for-the-badge)
![Version](https://img.shields.io/badge/version-4.2.3-blue?style=for-the-badge)
![Version](https://img.shields.io/badge/version-4.5.0-blue?style=for-the-badge)
[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen?style=for-the-badge)](https://github.com/akosbalasko/yarle#readme)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green?style=for-the-badge)](https://github.com/akosbalasko/yarle/graphs/commit-activity)
[![License: MIT](https://img.shields.io/github/license/akosbalasko/yarle?style=for-the-badge)](https://github.com/akosbalasko/yarle/blob/master/LICENSE)
Expand Down Expand Up @@ -39,13 +39,13 @@ Yarle is the ultimate converter of Evernote notes to Markdown.

## Binaries:

[Windows](https://github.com/akosbalasko/yarle/releases/download/v4.2.3/yarle-evernote-to-md-4.2.3.Setup.exe)
[Windows](https://github.com/akosbalasko/yarle/releases/download/v4.5.0/yarle-evernote-to-md-4.5.0.Setup.exe)

[Linux (.rpm)](https://github.com/akosbalasko/yarle/releases/download/v4.2.3/yarle-evernote-to-md-4.2.3-1.x86_64.rpm)
[Linux (.rpm)](https://github.com/akosbalasko/yarle/releases/download/v4.5.0/yarle-evernote-to-md-4.5.0-1.x86_64.rpm)

[Debian (.deb)](https://github.com/akosbalasko/yarle/releases/download/v4.2.3/yarle-evernote-to-md_4.2.3_amd64.deb)
[Debian (.deb)](https://github.com/akosbalasko/yarle/releases/download/v4.5.0/yarle-evernote-to-md_4.5.0_amd64.deb)

[Mac](https://github.com/akosbalasko/yarle/releases/download/v4.2.3/yarle-evernote-to-md-darwin-x64-4.2.3.zip)
[Mac](https://github.com/akosbalasko/yarle/releases/download/v4.5.0/yarle-evernote-to-md-darwin-x64-4.5.0.zip)

## Feedback, Appreciation, Donation:
If you have an idea on how to improve the tool or face any problems, feel free to raise an issue, or even contribute!
Expand All @@ -58,6 +58,8 @@ Download the desktop app for your platform, and follow the instructions there.

![out](https://user-images.githubusercontent.com/11886731/114092375-1a72c400-98ba-11eb-9c74-300d1e4c0829.gif)

In order to perform conversion into Logseq format, please choose Logseq as Target format in the configuration panel, then choose the type of your notes (Journal Notes or Pages). For Logseq all the other options have already been pre-configured.


## Prerequisite for legacy versions (below 4.0.0):

Expand Down Expand Up @@ -97,7 +99,17 @@ To configure Yarle, you must create a config file. By default it looks like this
"separatorInEN": "_",
"replaceSeparatorWith": "/",
"replaceSpaceWith": "-"
}
},
"resourcesDir": "resources",
"turndownOptions": {
"headingStyle": "atx"
},
"dateFormat": "YYYY-MM-DD",
"haveEnexLevelResources": true,
"logseqSettings":{
"journalNotes": false
}
}
```
The following configurational properties are available:
Expand All @@ -120,9 +132,9 @@ The following configurational properties are available:
| ```keepImageSize``` | `ObsidianMD` or `StandardMD` | preserve an image's width and height in the chosen format when specified
| ```urlEncodeFileNamesAndLinks``` | true or false | URL-encodes linked file names and internal EN links . e.g "linked file.jpg" will be converted to "linked%20file.jpg"
| ```keepOriginalAmountOfNewlines``` | true or false | keep the original amount of newlines, default is false, when the multiple newlines are collapsed to one.
```generateNakedUrls``` | true or false | if it's true, Yarle generates 'naked' external Urls without any extra characters. If its false, external Urls are wrapped by '<' and '>' characters

| ```addExtensionToInternalLinks``` | true or false | adds '.md' extensions at the end of internal file links, to make them recognizable by DevonThink and other tools
| ```turndownOptions``` | `{...}` | additional configuration options for [turndown](https://github.com/mixmark-io/turndown#options), e.g., `{ "bulletListMarker": "-" }` (only in Yarle config file, not desktop app)
```generateNakedUrls``` | true or false | if it's true, Yarle generates 'naked' external Urls without any extra characters. If its false, external Urls are wrapped by '<' and '>' characters
| ```addExtensionToInternalLinks``` | true or false | adds '.md' extensions at the end of internal file links, to make them recognizable by DevonThink and other tools
| ```turndownOptions``` | `{...}` | additional configuration options for [turndown](https://github.com/mixmark-io/turndown#options), e.g., `{ "bulletListMarker": "-" }` (only in Yarle config file, not desktop app)
| ```logseqSettings``` | `{...}` | settings for Logseq output, currently ```journalNotes``` property is supported, if it is set to `true`, then the notes will be converted to be recognizable by Logseq as Journal notes, the notes will be named by their creation date and they will be collected under `journal` folder. If it is `false`, then they will be converted to be `Pages` (e.g. simple notes, collected in `pages` folder).

Metadata settings can be set via the template.
5 changes: 4 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"outputFormat": "ObsidianMD",
"skipEnexFileNameFromOutputPath": false,
"keepOriginalAmountOfNewlines": false,
"pathSeparator": "/"
"pathSeparator": "/",
"logseqSettings":{
"journalNotes": false
}
}
36 changes: 36 additions & 0 deletions config.logseq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

{
"keepOriginalHtml": false,
"isMetadataNeeded": true,
"isNotebookNameNeeded": false,
"isZettelkastenNeeded": false,
"plainTextNotesOnly": false,
"skipWebClips": true,
"useHashTags": false,
"nestedTags": {
"separatorInEN": "_",
"replaceSeparatorWith": "---",
"replaceSpaceWith": "-"
},
"outputFormat": "StandardMD",
"urlEncodeFileNamesAndLinks": false,
"pathSeparator": "/",
"resourcesDir": "assets",
"turndownOptions": {
"headingStyle": "atx"
},
"skipLocation": true,
"skipCreationTime": false,
"dateFormat": "YYYY-MM-DD",
"skipUpdateTime": true,
"skipSourceUrl": true,
"skipTags": true,
"skipEnexFileNameFromOutputPath": false,
"keepMDCharactersOfENNotes": false,
"monospaceIsCodeBlock": false,
"keepOriginalAmountOfNewlines": true,
"haveEnexLevelResources": true,
"logseqSettings":{
"journalNotes": false
}
}
Loading

0 comments on commit d6d8c06

Please sign in to comment.