mastodon-sc/mastodon

utility dialog to fix-or-re-route path to data .xml file inside project.xml

Closed this issue · 4 comments

When moving .mastodon file among computers and platforms, sometimes a need arises to fixup the path to a dataset.xml file, which is referenced inside project.xml. Favourite issues are re-saving on Windows were "forwardness" of slashes gets switched and stops being function on *nix systems; or creating/saving mastodon project with absolute paths.

Mastodon is nicely using a convenient container file .mastodon that hides the project.xml inside of it making it difficult for normal users to reach the project.xml and fix the path inside it. The plugin was created to help with it... which, however, lives currently inside tomancak-lab suite of plugins.

Here I propose to bring this plugin into the core Mastodon package.

the closest I got so far is with this commit that

  • is more interactive
  • can show what the path would be when switching between absolute and relative
  • is patching around the fact that the .mastodon container files act as a directory on its own (and extra ..\ needs to be used)
  • has problem when storing relative path... somehere CWD gets injected into the path :(

alternates the content:

Screenshot_20220719_030740

Screenshot_20220719_030735

and it automagically (using Java Path class) extends and shortens the path

Screenshot_20220719_031400

What is given here gets, very likely, modified here by introducing CWD into the path...

I think it is essentially solved in mastodon-sc/mastodon-tomancak#9 (referred to as there)

and since that moves the discussion from teoretical one (here) to a particular implementation (there), I'm closing it here and encourage to continue there