21 Commits

Author SHA1 Message Date
a33fb88fb0 Fix tests paths 2019-12-09 01:42:01 +01:00
464b7512e9 Move Note and NoteFolder class into a core folder 2019-12-04 14:18:11 +01:00
702da72a51 Note serializer: Add yet another edge case 2019-12-01 16:43:13 +01:00
41526868ff Note Serialization: Handle more edge cases
Apparently parsing a YAML Header + body isn't as trivial as I expected.
2019-12-01 16:30:40 +01:00
3cf951f8dd Improved note parsing
We now handle markdown files without any YAML Headers, and different
variations of the yaml header.

This should also fix a crash.
2019-11-01 23:00:54 +01:00
f694536469 YAML: Serialize nodes properly
This fixes the error where a YamlList is not of type string.
2019-10-19 12:53:28 +01:00
69003cf0ac Rename package from journal -> gitjournal
It's about time.
2019-10-07 19:30:50 +02:00
475251df61 Preserve the YAML sorting order
Also refactor this a bit so Note contains a NoteData. I'm really not
convinced about today's abstractions, and feel I might have made this
entire thing much much worse.
2019-09-26 18:52:01 +02:00
ef2ad7466f Port Serializers to handle NoteData
This completely breaks the app, as it is part of a large refactor to
make Note loading asyncrhnous and not block. Additionally this removed
JSON serialization for Notes as that isn't something we care about any
more.
2019-09-26 15:51:16 +02:00
0dc75c4ff4 Serializers: Ignore empty yaml metadata
No point giving out a horrible stack trace in this case. This is clearly
not worth an "exception".
2019-05-29 11:03:58 +02:00
f7aeb3527d Handle invalid markdown
In these cases we just try to fetch the body the best we can and ignore
all the keys.

This should give us more info about #4
2019-05-27 10:10:17 +02:00
8345f1424e Note: Rename 'fileName' to 'filePath'
A note can reside in a subfolder, so lets just use the path as an
identifier instead of using just the fileName.
2019-02-14 12:07:23 +01:00
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
215197ca25 YAML Serializer: Add a test which currently fails
It would be nice to preserve the order of the YAML metadata, but the
YAML package does not currently support that.
2019-01-18 18:06:19 +01:00
c99fe854a1 Note: Replace 'id' with 'fileName'
It all just makes far more since when each Note has a fileName.

Though we don't save the fileName in the YAML header. It seems quite
redundant to do that.

Another advantage of this is that if we can read any file ending with a
'.md' in a git repo. It doesn't need to be named exactly how we want it,
and we will still save the details correctly.
2019-01-18 16:12:03 +01:00
f7e2253f55 Fix serializer tests
* Map equality does not exist in Dart - how sucky!
* We no longer care about the micro-seconds
2019-01-18 15:37:19 +01:00
917a0a38fc Fix flutter tests
It seems like we need to explicitly mention the test package in the
dev dependencies. This is strange, since the documentation does not
reflect that.
2019-01-07 11:04:32 +01:00
4c59471da1 tests: Update variable name
Easier to read
2018-09-08 21:45:40 +02:00
104d54efc3 Fix tests 2018-06-03 20:19:20 +02:00
eb2c9eb33f Note: Rename 'createdAt' to 'created'
My notes already use the key 'created', and I don't want to have to
change that.
2018-06-01 19:04:48 +02:00
fdf8c06c24 Add Note serializers
This way we don't only need to use json.
2018-06-01 18:57:53 +02:00