-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: evernote guid és evernote link in templates implemented (#583)
- Loading branch information
1 parent
438da48
commit 49088b7
Showing
21 changed files
with
274 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/utils/templates/apply-functions/apply-evernoteguid-template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { cloneDeep } from 'lodash'; | ||
|
||
import { NoteData } from '../../../models/NoteData'; | ||
import * as P from './../placeholders/evernoteguid-placeholders'; | ||
import { applyConditionalTemplate } from './apply-conditional-template'; | ||
|
||
export const applyEvernoteGuidTemplate = (noteData: NoteData, text: string): string => { | ||
return applyConditionalTemplate(text, P, "<YARLE_EVERNOTE_GUID_PLACEHOLDER>"); | ||
}; |
9 changes: 9 additions & 0 deletions
9
src/utils/templates/apply-functions/apply-evernotelink-template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { cloneDeep } from 'lodash'; | ||
|
||
import { NoteData } from '../../../models/NoteData'; | ||
import * as P from './../placeholders/evernotelink-placeholders'; | ||
import { applyConditionalTemplate } from './apply-conditional-template'; | ||
|
||
export const applyEvernoteLinkTemplate = (noteData: NoteData, text: string): string => { | ||
return applyConditionalTemplate(text, P, "<YARLE_EVERNOTE_LINK_PLACEHOLDER>"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/utils/templates/placeholders/evernoteguid-placeholders.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export const CONTENT_PLACEHOLDER = '{evernoteguid}'; | ||
export const START_BLOCK = '{evernoteguid-block}'; | ||
export const END_BLOCK = '{end-evernoteguid-block}'; |
4 changes: 4 additions & 0 deletions
4
src/utils/templates/placeholders/evernotelink-placeholders.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export const CONTENT_PLACEHOLDER = '{evernotelink}'; | ||
export const START_BLOCK = '{evernotelink-block}'; | ||
export const END_BLOCK = '{end-evernotelink-block}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/utils/templates/remove-functions/remove-evernoteguid-placeholder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as T from '../placeholders/evernoteguid-placeholders'; | ||
|
||
import { removePlaceholder } from './remove-placeholder'; | ||
|
||
export const removeEvernoteGuidPlaceholder = (text: string): string => { | ||
return removePlaceholder(text, T); | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/utils/templates/remove-functions/remove-evernotelink-placeholder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as T from '../placeholders/evernotelink-placeholders'; | ||
|
||
import { removePlaceholder } from './remove-placeholder'; | ||
|
||
export const removeEvernoteLinkPlaceholder = (text: string): string => { | ||
return removePlaceholder(text, T); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{title-block}# {title}{end-title-block} | ||
|
||
{tags-block} | ||
--- | ||
Tag(s): {tags} | ||
|
||
--- | ||
{end-tags-block} | ||
|
||
{content-block}{content}{end-content-block} | ||
|
||
|
||
{evernotelink-block} Evernote Link: {evernotelink}{end-evernotelink-block} | ||
{evernoteguid-block} Evernote GUID: {evernoteguid}{end-evernoteguid-block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export4.dtd"> | ||
<en-export export-date="20240115T160506Z" application="Evernote" version="10.70.2"> | ||
<note> | ||
<title>Table of Contents</title> | ||
<created>20240115T155959Z</created> | ||
<updated>20240115T160436Z</updated> | ||
<note-attributes> | ||
</note-attributes> | ||
<content> | ||
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><a href="evernote:///view/244421476/s470/27698765-eecc-2897-74d7-81098e4f2f48/d8ce9322-b866-453a-90b3-81923b70c474/">EvernoteNoteA</a></div><div><a href="evernote:///view/244421476/s470/306474c1-33f8-4aa3-2d0c-1b28a116e2b8/d8ce9322-b866-453a-90b3-81923b70c474/" rel="noopener noreferrer" rev="en_rl_none">EvernoteNoteB</a></div><div><a href="evernote:///view/244421476/s470/f77780bb-6823-55f8-e183-b326e4b9200a/d8ce9322-b866-453a-90b3-81923b70c474/" rel="noopener noreferrer" rev="en_rl_none">EvernoteNoteC</a></div></en-note> ]]> | ||
</content> | ||
</note> | ||
<note> | ||
<title>EvernoteNoteC</title> | ||
<created>20240115T155949Z</created> | ||
<updated>20240115T155955Z</updated> | ||
<note-attributes> | ||
</note-attributes> | ||
<content> | ||
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><br/></div></en-note> ]]> | ||
</content> | ||
</note> | ||
<note> | ||
<title>EvernoteNoteB</title> | ||
<created>20240115T155943Z</created> | ||
<updated>20240115T155950Z</updated> | ||
<note-attributes> | ||
</note-attributes> | ||
<content> | ||
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><br/></div></en-note> ]]> | ||
</content> | ||
</note> | ||
<note> | ||
<title>EvernoteNoteA</title> | ||
<created>20240115T155924Z</created> | ||
<updated>20240115T155942Z</updated> | ||
<note-attributes> | ||
</note-attributes> | ||
<content> | ||
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><br/></div></en-note> ]]> | ||
</content> | ||
</note> | ||
</en-export> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Links - NoteB | ||
|
||
|
||
|
||
[[Links - NoteA|Link to NoteA]] | ||
|
||
|
||
Evernote Link: evernote:///view/16093948/s150/f5885bd2-9bb0-74b9-6f7b-f70bd5afb5d8/d935905b-20a4-4b9e-91b5-cfa8d80ab818 | ||
Evernote GUID: d935905b-20a4-4b9e-91b5-cfa8d80ab818 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# EvernoteNoteA | ||
|
||
|
||
|
||
|
||
|
||
|
||
Evernote Link: evernote:///view/244421476/s470/27698765-eecc-2897-74d7-81098e4f2f48/d8ce9322-b866-453a-90b3-81923b70c474/ | ||
Evernote GUID: 27698765-eecc-2897-74d7-81098e4f2f48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# EvernoteNoteB | ||
|
||
|
||
|
||
|
||
|
||
|
||
Evernote Link: evernote:///view/244421476/s470/306474c1-33f8-4aa3-2d0c-1b28a116e2b8/d8ce9322-b866-453a-90b3-81923b70c474/ | ||
Evernote GUID: 306474c1-33f8-4aa3-2d0c-1b28a116e2b8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# EvernoteNoteC | ||
|
||
|
||
|
||
|
||
|
||
|
||
Evernote Link: evernote:///view/244421476/s470/f77780bb-6823-55f8-e183-b326e4b9200a/d8ce9322-b866-453a-90b3-81923b70c474/ | ||
Evernote GUID: f77780bb-6823-55f8-e183-b326e4b9200a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Table of Contents | ||
|
||
|
||
|
||
[[EvernoteNoteA|EvernoteNoteA]] | ||
[[EvernoteNoteB|EvernoteNoteB]] | ||
[[EvernoteNoteC|EvernoteNoteC]] | ||
|
||
|
Oops, something went wrong.