Bug 394183

Summary: Allow "/" in customized screenshot directory settings to dive into auto-created monthly subdirectories /%Y/%M/
Product: [Applications] Spectacle Reporter: Tom <mail>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: nate, null
Priority: NOR Keywords: junior-jobs
Version: 18.04.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tom 2018-05-13 00:51:56 UTC
I wanted to store screenshots in monthly subdirectories /year/monthly (like this is realized in Nextcloud's mechanism for storing in monthly InstantUpload folders).


Currently, the "/" symbol has no special meaning in the list of placeholders and is apparently sanitized (replaced) by a "_" when actually writing a screenshot.

Summary:
I suggest to improve screenshot store function to allow customized filenames in customized subdirectories, 

Example:

A placeholder string %Y/%M/%Y%M%D-%H%m%S_%T.png

would result in something like

/home/user/pictures/screenshots/2018/05/201805-024430.png
Comment 1 null 2018-05-13 08:00:53 UTC
Nice idea, makes sense to me.

To make this discoverable, I guess it's enough to add a help text to the config dialog similar to what's done for the other placeholders.

However, note that some sanitizing still needs to happen, e.g. for window titles containing "/". Only "/" explicitly added in the config dialog should result in the creation of a directory.
Comment 2 null 2018-05-21 21:06:40 UTC
Patch available in https://phabricator.kde.org/D12993.
Comment 3 null 2018-05-28 22:43:01 UTC
Git commit 0dcd790a03b0a25babbd2a36f59ea809caf207ac by Henrik Fehlauer.
Committed on 28/05/2018 at 22:42.
Pushed by rkflx into branch 'master'.

Allow saving screenshots in custom auto-generated subdirectories

Summary:
This patch allow the use of "/" in the filename field of the config dialog to save screenshots in auto-generated subdirectories inside the default save directory.

Test Plan: Tested for local and remote (Google Drive) save locations.

Reviewers: #spectacle, rkflx

Reviewed By: #spectacle, rkflx

Subscribers: ngraham, rkflx, #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D12993

M  +45   -3    src/ExportManager.cpp
M  +6    -0    src/Gui/SettingsDialog/SaveOptionsPage.cpp

https://commits.kde.org/spectacle/0dcd790a03b0a25babbd2a36f59ea809caf207ac
Comment 4 null 2018-05-28 22:47:12 UTC
Git commit 1612995b54038225e345064754e6ede2e589fd9f by Henrik Fehlauer, on behalf of Marco Scarpetta.
Committed on 28/05/2018 at 22:46.
Pushed by rkflx into branch 'master'.

Allow saving screenshots in custom auto-generated subdirectories

Summary:
This patch allow the use of "/" in the filename field of the config dialog to save screenshots in auto-generated subdirectories inside the default save directory.

Test Plan: Tested for local and remote (Google Drive) save locations.

Reviewers: #spectacle, rkflx

Reviewed By: #spectacle, rkflx

Subscribers: ngraham, rkflx, #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D12993

M  +45   -3    src/ExportManager.cpp
M  +6    -0    src/Gui/SettingsDialog/SaveOptionsPage.cpp

https://commits.kde.org/spectacle/1612995b54038225e345064754e6ede2e589fd9f