Skip to content

Commit

Permalink
Desktop, Cli: Resolves #5224: Add Markdown + Front Matter exporter/im…
Browse files Browse the repository at this point in the history
…porter (#5465)
  • Loading branch information
CalebJohn authored Oct 16, 2021
1 parent 1fee83d commit 2acd55e
Show file tree
Hide file tree
Showing 25 changed files with 1,127 additions and 1,043 deletions.
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,12 @@ packages/lib/services/interop/InteropService_Exporter_Jex.js.map
packages/lib/services/interop/InteropService_Exporter_Md.d.ts
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md.js.map
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.d.ts
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js.map
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.d.ts
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js.map
packages/lib/services/interop/InteropService_Exporter_Raw.d.ts
packages/lib/services/interop/InteropService_Exporter_Raw.js
packages/lib/services/interop/InteropService_Exporter_Raw.js.map
Expand All @@ -1332,6 +1338,12 @@ packages/lib/services/interop/InteropService_Importer_Md.js.map
packages/lib/services/interop/InteropService_Importer_Md.test.d.ts
packages/lib/services/interop/InteropService_Importer_Md.test.js
packages/lib/services/interop/InteropService_Importer_Md.test.js.map
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.d.ts
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js.map
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.d.ts
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js.map
packages/lib/services/interop/InteropService_Importer_Raw.d.ts
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/InteropService_Importer_Raw.js.map
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,12 @@ packages/lib/services/interop/InteropService_Exporter_Jex.js.map
packages/lib/services/interop/InteropService_Exporter_Md.d.ts
packages/lib/services/interop/InteropService_Exporter_Md.js
packages/lib/services/interop/InteropService_Exporter_Md.js.map
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.d.ts
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.js.map
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.d.ts
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Exporter_Md_frontmatter.test.js.map
packages/lib/services/interop/InteropService_Exporter_Raw.d.ts
packages/lib/services/interop/InteropService_Exporter_Raw.js
packages/lib/services/interop/InteropService_Exporter_Raw.js.map
Expand All @@ -1315,6 +1321,12 @@ packages/lib/services/interop/InteropService_Importer_Md.js.map
packages/lib/services/interop/InteropService_Importer_Md.test.d.ts
packages/lib/services/interop/InteropService_Importer_Md.test.js
packages/lib/services/interop/InteropService_Importer_Md.test.js.map
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.d.ts
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.js.map
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.d.ts
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js
packages/lib/services/interop/InteropService_Importer_Md_frontmatter.test.js.map
packages/lib/services/interop/InteropService_Importer_Raw.d.ts
packages/lib/services/interop/InteropService_Importer_Raw.js
packages/lib/services/interop/InteropService_Importer_Raw.js.map
Expand Down
9 changes: 9 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/duplicates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: ddd
tags:
- banana
- banana
- banana
---

And a link to note [full](./full.md), and link to the [same note](./full.md).
18 changes: 18 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/full.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Test Note Title
updated: 2019-05-01 16:54
created: 2019-05-01 16:54
Source: https://joplinapp.org
author: Joplin
latitude: 37.084021
longitude: -94.51350100
altitude: 0.0000
Completed?: false
due: 2021-08-22 00:00
tags:
- Joplin
- nOte
- pencil
---

This is the note body
6 changes: 6 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/inline_tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
Title: Inline Tags
Tags: [inline, tag]
---

Body
9 changes: 9 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/normalize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: norm
tags:
- tag1
- tag2
- tag3
---

note body
5 changes: 5 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/numbers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 001
---

note body
20 changes: 20 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/r-markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "YAML metadata for R Markdown with examples"
subtitle: "YAML header"
author: Hao Liang
date: "2021-06-10"
output:
md_document:
toc: yes
toc_depth: 2
abstract: YAML is a human-readable and easy to write language to define data structures.
keywords: ["YAML", "Rmd"]
subject: Medicine
description: Rmd makes it possible to use a YAML header to specify certain parameters right at the beginning of the document.
category:
- Rmd
- Medicine
lang: "en-US"
---

Example taken from https://github.com/hao203/rmarkdown-YAML
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Distill for R Markdown"
author:
- name: "JJ Allaire"
url: https://github.com/jjallaire
affiliation: RStudio
affiliation_url: https://www.rstudio.com
---

Example taken from https://github.com/hao203/rmarkdown-YAML
7 changes: 7 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/short_date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Date
created: 2017-01-01
updated: 2021-01-01
---

I hope the dates are imported correctly
9 changes: 9 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/split.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: xxx
---

---
author: xxx
---

note body
12 changes: 12 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/title_newline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Title: |-
First
Second
Updated: 28/09/2021 20:57
Created: 28/09/2021 20:57
Latitude: 0.00000000
Longitude: 0.00000000
Altitude: 0.0000
---

This note has a newline in the title
8 changes: 8 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/unquoted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
Title: Unquoted
Longitude: -94.51350100
Completed?: No
DUE: 2022-04-04 13:00
---

note body
7 changes: 7 additions & 0 deletions packages/app-cli/tests/support/test_notes/yaml/utc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Test Note Title
updated: 2019-05-01T16:54:00Z
created: 2019-05-01 16:54-07:00
---

This is the note body
Loading

0 comments on commit 2acd55e

Please sign in to comment.