30 Commits

Author SHA1 Message Date
73f9db5fab Core: Null Safety++
This is a rather huge change. I hope I haven't broken anything.
2021-05-17 18:15:47 +02:00
df568d8ad5 add "keywords" alias for tags to be compatible with pandoc and zettlr 2021-05-10 11:31:45 +02:00
f61aa06f07 Relicense some files under Apache2
In order to accept a pull request.
2021-05-10 11:09:49 +02:00
d008f0d982 First version of dart migrate
Most of the files haven't been migrated. Lets work on this bit by bit
2021-04-10 22:18:35 +02:00
b7e274c937 Add FileName option in Note title settings
This doesn't do anything right now. It just shows the option.
2021-02-12 15:32:10 +01:00
b72e4719d2 Remove another case of the Settings singleton 2020-09-25 01:05:17 +02:00
ada656c675 Do not write the title as h1 if it is in the yaml header
In general, we try to follow the conventions in the note parsed over
whatever the default config.

Related to #214
2020-08-19 11:31:16 +02:00
8f2bb557da YAML tags: Let it be a string seperated by spaces and have a #
In general we try to follow the same format as specified in the input
note.
2020-08-19 10:41:52 +02:00
9380f3cc06 Allow YAML tags to be a string 2020-08-19 10:12:07 +02:00
9859aa6106 Allow custom metadata to be specifiec for any note
This way we can add 'draft: true' to all new notes.

Fixes #168
2020-08-18 10:47:26 +02:00
9c01b8a931 NoteSerializer: Avoid using Settings.instance 2020-08-09 01:50:52 +02:00
619023660f NoteMetaData: Allow tags key to be configured
Fixes #206
2020-08-06 10:55:41 +02:00
c5deb3e988 Allow the 'created' YAML metadata to be configured
Related to #206
2020-08-03 00:46:41 +02:00
4a97d03bd8 Title Codec: Support empty starting lines in the body 2020-07-29 15:25:17 +02:00
417f0414f2 Setting: Note metadata change subtitle 2020-07-29 15:13:37 +02:00
41447027f2 Allow 'title' saving to be configured
We now allow it be to either saved as the H1 or in the YAML metadata.
I'm not sure what the default should be. Still deciding.

Fixes #112
2020-07-28 17:26:42 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
fb9b69bb46 TagsFolder: Auto add relevant tag to new notes 2020-07-09 18:03:06 +02:00
52fd859990 Note: Make tags a set instead of a list
This way we don't need to check for duplicates
2020-05-12 23:33:57 +02:00
59ab66844f Note: Allow tags to be read and serialized
This is just exposing the tags on the Note class. Not making it
available through any interface.
2020-05-12 22:59:45 +02:00
3e38628102 Add a 'type' to each Note
This way we can load the appropirate editor according to the types
available.
2020-03-19 02:36:59 +01:00
b9c7fed6dc Add emjoi support
Only supported for the body and title of notes.

Fixes #62
2020-02-15 02:06:48 +01:00
ffc7c8f483 Fix flutter analyze 2020-02-14 11:34:33 +01:00
46a38cdedf Rename NoteData -> MdYamlDoc
It more clearly defines what exactly it is.

This is important as its less confusing for when we add support for
other file types.
2020-02-14 08:12:41 +01:00
0da1a0783c analysis: Use curly_braces_in_flow_control_structures
One step closer to using dart:pedantic
2020-01-26 03:01:39 +01:00
7e3cfb9e37 Allow the default yaml modified key to changed
Some people are using GitJournal to edit Hugo websites, this option is
for them as the Hugo front matter uses the 'lastmod' key to indicate
when the post was last modified.
2020-01-05 18:24:46 +01:00
442d9d2b4e Allows Notes to have a different modified yaml key
Possible Options - modified, mod, lastModified, lastMod, lastmodified or
lastmod. When read the the note we will figure out which one is being
used and accordingly write back that value.

This makes it easier to use GitJournal for editing Hugo websites as they
usually use the 'lastmod' field to indicate when the post was last modified.
2020-01-05 18:12:35 +01:00
4a322b6fc4 Note: The title should never be null
Too much of the code assumes that it will never be null. It'll be so
awesome when Dart allows you to enforce that a type is never null.
2020-01-01 19:51:26 +01:00
36d1ae43c3 Split NoteData and its serializer into its own file 2020-01-01 19:50:31 +01:00
14e7f344d1 Add an explicit serializer from Note -> NoteData
This is so that we can start configuring what the yaml metadata keys
should be called, and not have them hardcoded.

This also allows the note.created to be null. Earlier we were always
setting it to some value. That's doesn't seem right.
2020-01-01 19:29:57 +01:00