agendafs
A filesystem for your calendar.
git clone git://mccd.space/agendafscommit 00d404cc245fb0a76a51a0a8bf530a86b36ac2e9
parent 9e88f3cbc71e562b1f2f20c96f3f60593d843630
Author: Marc Coquand <marc@coquand.email>
Date: Fri, 27 Jun 2025 12:57:03 +0100
Updates
Diffstat:
2 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
@@ -1,4 +1,4 @@
-# caldavfs
+# caldavfs
`caldavfs` is a FUSE-based filesystem written in C that works with
[vdirsyncer](https://vdirsyncer.pimutils.org/). Use your caldav server as
@@ -13,12 +13,10 @@ $ mount_caldavfs /tmp/local-journal
Now your `.ics` files are available as plain-text files:
-WARNING: Still under construction, expect things to change and break
-
## Motivation
Caldav is great in the sense that it has a lot of support from various
-app. However, the format is not particularly human-friendly. For example, VJOURNAL entries look like this:
+apps. However, the format is not particularly human-friendly. For example, VJOURNAL entries look like this:
```
BEGIN:VJOURNAL
@@ -39,30 +37,41 @@ app. However, the format is not particularly human-friendly. For example, VJOURN
These are not really intended to be edited by users.
-### Planned features
+## Planned features
+
+Status: Works but unstable, probably leaks memory. Still missing features.
- [x] VJOURNAL - Now the first true journaling filesystem!
- [x] Create
- [x] Create remote
- - [ ] Delete locally
+ - [x] Delete locally
- [x] Delete remote
- [x] Read
- - [ ] Rename
+ - [x] Rename
- [x] Write
- - [x] Set creation dates - not mandatory but supresses a few warnings
- - [x] Directory structure, children are VJOURNALs with parent as VJOURNAL
-- [ ] Categories
+ - [x] Set creation dates
+ - [x] Directories
+ - [ ] Symlinks (+ note linking one-to-many)
+ - [ ] Handle duplicate names.
+ - [ ] File extensions
+ - [ ] Directory descriptions in `.description`
+- [ ] Xattributes
+ - [ ] DTSTART - would enable journals
+ - [ ] Categories
+- [ ] Attachments
+- [ ] Proper inodes for caching
- [ ] Parse files on demand instead of keeping everything in memory
-Right now we parse all files and keep in memory. Instead, we should parse them once, compute the file tree from that, and then just parse directories on demand with a cache.
+Right now we parse all files and keep in memory. Instead, we should parse them once, compute the file tree from that, and then only keep a tree with nodes -> original file.
- [ ] Views
-A directory `.views` where representations of the caldavfs is kept.
+A directory `.views` where representations of the caldavfs are kept.
For example:
- TODOs
-- Due todos soon
+- Due soon
+- Upcoming
- Agenda
- DONE items
@@ -71,7 +80,14 @@ For example:
- [ ] VEVENTS
- [ ] Design.
- [ ] VALARM
+ - [ ] Design.
- [ ] VFREEBUSY
+ - [ ] Design.
+
+
+## Limitations
+
+Right now attachments are not supported, I don't quite know what happens if you store a file but the behavior is undefined.
## Dependencies
@@ -133,12 +149,11 @@ curl -X MKCALENDAR \
'https://my-nextcloud-server/remote.php/dav/calendars/me/journal'
```
-
## Tool-specific notes
### lf
-Updates might not be reflected with dircache set to true.
+Updates might not be reflected with dircache set to true. If inodes are used correctly, this should be fixable.
## Why C?
diff --git a/journal_entry.c b/journal_entry.c
@@ -451,8 +451,11 @@ parse_ics_to_journal_entry_component(const char *filename,
// Verify if necessary?
icalcomponent *journal =
icalcomponent_get_first_real_component(component);
- if (journal == NULL) {
- LOG("No journal component");
+
+ // TODO: Support TODOs, EVENTs etc.
+ if (journal == NULL ||
+ icalcomponent_isa(journal) == ICAL_VJOURNAL_COMPONENT) {
+ LOG("Not journal component");
return -2;
}
if (icalcomponent_get_description(component) == NULL) {