Apps by ichthyosaurus

About syncing the Todo list, what do you think about such possibility:

  • stores the todos in a DB handled by mKCal (you can create such DB yourself using mKCal::SqliteStorage() API, where the second argument is a file path that can point to a place handled by your application and not the default restricted system DB).
  • modify a bit Buteo CalDAV sync plugin to be able to call it from your application providing where the Todo DB is (by default, the plugin is looking to sync calendars from the system DB).

Would you approve such changes to your application ? I didn’t look at your code yet, so I’ve no idea how many code changes the DB switch would mean. If you think it’s a viable path, I could provide PRs after working on it, or help you doing so if you prefer to do it yourself.

6 Likes

I think this is a great suggestion for improving an already impressive app!

Well, currently the database is handled completely in JS using QML’s LocalStorage API. Switching the database to C++ would mean rewriting everything from scratch.

Also, the entries are not so much stored as events bound to specific dates. I don’t know how a calendar-centric database could handle the two special cases “this week” and “sometime in the future” - how could that be synchronised? The app uses “magic” dates for these cases at the moment (→ code).

To be honest: I don’t :S. On the other hand, I want to put in some big changes anyway, so it will end with a complete rewrite in any case. But to me it seems completely overkill and way too much work for very little benefit.

That is, unless mKCal can give me a hand with “recurring” entries, i.e. entries that should be repeated every Xth of the month, every X days/weeks, every Xth weekday, etc. That’s something that would be tedious to implement with the current database.

Anyway, thank you very much for offering to help! I’d recommend that you take a look at the code (→ db, → rest) and decide yourself whether its doable without too much effort. You already know mKCal so it’s easier for you to gauge, I guess.

1 Like

Thank you @ichthyosaurus for your detailed answer. I agree that moving to an mKCal storage would mean major changes to your code. But that looks like an interesting exercise (for me, I would say). Especially since your code is very well written. I’ll try to swap the Storage JS backend you have with a C++ mKCal one keeping more or less the same API. It will help me also to see if mKCal API is well suited for the job.

Actually, it’s not mKCal that will help you for this, since mKCal is just a disk serialisation for events / todos… Events or todos are themselves handled by KCalendarCore from KDE frameworks. This library is taking care of the recurrences for instance. And when you look at the code expanding recurrences with exceptions, rules… I’m happy I don’t have to deal with it myself thanks to KCalendarCore::OccurrenceIterator!

2 Likes

I was thinking the same thing as @dcaliste while examining the Tasks | OpenRepos.net — Community Repository System app. That currently has issues with syncing and is designed primarily with nextcloud in mind, but is caldav based. I already use cli clients for calendars and tasks (khal), but recently started using: nextcloud-tasks-api · PyPI all of which has been done in javascript, too, but this might be a simple to add library via python which doesn’t incur the build overhead?

1 Like

Forgot: this is more terse and also does the job, but I prefer the first one: wrapper nextcloud-tasks/nextcloudtasks.py at main · Sinkmanu/nextcloud-tasks · GitHub

This latter is a single file, so less hassle. EDIT: well, it has two deps: caldav and prettytable

Awesome, then I’m excited to see what you come up with :).

Thank you :blush: Let’s hope you don’t find the less-well-written parts soon ;).

Oh nice, thank you for the pointers! I’ll see if and how I can make use of that. I presume SFOS already uses these and they shouldn’t make problems with Harbour? I’ll check the docs once I’m less in a hurry…

Nice, thank you! I’ll see if that can be packaged easily because Python packaging for SFOS is still kind of like dark magic to me. I managed to avoid it until now :).

I’m doing a bunch of python stuff right now (fibonacci updates, Solver calculus app) and I have two approaches:

  1. on chum, with the help of @nephros, I released some libaries (sympy mpmath) which can be included on that dist. channel.
  2. For harbour I just package them as follows:

a) unpack the tar.gz files of the release in ${project}/${lib}
b) append libs.path = /usr/share/$${TARGET} && libs.files = lib in .pro
c) INSTALLS += libs
d) In .spec installs post section

cd %{buildroot}%{_datadir}/%{name}/lib/sympy-1.9
python3 setup.py install --root=%{buildroot} --prefix=%{_datadir}/%{name}/
rm -rf  %{buildroot}%{_datadir}/%{name}/lib/sympy-1.9

This is a damn slow way of building things, BUT, it get’s you into harbour and does at least mean you know EXACTLY what you get from a library, because, obviously, you’ve read every line of exactly that version :slight_smile:

I hope I have some time next week to dedicate to your app. hope, hope. And, as @dcaliste suggested, from all the time I admire your swiss meteo app, you write nice code which I should emulate more :slight_smile:

1 Like

Forgot: the .spec which includes application libraries may need a << marcros section

%define __provides_exclude_from ^%{_datadir}/%{name}/lib/.*\\.so\\>
%define __requires_exclude_from ^%{_datadir}/%{name}/lib/.*\\.so\\>

Some create so files. but not often.

1 Like

@ichthyosaurus I recognized, that I use more and more of your apps(at last I discovered your Configurable keyboard height patch).
I just wanted to say thank you. Is there a possibility to donate you some beers or coffee?

2 Likes

I think his donations page is visible here:

1 Like

Interesting; that looks manageable for packages that don’t have many dependencies. I’ll have to try this…

Which can also be added to the yaml file instead of the spec, by the way. IIRC there was a bug in the SDK that removed custom sections from the spec file every time it was updated from the yaml file. (I for one actually use the yaml files :).)

Aw, thank you :blush:

1 Like

Thanks a lot! It’s always nice to hear from people who use the things I build! As @poetaster just said, I have a Liberapay profile. I’m also working on putting the link on the “About” page in my apps; most of them have it already.

(There’s no Paypal option anymore because they decided to permaban me, without giving any reason and keeping my money…)

liberapay is fine for me. Will have a look for it in the evening.

2 Likes

Sweet, it’s much appreciated! :slight_smile:

Hi @ichthyosaurus ,
Using Todo since a week ot two, very useful.
I’t s going to replace all these papers laying around.
Ultimate feature:If it could autosync with them :blush:
In the meantime, a comment if I dare: I’d just say it misses a way to set priority fot each task.
Bit still, I use it everyday! Thanks

1 Like

Thanks, glad you like my little app! :slight_smile:

I actually consciously decided against that to prevent myself from micromanaging too much. I’m thinking about a way to implement custom sorting, though. That could then be used to set basic priorities.

My goal is to keep the whole app really simple to let the user (i.e. me :wink: ) focus on getting things done instead of losing myself in planning. The feature I miss most is an option to add multiple entries at once, so that will be the first thing I’ll focus on if/when/once I get to it.

Syncing is nice but I’m not using it currently and it seems quite complicated, so it’ll probably have to wait until I manage to release a year’s worth of piled-up changes in File Browser, and until I did some work on Whisperfish (that’s my next focus…).

1 Like

Damn, sorry, I missed translating humor! I wanted to joke about auto-syncing with all the todo papers laying around in my home :slight_smile:
Otherwise, no sync needs on my side.

:sweat_smile: You are right, it recalls me something on my side too!

2 Likes

Mee too, very handy app!! Thank you very much @ichthyosaurus !

2 Likes