BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.08k stars 1.47k forks source link

Store notes as .md files instead of .cson files #490

Open SMontgomery opened 7 years ago

SMontgomery commented 7 years ago

Issuehunt badges

Would be nice if the files could be viewed by any program that can view markdown. One suggestion is to put your internal data you need as a comment at the top of the file:

<!--
type: "MARKDOWN_NOTE"
folder: "02d0f982bd56ad197fe5"
title: "My Title"
tags: []
isStarred: false
createdAt: "2017-04-23T03:30:44.232Z"
updatedAt: "2017-04-23T03:32:00.174Z"
-->

My Note Content

IssueHunt Summary ### Backers (Total: $60.00) - [boostio boostio](https://issuehunt.io/u/boostio) ($60.00) ### Submitted pull Requests - [#3445 Changing Notes CSON to Markdown](https://issuehunt.io/r/BoostIO/Boostnote/pull/3445) --- #### [Become a backer now!](https://issuehunt.io/r/BoostIO/Boostnote/issues/490) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/BoostIO/Boostnote/issues/490) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/BoostIO/Boostnote/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)
aldomendez commented 7 years ago

Or better yet, at the bottom.

jasondavis commented 7 years ago

the benefit of the top is that there are tons of other apps and librasries that use this format so it would be more standardized

asmsuechan commented 7 years ago

Hi, @SMontgomery. I'm reluctant to implement our own style. Because I assume it costs a lot to maintain. In our future, if Boostnote will become bigger, then let's consider again :smile:

loicteixeira commented 7 years ago

An alternative would be to move all the metadata to the boostnote.json file (it essentially becomes the "library") and only save the actual content in the markdown files. Snippets might need to be saved in something else than md though.

kohei-takata commented 7 years ago

How about put metadata in the form of YAML Front Matter in front of markdown file? YAML Front Matter is being used by jekyll , Middleman , and many of other static site generators. Github can understand YAML Front Matter like this .

jasondavis commented 7 years ago

@loicteixeira I agree with this being the best solution as it is the most common solution across other apps.

Also it means if using the Markdown file outside of Boostnote, then that Metadata is not going to get in the way!

Also JSON is much more popular and easier to use with other libraries as most modern libraries support it already

@kohei-takata you argument that GitHub parses the data when viewed on GitHub, they also parse JSON data in the same manner.

Just my view on the matter

danalexilewis commented 7 years ago

@loicteixeira bang on the money mate.

This is in line with how GitBooks works: a summary.md file defines the contents page - essentially a series of links. This is similar to storing the meta-data of the book/collection of notes.

I suppose the tension is what, if any, meta-data is related to the organisation of notes vs the note itself. ie maybe we still need to have meta-data stored in the head of a note?

Note Gitbook has a second file book.json for enabling plugins/additional functionality associated with that book. eg youtube viewer.

eg. This is the RootSystems (the dev owned company i work with) handbook: https://github.com/enspiral-root-systems/meta

kirtan403 commented 7 years ago

Storing it in markdown will make life of other devs even more simpler. Agree to @agentlewis for the gitbook example.

Storing it in front matter will make if more simpler as @kohei-takata told. There are many parser available for it. All the static site generators based on markdown does this, too.

SMUsamaShah commented 6 years ago

I started using Boostnote recently (its awesome). I looked at the code to implement this feature and just chickened out.

It will be nice to have markdown files actually saved as independently readable files and metadata could be stored in front matter as jekyll (kramdown) supports it.

ebridges commented 6 years ago

Thanks a lot for a terrific product!

There are a couple of approaches that already exist in the Markdown community for storing metadata.

Using an external JSON file to hold metadata is an OK workaround, but I'd suggest storing metadata related to the file in the individual file itself as YAML frontmatter (or MMD), and album and editor-specific metadata in the external JSON file. This would keep the formatted notes independent of the editor, and allow you to edit them in any markdown editor if you need to.

flyisland commented 6 years ago

yes, I'm a fan of typora, which is the best markdown editor in the world, hope I could use it to edit the content in boostnote!

lpld commented 6 years ago

I started using Boostnote recently and was quite surprised with the fact that the actual notes are not stored as real markdown files. I can see several scenarios where this could be needed:

I understand, that Boostnote is not a markdown editor, it is a note-taking app, but it seems to me that the implementation should be as standard as it can be.

And BTW, the app itself is great, the devs did a really good job. Thanks!

pyriand3r commented 6 years ago

I would prefer the idea of using markdown files with yaml front-matter. That would make it really easy to reuse the files. The current storage format as CSON is really suboptimal. It's uncommon and even doesn't have a real specification...

I have a fork of boostnote where i ported the data format to normal json because i'm planning to write a new mobile client in go + qt and couldn't find a CSON-library for go. But markdown files with yaml front-matter would also fit very well in my plans.

I could implement the parser i think, if desired.

