laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.6k stars 4.95k forks source link

[Feature Request] Enhanced Note Format #1080

Closed kwrobert closed 5 years ago

kwrobert commented 5 years ago

Operating system

Application

Description

First of all, awesome app! This is solving a lot of pain points in my current note taking approach, and I appreciate all the excellent work people have put into this app. I'm in the progress of migrating my notes over to Joplin now. While doing this, I explored the on-disk format of all the markdown notes files and I have a (hopefully simple) request.

The notes seems to have the following format when syncing to the file system and Dropbox:

<title here>

<content>

key1: value1
key2: value2

where the key: value pairs represent metadata for the note (geo location, create time, etc). I propose the following change to the file format:

---
key1: value1
key2: value2
title: title goes here
---

<content>

This is a (somewhat) standard way of including metadata in a Markdown file that is used by lots of other tools. Both the universal document converter pandoc (search the page for yaml_metadata_block), and the blogging tool Jekyll are good examples. Changing the note format to use this standard YAML front matter format would open up the possibility to use Joplin notes with all sorts of other tools. Compatibility with Pandoc would be especially beneficial, as it would allow exporting Joplin notes to a large number of desirable formats for free.

I could be totally wrong, but it seems like this wouldn't be especially difficult to add. There are good YAML parsing libraries for Javascript, and this would be a richer serialization format for storing note metadata that supports more advanced data structures.

I wouldn't be opposed to adding this feature, if somebody could point me to the correct parts of the codebase. I'm not a Javascript developer, but I've dabbled and would be very receptive to constructive criticism on any pull request I create.

Thanks!

doc75 commented 5 years ago

+1

It would allow to be closer to format used by nanoc and more generic.

innocuo commented 5 years ago

There's been similar suggestions to change the metadata section, and I actually like the idea of using YAML's style, which is popular in other editors. However, @laurent22 has mentioned multiple times that the file format won't change. So I'm going to close this issue, as this suggestion has been answered.

For reference, you can read issues #508 and #264. I'm copying @laurent22's comments below:

Joplin synchronises with file systems using an open format however it doesn't mean the sync files are meant to be user-editable. The format is designed to be performant and reliable, not user friendly (it cannot be both), and that won't be changed. Joplin sync directory is basically just a database.

It's definitely not possible to switch to a different format, whether it's yaml, or xml, or json, etc.