ozgrozer / ai-renamer

A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents
https://x.com/ozgrozer/status/1812591967756255298
GNU General Public License v3.0
1.41k stars 85 forks source link

Feature: Keep a backup, rollback #8

Open staberas opened 1 month ago

staberas commented 1 month ago

Keep a backup and a rollback feature in case a picture gets renamed by accident.

ozgrozer commented 1 month ago

Yeah maybe a --backup flag might be useful but what type of accident are we talking about?

staberas commented 1 month ago

In a folder that i have a bunch of unsorted memes and various images without clear title, some of my photos do have the creator-person in the picture name is being changed to something descriptive but not helpful. for example -> " julia-lepetit.png to woman-posing-infront-graffiti.png " yes the title is correct but i like to have the name of the person in the pic i used . Thats why some json/txt backup of the changes might be needed . (maybe an append title feature?)

ozgrozer commented 1 month ago

I don't think that's an issue. The script does what it has do. Instead of a backup and rollback, maybe a confirmation message would be more suitable.

staberas commented 1 month ago

Confirmation before it starts, and a log of name changes (as a backup), the log should log folder-filename changes that happened. Example of log/backup file

Folder C:\folderwithfiles
structures.jpg to lor-gradient-applied-to-image.jpg
discernible-text.jpg to ism-and-its-impact-on-society.jpg
feel-free-to-ask.jpg to photo-background.jpg
unique-style-and-interests.jpg to ate-about-the-story-behind-it.jpg
as-per-your-request.jpeg to lock-wall-with-graffiti-on-it.jpeg
Folder C:\folderwithfiles\subfolder
otherimage.jpg to ate-about-the-story-behind-it.jpg
iwanttorename.jpeg to lock-wall-with-graffiti-on-it.jpeg
ozgrozer commented 1 month ago

Let's make this issue open. I'll implement the confirmation feature if it's asked some more.

darrenpierre90 commented 1 month ago

Confirmation before it starts, and a log of name changes (as a backup), the log should log folder-filename changes that happened. Example of log/backup file

Folder C:\folderwithfiles
structures.jpg to lor-gradient-applied-to-image.jpg
discernible-text.jpg to ism-and-its-impact-on-society.jpg
feel-free-to-ask.jpg to photo-background.jpg
unique-style-and-interests.jpg to ate-about-the-story-behind-it.jpg
as-per-your-request.jpeg to lock-wall-with-graffiti-on-it.jpeg
Folder C:\folderwithfiles\subfolder
otherimage.jpg to ate-about-the-story-behind-it.jpg
iwanttorename.jpeg to lock-wall-with-graffiti-on-it.jpeg

I would love a confirmation message before it starts as I'm not quite happy with the results .

XGhozt commented 1 month ago

Or perhaps instead of renaming, we have an option to prepend or append the new description?

chla-conscia commented 2 weeks ago

I'm glad I tried it on some test-files first. I wasnt satisfied with the renaming. so now I dont know if I wanna make the big bulk.

So a --backup flag would be very appreciate