Bug 394183 - Allow "/" in customized screenshot directory settings to dive into auto-created monthly subdirectories /%Y/%M/
Summary: Allow "/" in customized screenshot directory settings to dive into auto-creat...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Unclassified
Component: General (show other bugs)
Version: 18.04.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2018-05-13 00:51 UTC by Tom
Modified: 2018-05-28 22:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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