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

Suggestion: Use date instead of numbers and letters as scrap filenames #1172

Open
aadcg opened this issue Jan 12, 2022 · 4 comments · May be fixed by #1184
Open

Suggestion: Use date instead of numbers and letters as scrap filenames #1172

aadcg opened this issue Jan 12, 2022 · 4 comments · May be fixed by #1184
Labels
cat.Data Issue relates to data (files, preferences, etc) type.Enhancement Issue requests feature.
Milestone

Comments

@aadcg
Copy link

aadcg commented Jan 12, 2022

When saving scraps, I find it more sensible that the filename will have a date instead of random numbers and letters.

What do you think?

@ChengduLittleA
Copy link

I second that! I do sketches and drawings on MyPaint... and I name my finished drawings just with date. So if the scrap file is like that I don't need to manually save all things, just save a scrap and you can go back whenever you want and then it can also be a finished drawing as well.

@0ion9
Copy link
Contributor

0ion9 commented Jan 14, 2022

the numbers and letter are simply a single serial number (think of the letter as being a number 0-25), you can see this in the implementation, line 1293 of gui/filehandling.py. Personally I like to use the date, so I patched my mypaint to preprocess the prefix with time.strftime before passing it to save_autoincrement_file. But it's not safe to use only the date, consider what happens if you want to save two scraps on same day - the second one overwrites the first. Date and time has the same problem, too, it's just much less likely to want to save in the same minute than the same day.

The modification I mention avoids this and you end up with the date followed by the 'numbers then a letter' which you were already getting.
The other issue is making sure it sorts easily in the file browser. If you want that then the date must be in the order [Year, Month, Day]. The 'numbers and a letter' already sort correctly with standard alphanumeric file browser name sort.

Personally I doubt there is a solution that everyone will be happy with. strftime is okay with me because I already know the format codes. Maybe people will be ok with having the date included by default. I suspect they will want the date order they are familiar with. If that's the case then we would need to use something which is at least similar to strftime to allow the customization of format.
It can't just be taken from the locale info for various reasons (internal or personal standards may not match country standards).

@aadcg
Copy link
Author

aadcg commented Feb 11, 2022 via email

@teleportingtortoise teleportingtortoise linked a pull request Jun 5, 2022 that will close this issue
@teleportingtortoise
Copy link

This is what I came up with:

image

The automatic setting will output something like scrap_01-12-2022_001_a.ora and the default is the same as before but can interpret time.strftime directives now.

@AesaraB AesaraB added type.Enhancement Issue requests feature. cat.Misc Refine into further categories at a later date labels Jan 17, 2024
@AesaraB AesaraB modified the milestones: Graveyard: Overhauls, v2.02 Jan 17, 2024
@AesaraB AesaraB added cat.Data Issue relates to data (files, preferences, etc) and removed cat.Misc Refine into further categories at a later date labels Jan 17, 2024
@AesaraB AesaraB linked a pull request Jan 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat.Data Issue relates to data (files, preferences, etc) type.Enhancement Issue requests feature.
Development

Successfully merging a pull request may close this issue.

5 participants