Normal notes would be no problem, but the syntax for snippet notes could be tricky. Atm i'm thinking about putting the description in the front matter and all snippet "files" in the markdown content, separated by lines (--- tags). A heading could be used as file name and a code-block tag with language tag for the file content. This way the snippet notes could easily be rendered by any markdown editor, too.

---
type: 'snippet'
title: 'snippet title'
description: 'snippet note description'
tags: [ ]
----

# First file

```javascript

let someJSFunction (arg1, arg2) {
    ...
}
``
---

# Second file

```html
<body>some html here</body>
``
ecvgit commented 5 years ago

Is this issue going to be fixed? I think this will convince a lot of folks who are currently using various markdown based schemes to switch to Boostnote (because of the ease of switching back if needed).

daiyam commented 5 years ago

@ZeroX-DG I would like to add an option to add or not the metadata into the YAML front matter. But where to place that option? Not in the Interface tab, maybe in a new tab Export?

daiyam commented 5 years ago

What about those options? screenshot

Better labels are welcome 😉

daiyam commented 5 years ago

@ecvgit I've just done the PR #2612 to be able to export with the metadata.

gaui commented 5 years ago

Is export sufficient? I don't see that it solves what @lpld mentions. Also see #292

flyisland commented 5 years ago

I really don't think export only is sufficient, what I want is to use an external editor to modify markdown files of the BootIO directly, without export and import again.

ecvgit commented 5 years ago

I don't think an export is sufficient. We want to have the option of using an external editor to edit the Markdown files if needed.

dskopa-softdev commented 5 years ago

Having notes stored in native markdown + frontmatter for meta is definitely a good way! Manual exporting as md doesn't help much for integration with other apps We're loose nothing when switching to frontmattered markdown files for storage: yaml supports any data structures that can be used in cson

gramster commented 5 years ago

I have just switched from BoostNote to Notable for this reason.

https://github.com/notable/notable

I think BoostNote is superior in most respects but this is a huge issue. By having the files be plain markdown and storing them in an iCloud folder on my Mac, I can access them with apps like iaWriter on my iPad and iPhone.

I don't understand why BoostNote team uses .cson when .md is so much more useful.

Notable also uses the note title for the file name and has a sensible folder structure.

ecvgit commented 5 years ago

Thank you for the pointer to notable

gramster commented 5 years ago

It's odd that this has been open for 1.5 years now, it is one of the most upvoted and commented on issues, and yet it has not even been given a "feature request" label yet.

SMontgomery commented 5 years ago

Unfortunately, this was the issue that made me switch to Typora.

danalexilewis commented 5 years ago

@SMontgomery thanks for mentioning typora - it looks rad! I’m downloading it now. Are there any features you wish it had that BoostNote does?

Like you this issue is the make or brake for me so I stopped using BoostNote a while ago and was just following this issue waiting for a solution.

If this were stackoverflow I’d vote for this to be the solution to this issue.

Zeustopher commented 5 years ago

I'd also like to register my interest for this feature / change. I've absolutely LOVED using Boostnote now for over a year. It just feels nice to use, flows well, etc. However, using random-hashed file names makes it "impossible" for me to find I want to make an edit to on a mobile device (since the mobile app was dropped for now) since I've got well over a hundred notes. Having them stored as straight Markdown, with reasonable names as requested in https://github.com/BoostIO/Boostnote/issues/2048, would help me alot.

_(I've found VNote which stores all their notes in a folder structure and as pure Markdown (with an additional meta-data section at the top of the Markdown file). I absolutely love that about VNote. But to be honest, using it is not as nice as using Boostnote. Its UI feels a little dated, though works well.)_

muniter commented 5 years ago

I would like to also state my interest in this feature. The current file format is sadly not what some people are expecting. I was looking for an application that stored the files outside databases for external editing, with vim or any other editor or viewer I desire. In the current state is like it was in a database. I cannot view it with other programs.

wind13 commented 4 years ago

Yes, .md file is better than .cson, any text or markdown editor tool can used on it. And we can view the files with other tools in Mobile.

issuehunt-oss[bot] commented 4 years ago

@boostio has funded $60.00 to this issue.


sudomf commented 4 years ago

Hey guys.

I just submit a PR (#3445) with a propose. Hope that solution can solve this issue. :)

arcturus140 commented 4 years ago

@maykefreitas what happens with existing .cson notes?

sudomf commented 4 years ago

@arcturus140 Good question. I'm not handling conversions in this PR. But it is a thing to discuss about.

arcturus140 commented 4 years ago

Storage locations are versioned: "version": "1.0" but individual notes are not. This means an upgrade must be forced for older storages. This would make it impossible to revert to an older version.

Alternatively, both formats can be used by either extending the current format with a version or handling existing notes by their extension: .cson or .md. Support for the current format can be dropped after a resonable transition time.

c33s commented 3 years ago

really waiting for this feature, not having it was a blocker to use boostnote for me.

MelvinLoos commented 2 years ago

It's being 2 years and it also got funded. What is the current state of this issue?