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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminating need for .notemarks? #2

Open
mgielda opened this issue Jan 3, 2021 · 3 comments
Open

Eliminating need for .notemarks? #2

mgielda opened this issue Jan 3, 2021 · 3 comments

Comments

@mgielda
Copy link

mgielda commented Jan 3, 2021

Hi!

First up - awesome piece of software 馃憤

I love the idea of git backed notes, I am doing this myself with a git repository. I could imagine using notemarks but one thing I think would make it so much easier to adopt is the ability to edit the notes directly from your git web UI - whether it's github, gitlab, any other tool, even command line. I think this could actually be made to work, possibly as an option - basically:

  1. you would probably need to eliminate the "created at" concept (since in git it's hard to really track when a given file was created if it was renamed in the meantime, although I may be mistaken... I am sure some clever way exist to track that, and worst case you can just assume if a file is renamed, tough luck; for me "created at" is not really so super-useful BTW)
  2. just use git to figure out when the note was last updated. The repo carries that information, you don't need to store it twice.
  3. keep tags with the note itself, possibly as frontmatter. e.g. GitHub shows frontmatter nicely, so you would have the added benefit of being able to browse the notes and see the tags on GitHub.

I think making the notes more independent from the UI to manage them is always a big win, as it helps in terms of interop, portability etc. of the notes.

What do you think?

@mgielda
Copy link
Author

mgielda commented Jan 3, 2021

OK, I know you keep some other stuff in .notemarks too, but I mean - eliminate the need to mirror the exact repo structure inside the .notemarks directory.

@bluenote10
Copy link
Contributor

Great to hear, thanks!

I thought about that question for a long time, and at some point my reasoning was basically what you're saying. The reasons why I opted for a .notemarks folder in the end were:

  • Using frontmatter doesn't work with arbitrary documents like pdfs etc. It is even a bit of a hack in Markdown, and I had in mind to support other note formats like AsciiDoc where frontmatter would be even more awkward, because iirc they have a different way to represent frontmatter. Also, frontmatter raises the question whether the meta data should be stripped away when editing the notes. Keeping it editable is awkward from a UX perspective, because then labels can be edited in multiple ways. It also prevents to have any internal meta data (I agree that "date created" is not super crucial though). Stripping it away is a bit strange as well because the file content in the online editor is different from the actual file content. Overall I concluded the cleanest and most flexible solution is to separate meta data from files / note contents.
  • The app needs other meta data like e.g. for the bookmark collection. In the long term there may information like "label colors" or a "notemarks ignore file" that need to be stored somewhere. Therefore having a .notemarks folder hides all notemarks related data in one place, much like a .git folder itself.

@mgielda
Copy link
Author

mgielda commented Jan 8, 2021

Thanks for the reply :) Ok, the latter of course could probably be solved with a file with different fields, and I think AsciiDoc actually has frontmatter in a very similar format. PDFs of course can't work like that, but it's a fairly rare type of content I assume which could just have a metadata file in the same folder, like filename.meta file alongside filename.pdf? Of course this is me making it up as I go now, but I just find editing data in one place for the defaul, majority use case so cool! I have stacks of note that I regularly edit via command line or the GitHub interface, when I don't have access to a nicer interface, and being able to do that would I think be pretty cool. Perhaps as an option?

As for editing frontmatter - either works I guess, either keeping the way your original label/metadata editor and stripping the metadata, or allowing the metadata to be edited in raw text and only render them in render mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants