Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Naming options for "Save image" function #286

Open
1 task done
I2ujbNGakP8KfLKbho0Z opened this issue Oct 29, 2024 · 3 comments
Open
1 task done

Comments

@I2ujbNGakP8KfLKbho0Z
Copy link

Preflight Checklist

  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe your suggested feature

Currently, when using the "Save image" function, the file name gets set as the original file name of the page that gets saved. It'd be nice to be able to override that. One example would be wanting the file name of the saved page to be:
[name of folder the file you are reading is in] - [name of the file you are reading] - [current page of the file]

That'd be good to immediately be able to recognize where a saved image comes from and to prevent duplicate name conflicts in the case the page file names of two pages that are saved are the same.

Additional Information

No response

Sample file

No response

@dajotim937
Copy link

Agreed. Instead of selecting folder when saving single image, it would be better to change save window to "save file" with entering filename.
Also, I think, default filename for image from cbz file should be " - ".

And also it would fix current bug: if file with same name exists in folder, OpenComic doesn't save anything. Which is good, because you never know what it could override without any alert messages, but popup message in OpenComic says that "image saved".

@ollm ollm self-assigned this Nov 8, 2024
@ollm ollm added this to the v1.3.2 milestone Nov 8, 2024
@ollm
Copy link
Owner

ollm commented Nov 8, 2024

I changed the folder selection dialog to the file save dialog 4b01440, with this you can now change the file name, also it is possible to use some vars to get data from the original file, as follows.

Default filename: [parentFolder] - [folder] - [image] - [page]

  • [page] The page number, leading zeros are added if necessary.
  • [pageInt] The page number without leading zeros.
  • [image] Original image name without extension.
  • [folder] The folder name or file name without extension if is a cbz, cbr, etc.
  • [parentFolder] The parent folder name.

You can try it in the following build: https://mega.nz/file/bXRFFQYb#M6MEKO-EY0W5BebAAeTFH4lsgFwBbcRoW4WlJ6sK1I8

@dajotim937
Copy link

Maybe setting filename template from settings, because for now template reset to default for next save and also there is no "replace" warning if you save page with same name. I assume because filename template doesn't collide before actual values at saving. And OpenComic shows that file saved successfuly with the same name from template, but it doesn't save anything, because file with that name already exists.

  1. Save page.
  2. Copy full name of saved page
  3. Delete file
  4. Rename different image to copied name
  5. Save same page again
  6. "Saved successfuly"
  7. Different image with saved page name is exists (as it should, because it shouldn't be replaced without warning).
    Result: No warning, wrong pop-up "saved successfuly".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants