Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1251 closed enhancement (invalid)

%now% keyword in Tracker queries

Reported by: jonas.kirilla Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Tracker Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Trying to monitor what happens in a live system I often use queries to watch changes in the filesystem, and so it would be nice to have a %now% keyword. (example: last_modified>%now%) That would be the time when the query is opened, and should remain the same for as long as the query is open.

I think Tracker refreshes queries with "dynamic dates" periodically so it might be best if Tracker would replace %now% with a simple timestamp instead of passing it on. The query file should store the logical name though, so the same query can be closed and reused later on in a meaningful way.

The keyword %now% would not be relevant to /bin/query as it doesn't keep queries open (live) so it wouldn't catch anything most of the time.

Most other applications are probably better off with node monitoring, which is a lot more focused, so one could probably add this directly in Tracker and not add anything to BQuery or the (v)fs.

Just an idea.

Change History (3)

comment:1 by bonefish, 12 years ago

Resolution: invalid
Status: newclosed

Just use "-0secs".

comment:2 by jonas.kirilla, 12 years ago

Is this documented anywhere?

(Tracker could take a few hints from good old MacOS on how to present the search options.)

in reply to:  2 comment:3 by bonefish, 12 years ago

Replying to jonas.kirilla:

Is this documented anywhere?

Indirectly. Date/time strings in queries are resolved via parsedate(). Be Newsletter 101 (November 26, 1997) mentions that and documents what kind of strings parsedate() understands.

Note: See TracTickets for help on using tickets.