29 Commits

Author SHA1 Message Date
b4302fe467 feat: Add support for YYYY-MM-DD in the YAML frontmatter
Fixes #972

This required regenerating the protobufs generated files, which seem to
have tons of extra changes, and needed some manual changes to get them
to compile.

Overall, the entire protobuf idea wasn't the best in retrospect, and in
the next version of GitJournal, I'll be going with a simple relational
database instead.
2024-08-24 23:05:09 +02:00
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
ca98da4029 Update deps and fix linting issues 2023-01-20 16:14:08 +01:00
9425f11685 Map a lot of the settings translation strings to enums
This is a lot of boilerplate, but overall its less than what was there
previously. And if I didn't care about preserving the settings, I could
simplify it a lot more.
2022-11-27 18:55:39 +01:00
63e05c3212 Add Unix timestamp magnitude option
This allows switching the precision of Unix timestamps in YAML
frontmatter between second (the current beahaviour) and millisecond
(compatible with Dendron) precision.
2022-07-21 13:51:55 +02:00
dbb86cba99 Add created and modified date format options
Two values:

- Unix Timestamp is a numeric timestamp value, currently always
  expressed in seconds.
- ISO 8601 follows the ISO 8601 format.
2022-07-21 13:51:55 +02:00
94e89f3057 Rename { => NoteSerialization }DateFormat 2022-07-21 13:51:55 +02:00
b177c10755 Add an automated test for creating a new note with extra metadata
It works. Weird.

Related to #634
2022-06-10 11:36:43 +02:00
92e73c414d Move core Note classes into a separate file
I'm trying to get ride of this huge 'Note' class, and have it be quite
dumb. The idea is that we'll have separate Note subclasses - TxtNote,
MdNote, etc
2022-04-24 13:09:14 +02:00
999ab13b79 Fix changes detection #615 (#618)
What changed?

Notes' properties are now compared using Map interface
and not IMap. IMap is incorrectly handled by DeepCollectionEquality,
which causes equal lists (for example of tags) to be marked as unequal.
2022-03-24 20:50:32 +01:00
39f0ce5d1b Fix avoid-ignoring-return-values 2022-03-18 16:46:15 +01:00
5d48229736 use IMap instead of ListMap 2022-02-02 01:51:02 +04:00
0a085e78e7 MdYamlDoc: Make it immutable 2022-01-27 15:17:56 +01:00
afd7690611 Use fast_immutable_collections instead of Kt
It's much more intuitive to use, and is way more performant.
2022-01-27 12:13:34 +01:00
3841cdcab9 Note.tags: Use an compile time immutable set 2022-01-27 11:52:43 +01:00
a6a6e4b85c Avoid duplication of yaml key types 2022-01-22 10:45:16 +01:00
4b9b40045c Allow the 'editor type' yaml key to be configured
The keyword 'type' intefers with Foam.

Fixes #567
2022-01-22 10:40:10 +01:00
901e4b5cb9 Avoid importing dart_git's Result class
It's easier to see where all dart_git is used this way, and this result
class should be refactored into its own package anyway.
2022-01-22 10:11:45 +01:00
f17542bf89 Mark Note as immutable 2022-01-18 23:34:58 +01:00
e6a24f8897 Fix note renaming to change editor type 2022-01-14 17:34:19 +01:00
0c8ec7dbbb Ensure title is null 2022-01-14 16:55:11 +01:00
0488714e89 Refactor note file naming logic
I want to make the note class immutable, and the file path naming logic
is the toughest part.
2022-01-14 12:55:27 +01:00
7bb7fb94f2 note.title: Let it be null
This is a remanent from the time when non-nulllable didn't exist in
Dart.
2022-01-14 10:26:03 +01:00
afe6d9829a MdYamlDoc Proto Serialization: Improve it
Fixes APP-1QG
2021-12-29 12:55:49 +01:00
7737155627 Note Proto: Handle null values 2021-12-28 18:00:34 +01:00
ff1dc06403 MdYamlDoc: Serialize lists and maps 2021-12-22 21:03:41 +01:00
f7fbb9b887 Improve exception 2021-12-20 09:30:33 +01:00
567835b9c5 make fmt 2021-12-14 16:28:08 +01:00
4b658e3580 Move markdown handling to its own folder 2021-12-14 14:12:12 +01:00