Opened 8 years ago
Last modified 3 years ago
#3928 assigned enhancement
[PATCH] Change screenshot naming schematic
Reported by: | AlThePhoenix | Owned by: | Vladislav Belov |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Work In Progress |
Component: | Core engine | Keywords: | patch, rfc, simple |
Cc: | Patch: |
Description
Currently, when creating a screenshot, the name given to the screenshot is dependent on what the screenshots folder contains. E.g. if there is no screenshot0001.png, it will be created. If there are 256 screenshots, it will name the next screenshot screenshot0257 and so on.
This can give people a headache should they clean the screenshots folder from time to time and upload them like I do. It is quite a hassle to rename 50+ screenshots in order to not have duplicates (Windows 7: screenshot0001 (2)).
My proposal would be something like screenshot_0ad_(MODNAME_)YEAR-MONTH-DATE_HOUR-MINUTE-SECOND_OptionalNr. If necessary, OptionalNr can be used to differentiate if 2 or more screenshots should be written at the exact same time, but that case should be rather unlikely. Screenshot might as well be shortened by sshot for a shorter filename. It would be nice to have 0AD part of the filename if a bunch of different screenshots (desktop or other games) are put in the same folder. It just saves renaming hassle. MODNAME might be more tricky to realize since you can load more than one mod at once, but maybe an option can be added to select which mod's name should be put in screenshots in the options menu (should be grayed out if only public is loaded).
Attachments (1)
Change History (15)
comment:1 by , 8 years ago
Keywords: | simple added |
---|
by , 8 years ago
Attachment: | 3928_screenshots.patch added |
---|
comment:2 by , 8 years ago
Keywords: | rfc added |
---|---|
Milestone: | Backlog → Alpha 22 |
Owner: | set to |
Summary: | Change screenshot naming schematic → [PATCH] Change screenshot naming schematic |
comment:3 by , 8 years ago
Status: | new → assigned |
---|
comment:5 by , 7 years ago
Keywords: | patch added |
---|
comment:7 by , 7 years ago
comment:8 by , 7 years ago
You could split them in folder then. Wpuld make more sense actually since puvlic is a mod.
follow-up: 10 comment:9 by , 7 years ago
Preamble:
createDateIndexSubdirectory
does something similar logicwise, but returns an OsPath
not a VfsPath
and is being used for replays and simstate-dumping on OOS and serializationtest. For the latter it is actually possible that two instances want to write to the same filename simultaenously, hence the retries. (This could hypothetically also happen with screenshots when running two instances were to take a screenshot when a player was defeated for example, but not essentially relevant now).
Actual suggestions:
- IMO we don't need the
screenshot_
prefix if the files are located in ascreenshots
directory. - The creation of a subdirectory for each day might be useful because screenshots accumulate and having hundreds of files in one directory makes the filesystem slow, especially if the filebrowser generates thumbnails. (so we'd end up with
screenshots/2017-01-08/2017-01-08_08-12-24.png
)
comment:10 by , 7 years ago
Replying to elexis:
IMO we don't need the
screenshot_
prefix if the files are located in ascreenshots
directory.
Agree.
The creation of a subdirectory for each day might be useful because screenshots accumulate and having hundreds of files in one directory makes the filesystem slow, especially if the filebrowser generates thumbnails. (so we'd end up with
screenshots/2017-01-08/2017-01-08_08-12-24.png
)
Maybe then move a date to a path: screenshots/2017/01/08/2017-01-08_08-12-24.png
or screenshots/2017/01/2017-01-08_08-12-24.png
?
comment:11 by , 7 years ago
leper suggested that too w.r.t. #3255, but it's too many subdirectories for my taste (especially high likelihood of directories with only one or few siblings in it)
comment:12 by , 5 years ago
Component: | UI & Simulation → Core engine |
---|
Move tickets to their correct component.
comment:13 by , 3 years ago
Keywords: | simple removed |
---|---|
severity: | → simple |
comment:14 by , 3 years ago
Keywords: | simple added |
---|
Adds a date part to the screenshot path