mindforger icon indicating copy to clipboard operation
mindforger copied to clipboard

[Feature/Enhancement] Generate Shorter Image Names

Open stexyz opened this issue 4 years ago • 3 comments

When pasting images don't append :

When having multiple images pasted the filenames get really long:

![image](Tasks.__________image.png)
![image](Tasks.___________image.png)

Additionally, when pasting the image for several times (trying to create a better shot etc.) and deleting the image references the files are kept. So typically I try couple of takes and end up with image name ______image and 5 image files in my repo that are not referenced. ...

Possible solution:

  1. Naming - append numbers not underscores.
  2. When saving changes check for files not referenced and remove them. Perhaps also fix the naming to always keep a full sequence of numbers.

stexyz avatar Dec 28 '21 20:12 stexyz

I agree with the above. There are some further thoughts here: https://github.com/dvorka/mindforger/issues/1303 I have a script used to modify the image naming convention than I run every month or so depending on how many images I've pasted. This is used when the 190 underscore limit is reached.

Iznik285 avatar Dec 29 '21 14:12 Iznik285

An additional thought - consider including the note name into the image name to increase readability - currently it only uses the notebook name.

stexyz avatar Jan 04 '22 21:01 stexyz

Fix hints - use <O name>.<N name>.<image name>_<number>.png:

  • use existing method which instead of duplication of _ adds number to make it unique
  • include N name (possibly configurable)

However, extra _ might be cause by filesystem adversarial characters which are escaped this way.

dvorka avatar Jan 08 '22 18:01 dvorka