17 Commits

Author SHA1 Message Date
87202dc590 Builders: Output their size
It's just nice to know
2021-12-08 14:45:30 +01:00
81b6ebe2f5 lint: avoid-ignoring-return-values++ 2021-11-17 18:10:59 +01:00
015659d58f Allow a note to be renamed to whatever
Earlier one could never change a note type, and therefore its extension.
Now you can rename a note's filename to whatever and accordingly the
editor will change.

A warning message is shown when changing the file type.

Fixes #474
2021-11-15 12:39:12 +01:00
d786edd920 NotesCache: Move directory creation code to NotesFolderFS 2021-11-07 18:11:04 +01:00
2ca51c70d7 Rename new notes correctly 2021-11-07 16:32:32 +01:00
e1ea7a4953 Fetch the modified + created time from git
Fixes #78

This is probably the largest commit that I have ever made. From now on -
every File always has an mtime and ctime which is fetched from git.
Notes can optionally override that time by providing yaml metadata.

Additionally the 'filePath' and 'folderPath' is now relative to the
repoPath instead of being the full path.

This will slow down GitJournal like crazy as all the mtimes and ctime
still need to be cached. For my test repo it takes about 23 seconds for
GitJournal to become responsive.
2021-10-26 17:49:08 +02:00
e332860ea7 NotesFolderFS: A modified file can not be a Note 2021-10-23 16:47:44 +02:00
f4f68da005 IgnoredFile: Include the underlying error 2021-10-20 10:13:20 +02:00
3fc6be2854 IgnoredFile: Add InvalidEncoding as a Reason
It'll be easier for the user to figure out what is wrong without seeing
the actual exception.
2021-10-20 10:08:01 +02:00
7a56d0f423 Remove Note's default constructor
Instead there is a new type called 'UnopenedFile'. This was part of my
effort to not have everything inside the 'Note' class and to make it a
bit more immutable.

But, wow, this took a very long time. The 'Note' class seems to be very
deeply integrated everywhere.
2021-10-18 13:03:22 +02:00
0d9c4d8250 NotesFolderFS: Make sure all the Notes are not reloaded each time 2021-10-17 22:26:30 +02:00
5f07543db2 Remove Note's doc setter
This makes us one step closer to making the Note class immutable which
will help GitJournal's overall architecture a lot. Plus it makes me one
step closer to having proper web support.
2021-10-17 22:22:33 +02:00
7f9beb0d5c NoteFileTypes: Hook up selector to the settings 2021-10-15 17:33:19 +02:00
79bba7cff4 Add a dummy Setings for Note File Types
The idea is to allow all kind of file types. Not just md, txt and org.
2021-10-15 16:59:21 +02:00
ff46c38599 NotesFolderFS: Operate on 'File' instead of 'Note'
Also simplify the loading logic. This makes it much easier to
understand.

With this, I can now slowly migrate the interface of a NotesFolder to be
based on Files instead of Notes.
2021-10-15 15:38:12 +02:00
caa87134a2 NotesFolderFS: Mark 'fs' package with a prefix
We have our own 'File' class now.
2021-10-15 14:31:30 +02:00
6a915864f2 Move NotesFolder's code to their own folder
The 'core' folder is becoming way too huge.
2021-10-15 12:31:35 +02:00