Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Markdown Files #1189

Closed
milkdromeda opened this issue Feb 2, 2019 · 9 comments
Closed

Import Markdown Files #1189

milkdromeda opened this issue Feb 2, 2019 · 9 comments
Labels
[feature] markdown Anything relating to markdown. feature request Request for a new feature
Milestone

Comments

@milkdromeda
Copy link

Feature Request

I believe the adding the ability to import files in the Markdown format is critical. Rather than importing .txt files where the formatting is omitted, .md files keeps the formatting.

As a Markdown-focused notes app, I am surprised that this feature is missing. This presents a barrier for new users like me who are trying to import their old notes, only to discover that there is no direct and perfect way to achieve this in bulk.

Here's Why This is a Hassle

Did NOT Work

For example, in my case, I wanted to import my notes from Apple Notes to Simplenote (I use MacOS). So I tried to use Notes Exporter to convert Apple Notes to .txt before importing it to Simplenote. But the Apple Notes formatting turned into HTML and strange symbols (Notes Exporter issue).

Next, I tried using Exporter to export Apple Notes to .md. Then, I extracted the files from folders and converted it to .txt using Cloud Convert before importing. While Exporter transformed the Apple Notes formatting to .md perfectly, the latter converted the .md files to .txt in a non-user friendly markdown syntax (Cloud Convert issue).

Somewhat Work

From the method above, instead of using Cloud Convert, I did the following

  1. Used the following Terminal command to convert markdown to text (have to do it individually for each file)

util -convert txt [Markdown File Path]

  1. Filtered and extracted Markdown files to trash can using Finder, leaving only text files
  2. Imported converted text file to Simplenote

The markdown renders nicely with the exception that the titles are displayed twice (which is a Simplenote issue as the text file itself does not have the title repeated)

If there's a simpler way to import to Simplenote that I've missed, feel free to tell me. Otherwise, I think we can agree that the feature to add markdown files is indispensable. Thank you!

@mirka mirka added the feature request Request for a new feature label Feb 5, 2019
@mirka
Copy link
Member

mirka commented Feb 5, 2019

I agree that it would be a good idea to accept files with extension .md in addition to .txt in our plain text importer. Maybe we could also check the "Enable Markdown on all notes" option by default when there is a .md file in the batch.

In the meantime, note that there is nothing inherently special about .md files — it's just a plain text file, that may or may not contain Markdown syntax. If you have a bunch of .md files, you can bulk rename them to have a .txt extension and import it with the "Enable Markdown on all notes" option checked.

@milkdromeda
Copy link
Author

Hi @mirka,
I like your suggestion to check "Enable Markdown on all notes" by default for .md files.
I am just interested in one thing: how can one bulk rename files (on the Mac or other platforms)?

@mirka
Copy link
Member

mirka commented Feb 6, 2019

I am just interested in one thing: how can one bulk rename files (on the Mac or other platforms)?

In recent versions of macOS, there is a handy bulk renaming feature in the context menu. Before that, I used to use bulk renaming apps like Name Mangler (which are probably still better if you have more advanced needs).

@bummytime bummytime added this to the Future milestone May 21, 2019
@bummytime bummytime added the [feature] markdown Anything relating to markdown. label May 21, 2019
@belcherj
Copy link
Contributor

Thanks! I’ve added this to our feature requests!

@eallion
Copy link

eallion commented Dec 9, 2019

yes, i want this feature too. My 4000+ Notion .md notes want a new home.

@philtrade
Copy link

Hi @mirka,
I like your suggestion to check "Enable Markdown on all notes" by default for .md files.
I am just interested in one thing: how can one bulk rename files (on the Mac or other platforms)?

A perl one-liner will do the trick of bulk renaming of files using regex substitution. MacOS comes with perl installed.

In a terminal window:

cd /directory/of/some-4000-mdfiles/

ls *.md | perl -MFile::Copy -ne 'chomp; next unless -e; $o = $_; s/\.md$/.txt/; next if -e; move($o, $_)'
You might wanna test a few files first:

ls file1.md file2.md file3.md | perl .....

Once you verify this is doing what you need, wiggle the magic wand on the 4000+ files with ls *.md | perl .....

If you prefer to be cautious and copy the files instead of renaming them, change themove(...) to copy(...)

One question though, the Exporter app is not available in the app store (USA) now.. do you know where else I may get it?

@dmsnell
Copy link
Contributor

dmsnell commented Dec 16, 2019

@philtrade note that bash can do this natively too

for FILE in *.md; do mv "$FILE" "${FILE%.md}.txt"; done

@philtrade
Copy link

philtrade commented Dec 17, 2019 via email

@codebykat
Copy link
Member

codebykat commented Dec 23, 2020

Done in #2351

@codebykat codebykat modified the milestones: Future, 2.0.0 Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[feature] markdown Anything relating to markdown. feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

8 participants