Minder icon indicating copy to clipboard operation
Minder copied to clipboard

Where are the images stored?

Open rscircus opened this issue 4 years ago • 11 comments

Had to restore my machine recently and wondered where all the images in my mindmaps are?

Some mindmaps were days of work. And it seems minder doesn't store the images in the maps...

rscircus avatar Feb 08 '21 11:02 rscircus

Minder stores images in a local directory ~/.local/share/minder/images. Minder does support a portable mindmap in which images are stored along with the .minder file in an .pminder archive, but this is only saved when this type is exported as a Portable Minder type.

phase1geo avatar Feb 08 '21 14:02 phase1geo

Oh shit. That's a bug.

Lets change that. Flatpak tends to hit a wall from time to time and there exist recommendations to flush this folder (together with .var) to solve it.

In my case all the data is lost. My last dotfile-backup is from way ahead of installing minder.

Never suspected this would affect my data in any way.

On Mon, Feb 8, 2021, at 15:10, Trevor Williams wrote:

Minder stores images in a local directory ~/.local/share/minder/images. Minder does support a portable mindmap in which images are stored along with the .minder file in an .pminder archive, but this is only saved when this type is exported as a Portable Minder type.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phase1geo/Minder/issues/290#issuecomment-775176303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI46CT3QCADW6IYQZKHO2TS57WF5ANCNFSM4XI2J4UA.

rscircus avatar Feb 08 '21 17:02 rscircus

Minder auto-saves all content changes in the mind-map to disk whether a mind map has been saved to a specific filename or not. The .minder file is just an XML file currently storing text, formatting, state and layout information. Saving images to an XML file, though possible via base64, is not a recommended thing to do because large images can cause errors and saving all of that information when changes occur would cause I/O issues. As a result, the image files are stored in USER_DATA space which, on Linux systems, is typically under .local/share/.

For users that want to copy mindmaps over to other computers, the Portable Minder export option was added. This basically creates an archived package containing the mindmap XML file and the related image files in a zipped archive format. Copying this file to the new system and opening from Minder will cause all of the images in the Portable Minder archive to be copied to the user's .local/share/minder/images directory and the mind-map can be edited as normal on that system. Since exporting is not something that happens automatically, it seemed like a decent trade-off.

To implement the Portable Minder format as part of normal saving is going to take a bit of effort to accomplish, so it won't be going into the upcoming 1.12.0 stable release. That sort of change will require quite a bit of rework and testing before it would be ready for people to use. Plus, I will need to convert old .minder files over to the new format.

There's also another problem you are going to run into if you are wholly deleting the .local folder. If the user creates a mindmap without saving it to a specific file, those unnamed mindmaps are stored in the .local/share/minder directory. So deleting the entire directory will have the side effect of deleting any of those mindmaps as well. Which is not a good thing.

Are you deleting .local/share/minder/* because of the Minder Flatpak? Or is this directory being deleted for other Flatpak issues? If it's a Minder Flatpak issue, I don't think that deleting the entire directory would be a good idea nor necessary to resolve other issues.

phase1geo avatar Feb 09 '21 02:02 phase1geo

There is a difference between "caching" and "crash-recovery" and "storing data".

I assume you do not expect that essential parts of data (not duplicate or cached) you save, say in a Word or a LibreOffice document or a simple image you save with gimp are hidden (!) -- yepp this is what dotfiles are -- from you, the user.

This is what is happening here.

rscircus avatar Feb 09 '21 18:02 rscircus

> flatpak run com.github.phase1geo.minder
Gtk-Message: 19:25:12.463: Failed to load module "appmenu-gtk-module"

Something is seriously wrong here. Maybe flatpak ain't that awesome, as I thought it was... alright, let's ditch all of this.

rscircus avatar Feb 09 '21 18:02 rscircus

I have a new .minder file format targeted for 2.0 that will allow for storage of mindmap assets. This is basically working at this point in the devel branch, but more testing may be needed.

phase1geo avatar Feb 17 '21 15:02 phase1geo

The new file format is not backward compatible however, older .minder versions will be automatically upgraded.

phase1geo avatar Feb 17 '21 15:02 phase1geo

Hey @phase1geo - sorry for losing patience here a bit. This situation set me back quite a bit in exam prep in this semester, so I switched tools to not let it happen again. I'll be watching the branches and if you need a review or sth. let me know. I'll help.

rscircus avatar Mar 02 '21 08:03 rscircus

Having said that and thought a bit more, you might have a set of recommendable resources to get started with GNOME development with Vala? Mostly been moving close to systems level or completely at the (web) frontend until now.

rscircus avatar Mar 02 '21 09:03 rscircus

I understand the frustration. No need to apologize.

phase1geo avatar Mar 02 '21 14:03 phase1geo

Having said that and thought a bit more, you might have a set of recommendable resources to get started with GNOME development with Vala? Mostly been moving close to systems level or completely at the (web) frontend until now.

Start with valadoc.org. You'll find reference documentation, tutorials, examples, overviews and more.

phase1geo avatar Mar 02 '21 14:03 phase1geo