-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1007 from vktr/feature/console
A filter console
- Loading branch information
Showing
41 changed files
with
2,069 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ Rasterbar-libtorrent and wxWidgets. | |
configuration | ||
creating-torrents | ||
keyboard-shortcuts | ||
pql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
PQL - The PicoTorrent Query Language | ||
==================================== | ||
|
||
PicoTorrent ships with an embedded query language which makes it possible to | ||
filter the torrent list view in order to quickly show relevant information. | ||
|
||
The query language (called PQL) is somewhat based on SQL but is designed to | ||
make querying torrents easy. | ||
|
||
For example, to query all torrents larger than 1GB, the following query can | ||
be used; | ||
|
||
.. code-block:: sql | ||
size > 1gb | ||
Examples | ||
-------- | ||
|
||
- Torrents larger than 1gb that is currently downloading. | ||
:: | ||
|
||
size > 1gb and status = "downloading" | ||
|
||
- Torrents that are currently queued (either for downloading or uploading). | ||
:: | ||
|
||
status = "queued" | ||
|
||
- Torrents with either *1080p* or *720p* in the name. | ||
:: | ||
|
||
name ~ "1080p" or name ~ "720p" | ||
|
||
|
||
Fields | ||
------ | ||
|
||
These are the fields available to query. | ||
|
||
- :code:`name` (*string*) - the name of the torrent. | ||
- :code:`progress` (*number*) - the current progress. | ||
- :code:`size` (*number*) - the *total wanted* size - eg. total size excluding skipped files. | ||
- :code:`status` (*string*) - the current status. Possible values are :code:`error`, | ||
:code:`downloading`, :code:`paused`, :code:`queued`, :code:`seeding`, :code:`uploading` | ||
|
||
|
||
Comparison operators | ||
-------------------- | ||
|
||
- :code:`<` - less than. | ||
- :code:`<=` - less than or equal. | ||
- :code:`>` - greater than. | ||
- :code:`>=` - greater than or equal. | ||
- :code:`=` - equal. | ||
- :code:`~` - like. Can be used to match part of torrent name to a string, For | ||
example :code:`name ~ "ubuntu"` will match all torrents where the name contains | ||
*ubuntu*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
INSERT INTO setting (key, value, default_value) | ||
VALUES ('ui.show_console_input', NULL, 'false'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
INSERT INTO setting (key, value, default_value) | ||
VALUES ('current_filter', NULL, NULL); | ||
|
||
CREATE TABLE filter ( | ||
id INTEGER PRIMARY KEY, | ||
name TEXT NOT NULL, | ||
filter TEXT NOT NULL | ||
); | ||
|
||
INSERT INTO filter (name, filter) VALUES | ||
('Downloading (active)', 'status = "downloading" and dl > 1kbps'), | ||
('Uploading (active)', 'status = "uploading" and ul > 1kbps'); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.