diff --git a/client/html/help-search.hbs b/client/html/help-search.hbs
index c340f3a..e4e373e 100644
--- a/client/html/help-search.hbs
+++ b/client/html/help-search.hbs
@@ -28,27 +28,27 @@
favorited by David |
- fav_count:4 |
+ fav-count:4 |
favorited by exactly four users |
- fav_count:4,5 |
+ fav-count:4,5 |
favorited by four or five users |
- fav_count:4.. |
+ fav-count:4.. |
favorited by at least four users |
- fav_count:..4 |
+ fav-count:..4 |
favorited by at most four users |
- fav_count:4..6 |
+ fav-count:4..6 |
favorited by at least four, but no more than six users |
- comment_count:3 |
+ comment-count:3 |
having exactly three comments |
@@ -56,15 +56,15 @@
having score of 4 |
- tag_count:7 |
+ tag-count:7 |
tagged with exactly seven tags |
- note_count:1.. |
+ note-count:1.. |
having at least one post note |
- feature_count:1.. |
+ feature-count:1.. |
having been featured at least once |
@@ -96,19 +96,19 @@
having specific post name (hash in full URLs) |
- file_size:100.. |
+ file-size:100.. |
having at least 100 bytes |
- image_width:100.. |
+ image-width:100.. |
being at least 100 pixels wide |
- image_height:100.. |
+ image-height:100.. |
being at least 100 pixels tall |
- image_area:10000.. |
+ image-area:10000.. |
having at least 10000 pixels |
@@ -151,7 +151,7 @@
id:5..7
and
id:5,10,15
.
You can combine tags and negate any of them for interesting results.
-sea -fav_count:8.. type:swf uploader:Pirate
+sea -fav-count:8.. type:swf uploader:Pirate
will show you flash files tagged as sea, that were liked by seven people at
most, uploaded by user Pirate.
@@ -178,23 +178,23 @@ most, uploaded by user Pirate.
- order:creation_date |
+ order:creation-date |
newest to oldest (pretty much same as above) |
- -order:creation_date |
+ -order:creation-date |
oldest to newest |
- order:creation_date,asc |
+ order:creation-date,asc |
oldest to newest (ascending order, default = descending) |
- order:edit_date |
- like creation_date , only looks at last edit time |
+ order:edit-date |
+ like creation-date , only looks at last edit time |
@@ -203,63 +203,63 @@ most, uploaded by user Pirate.
- order:file_size |
+ order:file-size |
largest files first |
- order:image_width |
+ order:image-width |
widest images first |
- order:image_height |
+ order:image-height |
tallest images first |
- order:image_area |
+ order:image-area |
largest images first |
- order:tag_count |
+ order:tag-count |
with most tags |
- order:fav_count |
+ order:fav-count |
loved by most |
- order:comment_count |
+ order:comment-count |
most commented first |
- order:fav_date |
+ order:fav-date |
recently added to favorites |
- order:comment_date |
+ order:comment-date |
recently commented |
- order:feature_date |
+ order:feature-date |
recently featured |
- order:feature_count |
+ order:feature-count |
most often featured |
As shown with -order:creation_date
,
+href='/posts/query=-order:creation-date'>-order:creation-date
,
any of them can be reversed in the same way as negating other tags: by placing
a dash before the tag.
diff --git a/server/szurubooru/search/user_search_config.py b/server/szurubooru/search/user_search_config.py
index c8583d9..4b394ad 100644
--- a/server/szurubooru/search/user_search_config.py
+++ b/server/szurubooru/search/user_search_config.py
@@ -20,12 +20,12 @@ class UserSearchConfig(BaseSearchConfig):
def named_filters(self):
return {
'name': self._create_basic_filter(db.User.name, allow_ranged=False),
- 'creation_date': self._create_date_filter(db.User.creation_time),
- 'creation_time': self._create_date_filter(db.User.creation_time),
- 'last_login_date': self._create_date_filter(db.User.last_login_time),
- 'last_login_time': self._create_date_filter(db.User.last_login_time),
- 'login_date': self._create_date_filter(db.User.last_login_time),
- 'login_time': self._create_date_filter(db.User.last_login_time),
+ 'creation-date': self._create_date_filter(db.User.creation_time),
+ 'creation-time': self._create_date_filter(db.User.creation_time),
+ 'last-login-date': self._create_date_filter(db.User.last_login_time),
+ 'last-login-time': self._create_date_filter(db.User.last_login_time),
+ 'login-date': self._create_date_filter(db.User.last_login_time),
+ 'login-time': self._create_date_filter(db.User.last_login_time),
}
@property
@@ -33,10 +33,10 @@ class UserSearchConfig(BaseSearchConfig):
return {
'random': func.random(),
'name': db.User.name,
- 'creation_date': db.User.creation_time,
- 'creation_time': db.User.creation_time,
- 'last_login_date': db.User.last_login_time,
- 'last_login_time': db.User.last_login_time,
- 'login_date': db.User.last_login_time,
- 'login_time': db.User.last_login_time,
+ 'creation-date': db.User.creation_time,
+ 'creation-time': db.User.creation_time,
+ 'last-login-date': db.User.last_login_time,
+ 'last-login-time': db.User.last_login_time,
+ 'login-date': db.User.last_login_time,
+ 'login-time': db.User.last_login_time,
}
diff --git a/server/szurubooru/tests/search/test_user_search_config.py b/server/szurubooru/tests/search/test_user_search_config.py
index 0a93d4d..0eefbc0 100644
--- a/server/szurubooru/tests/search/test_user_search_config.py
+++ b/server/szurubooru/tests/search/test_user_search_config.py
@@ -20,7 +20,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user1.creation_time = datetime(2014, 1, 1)
user2.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('%s:2014' % alias, 1, 1, ['u1'])
def test_filter_by_negated_creation_time(self):
@@ -29,7 +29,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user1.creation_time = datetime(2014, 1, 1)
user2.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('-%s:2014' % alias, 1, 1, ['u2'])
def test_filter_by_ranged_creation_time(self):
@@ -40,7 +40,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user2.creation_time = datetime(2014, 6, 1)
user3.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2, user3])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('%s:2014..2014-06' % alias, 1, 2, ['u1', 'u2'])
self._test('%s:2014-06..2015-01-01' % alias, 1, 2, ['u2', 'u3'])
self._test('%s:2014-06..' % alias, 1, 2, ['u2', 'u3'])
@@ -56,7 +56,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user2.creation_time = datetime(2014, 6, 1)
user3.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2, user3])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('-%s:2014..2014-06' % alias, 1, 1, ['u3'])
self._test('-%s:2014-06..2015-01-01' % alias, 1, 1, ['u1'])
@@ -68,7 +68,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user2.creation_time = datetime(2014, 6, 1)
user3.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2, user3])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('%s:2014-01,2015' % alias, 1, 2, ['u1', 'u3'])
def test_filter_by_negated_composite_creation_time(self):
@@ -79,7 +79,7 @@ class TestUserSearchExecutor(DatabaseTestCase):
user2.creation_time = datetime(2014, 6, 1)
user3.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2, user3])
- for alias in ['creation_time', 'creation_date']:
+ for alias in ['creation-time', 'creation-date']:
self._test('-%s:2014-01,2015' % alias, 1, 1, ['u2'])
def test_filter_by_name(self):
@@ -158,9 +158,9 @@ class TestUserSearchExecutor(DatabaseTestCase):
user2.creation_time = datetime(2014, 6, 1)
user3.creation_time = datetime(2015, 1, 1)
self.session.add_all([user1, user2, user3])
- self._test('creation_time:2014 u1', 1, 1, ['u1'])
- self._test('creation_time:2014 u2', 1, 1, ['u2'])
- self._test('creation_time:2016 u2', 1, 0, [])
+ self._test('creation-time:2014 u1', 1, 1, ['u1'])
+ self._test('creation-time:2014 u2', 1, 1, ['u2'])
+ self._test('creation-time:2016 u2', 1, 0, [])
def test_special(self):
self.assertRaises(