Sync program data through Nextcloud
7system7 opened this issue ยท 5 comments
Firstly, thank you for this great app!
I have 2 machines, a laptop and a desktop. Sometimes I am not at home but it would be good to monitor my "dosages". ๐
I use the AUR version of this program, and it seems, the settings and program data placed in the root of ~/.local/share
dir. Is there any way to put the settings and program data in a specific dir? Like ~/.local/share/dosage
?
I would sync the program data through my Nextcloud, (w/ soft links or mount bind I do not know exactly.) but not file-by-file. Because if another version of this program changes the file names, then later, I have to follow the changes. ๐
The official packages are flatpak and snap.
The folders are ~/.var/app/io.github.diegopvlk.Dosage/data
and ~/snap/dosage-tracker/current/.local/share
.
And it's not configurable.
Why not just use a symbolic link?
I use, but
"the settings and program data placed in the root of ~/.local/share
dir" ... "file-by-file"
The changeable directory is not the primary question of this issue. I do not know exactly how much effort to change it to a specific dir inside the ~/.local/share
. It can be hardened in the code. If it is a lot, then forget the question.
the settings and program data placed in the root of ~/.local/share
That's a AUR issue, not a flatpak/snap. If that's a problem for you, use the official packages.
I won't change in the code, sorry.
The soft links sadly, does not work for a non-flatpak version. The program replaces the json files on each changes...
Today, I had an hour to play with this. And just to clarify: it is NOT an AUR issue. So, if anybody, who wants to sync w/o flatpak and who has a little programming skills: change the DataDir in utils.js:55 or change the location of the files in window.js:80. (The version in this post's date is the 1.6.0)
After this you can build the files by yourself in the GNOME Builder. You welcome. ๐ฅณ
OK, I tried the flatpak version w/ soft-links and w/ mount binding also to my cloud service.
But this application does not sync the changes on runtime. Instead of this, overwrite everything what changed on another machine. :( So, sadly, the cloud sync does completely not work.