Bug 285521 - Search by time of day [patch]
Summary: Search by time of day [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Dates (show other bugs)
Version: 2.2.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 23:29 UTC by Andreas Ferber
Modified: 2017-08-18 09:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Attachments
datetimesearch.patch (4.66 KB, patch)
2015-06-20 18:46 UTC, Maik Qualmann
Details
datetimesearch.png (107.28 KB, image/png)
2015-06-20 18:47 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Ferber 2011-11-01 23:29:30 UTC
Version:           2.2.0 (using KDE 4.4.3) 
OS:                Linux

digiKam should provide a way to search pictures by the time of day the picture was taken, for example (in prose) "all pictures taken between 5 am and 8 am".

Together with tags etc. this would allow things like "give me all pictures of a tree during late afternoon" (I realize that this wouldn't be exact science since the times change with the seasons, however it would be a great tool to narrow down some searches).

Reproducible: Didn't try
Comment 1 caulier.gilles 2011-11-02 05:40:49 UTC
TimeLine tool can do exactly what you need. Do you tried it ?

Gilles Caulier
Comment 2 Ananta Palani 2011-11-02 13:38:14 UTC
Doesn't the TimeLine tool just let you group by specific Days/Weeks/Months/Years? 

I think what Andreas wants is the ability to choose a specific time across all days and then filter by tags. So part of advanced search, I suppose?
Comment 3 caulier.gilles 2011-11-02 13:46:21 UTC
Ananta,

Yes, i understand that, but Timeline is a search tool outside advanced search to simplify query on database.

Of course Timeline search cannot by add to an Advanced Search query.

Gilles Caulier
Comment 4 Ananta Palani 2011-11-02 14:08:47 UTC
Gilles,

How do you find all photos taken between 12:00 pm and 1:00 pm using Timeline?

-Ananta
Comment 5 caulier.gilles 2011-11-02 14:11:56 UTC
With TimeLine, you cannot. Granularity is mimited to Day.

Gilles Caulier
Comment 6 Ananta Palani 2011-11-02 14:19:21 UTC
Gilles,

This granularity is what Andreas is interested in. He wants to be able to find all photos from a specific time range, regardless of day. I asked about TimeLine because in Comment #1 you said that this was possible.

-Ananta
Comment 7 Andreas Ferber 2011-11-02 20:12:59 UTC
Hi,

Even disregarding the granularity, timeline (or the date range search options in advanced search) isn't really what I want. In more general terms, I want to (almost) arbitrarily mask out certain parts of the timestamp and match against the remaining bits.

To give another example, suppose you want to find all pictures you have ever taken during winter. Sure, you could set timeline to month granularity and manually select December, January and February in each year you have pictures from. For one or two years, this would be somewhat manageable, but think about 10 or 20 years... And even then, you couldn't combine this with other criteria (at least without a boatload of ORed together criteria in advanced search).

With my proposal, in advanced search you would select "Month only" as the timestamp part, enter the three winter months from above (multiple select maybe?), and be done with it, regardless if your collection spans 1, 10 or 100 years.

You could maybe add some sort of season tags to your photos, but why do it if the timestamp already contains this information? And what if tomorrow you would like to find pictures from around christmas? Add that as a tag as well?

I hope those examples show what a versatile search feature this would be, much more than the current "date range" or timeline approach.

Andreas
Comment 8 Marcel Wiesweg 2011-11-02 21:09:17 UTC
The SQL implementation of this can be interesting. Currently, we search for specific points in time and can thus use simple less than / greater than.
With this request, a relevant part would need to be extracted from the date.
With SQLite, I assume built-in functions could help:
http://sqlite.org/lang_datefunc.html
Probably, a MySQL implementation would differ.
Comment 9 caulier.gilles 2015-05-16 11:07:44 UTC
Maik,

This file is to extend Advanced search tool. There is a field named Date in Pictures Properties section (return pictures created between date1 and date2).

Currently granularity if limited to day.

Gilles
Comment 10 Maik Qualmann 2015-06-20 18:46:20 UTC
Created attachment 93263 [details]
datetimesearch.patch

This patch adds a time edit field to the date search.

Maik
Comment 11 Maik Qualmann 2015-06-20 18:47:03 UTC
Created attachment 93264 [details]
datetimesearch.png
Comment 12 caulier.gilles 2015-06-20 21:05:51 UTC
Patch is fine for me.

Gilles
Comment 13 Maik Qualmann 2015-06-21 06:47:14 UTC
Git commit 4d91a65c8caf3d97e8a74bf93f0d3aa52d883769 by Maik Qualmann.
Committed on 21/06/2015 at 06:37.
Pushed by mqualmann into branch 'master'.

apply patch #93263 to adds a time edit field to the date search in the advanced search
FIXED-IN: 4.12.0

M  +2    -1    NEWS
M  +1    -1    app/date/ddateedit.cpp
M  +10   -28   utilities/searchwindow/searchfields.cpp

http://commits.kde.org/digikam/4d91a65c8caf3d97e8a74bf93f0d3aa52d883769
Comment 14 caulier.gilles 2015-06-21 09:59:15 UTC
Git commit f6181a9aabe5e70a6a6753762c8ac9f0cf91ef09 by Gilles Caulier.
Committed on 21/06/2015 at 09:58.
Pushed by cgilles into branch 'frameworks'.

backport commit #4d91a65c8caf3d97e8a74bf93f0d3aa52d883769 from git/master to frameworks branch

M  +4    -3    app/date/ddateedit.cpp
M  +3    -3    app/date/ddateedit.h
M  +11   -22   utilities/searchwindow/searchfields.cpp

http://commits.kde.org/digikam/f6181a9aabe5e70a6a6753762c8ac9f0cf91ef09