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)

3928_screenshots.patch (964 bytes ) - added by Vladislav Belov 7 years ago.
Adds a date part to the screenshot path

Download all attachments as: .zip

Change History (15)

comment:1 by Imarok, 8 years ago

Keywords: simple added

by Vladislav Belov, 7 years ago

Attachment: 3928_screenshots.patch added

Adds a date part to the screenshot path

comment:2 by Vladislav Belov, 7 years ago

Keywords: rfc added
Milestone: BacklogAlpha 22
Owner: set to Vladislav Belov
Summary: Change screenshot naming schematic[PATCH] Change screenshot naming schematic

comment:3 by Vladislav Belov, 7 years ago

Status: newassigned

comment:4 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

Moving to the new WIP milestone.

comment:5 by Vladislav Belov, 7 years ago

Keywords: patch added

comment:6 by Imarok, 7 years ago

what about adding the used mods too?

in reply to:  6 comment:7 by Vladislav Belov, 7 years ago

Replying to Imarok:

what about adding the used mods too?

Won't names too long?

comment:8 by Stan, 7 years ago

You could split them in folder then. Would make more sense actually since public is a mod.

Last edited 7 years ago by Stan (previous) (diff)

comment:9 by elexis, 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 a screenshots 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)

in reply to:  9 comment:10 by Vladislav Belov, 7 years ago

Replying to elexis:

IMO we don't need the screenshot_ prefix if the files are located in a screenshots 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 elexis, 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 Imarok, 5 years ago

Component: UI & SimulationCore engine

Move tickets to their correct component.

comment:13 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:14 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.