Give sort commands more generic sounding names
This commit is contained in:
13
rtv/docs.py
13
rtv/docs.py
@@ -38,12 +38,13 @@ https://github.com/michael-lazar/rtv
|
|||||||
G : Jump to the last post
|
G : Jump to the last post
|
||||||
J : Jump to the next sibling comment
|
J : Jump to the next sibling comment
|
||||||
K : Jump to the parent comment
|
K : Jump to the parent comment
|
||||||
1 : Sort by hot
|
1 : Sort by category 1
|
||||||
2 : Sort by top
|
2 : Sort by category 2
|
||||||
3 : Sort by rising
|
3 : Sort by category 3
|
||||||
4 : Sort by new
|
4 : Sort by category 4
|
||||||
5 : Sort by controversial
|
5 : Sort by category 5
|
||||||
6 : Sort by gilded
|
6 : Sort by category 6
|
||||||
|
7 : Sort by category 7
|
||||||
p : Return to the front page
|
p : Return to the front page
|
||||||
r : Refresh page
|
r : Refresh page
|
||||||
u : Login or logout
|
u : Login or logout
|
||||||
|
|||||||
@@ -37,23 +37,23 @@ class SubmissionPage(Page):
|
|||||||
self.nav = Navigator(self.content.get, page_index=-1)
|
self.nav = Navigator(self.content.get, page_index=-1)
|
||||||
self.selected_subreddit = None
|
self.selected_subreddit = None
|
||||||
|
|
||||||
@SubmissionController.register(Command('SORT_HOT'))
|
@SubmissionController.register(Command('SORT_1'))
|
||||||
def sort_content_hot(self):
|
def sort_content_hot(self):
|
||||||
self.refresh_content(order='hot')
|
self.refresh_content(order='hot')
|
||||||
|
|
||||||
@SubmissionController.register(Command('SORT_TOP'))
|
@SubmissionController.register(Command('SORT_2'))
|
||||||
def sort_content_top(self):
|
def sort_content_top(self):
|
||||||
self.refresh_content(order='top')
|
self.refresh_content(order='top')
|
||||||
|
|
||||||
@SubmissionController.register(Command('SORT_RISING'))
|
@SubmissionController.register(Command('SORT_3'))
|
||||||
def sort_content_rising(self):
|
def sort_content_rising(self):
|
||||||
self.refresh_content(order='rising')
|
self.refresh_content(order='rising')
|
||||||
|
|
||||||
@SubmissionController.register(Command('SORT_NEW'))
|
@SubmissionController.register(Command('SORT_4'))
|
||||||
def sort_content_new(self):
|
def sort_content_new(self):
|
||||||
self.refresh_content(order='new')
|
self.refresh_content(order='new')
|
||||||
|
|
||||||
@SubmissionController.register(Command('SORT_CONTROVERSIAL'))
|
@SubmissionController.register(Command('SORT_5'))
|
||||||
def sort_content_controversial(self):
|
def sort_content_controversial(self):
|
||||||
self.refresh_content(order='controversial')
|
self.refresh_content(order='controversial')
|
||||||
|
|
||||||
|
|||||||
@@ -60,14 +60,14 @@ class SubredditPage(Page):
|
|||||||
if not self.term.loader.exception:
|
if not self.term.loader.exception:
|
||||||
self.nav = Navigator(self.content.get)
|
self.nav = Navigator(self.content.get)
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_HOT'))
|
@SubredditController.register(Command('SORT_1'))
|
||||||
def sort_content_hot(self):
|
def sort_content_hot(self):
|
||||||
if self.content.query:
|
if self.content.query:
|
||||||
self.refresh_content(order='relevance')
|
self.refresh_content(order='relevance')
|
||||||
else:
|
else:
|
||||||
self.refresh_content(order='hot')
|
self.refresh_content(order='hot')
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_TOP'))
|
@SubredditController.register(Command('SORT_2'))
|
||||||
def sort_content_top(self):
|
def sort_content_top(self):
|
||||||
order = self._prompt_period('top')
|
order = self._prompt_period('top')
|
||||||
if order is None:
|
if order is None:
|
||||||
@@ -75,7 +75,7 @@ class SubredditPage(Page):
|
|||||||
else:
|
else:
|
||||||
self.refresh_content(order=order)
|
self.refresh_content(order=order)
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_RISING'))
|
@SubredditController.register(Command('SORT_3'))
|
||||||
def sort_content_rising(self):
|
def sort_content_rising(self):
|
||||||
if self.content.query:
|
if self.content.query:
|
||||||
order = self._prompt_period('comments')
|
order = self._prompt_period('comments')
|
||||||
@@ -86,11 +86,11 @@ class SubredditPage(Page):
|
|||||||
else:
|
else:
|
||||||
self.refresh_content(order='rising')
|
self.refresh_content(order='rising')
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_NEW'))
|
@SubredditController.register(Command('SORT_4'))
|
||||||
def sort_content_new(self):
|
def sort_content_new(self):
|
||||||
self.refresh_content(order='new')
|
self.refresh_content(order='new')
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_CONTROVERSIAL'))
|
@SubredditController.register(Command('SORT_5'))
|
||||||
def sort_content_controversial(self):
|
def sort_content_controversial(self):
|
||||||
if self.content.query:
|
if self.content.query:
|
||||||
self.term.flash()
|
self.term.flash()
|
||||||
@@ -101,7 +101,7 @@ class SubredditPage(Page):
|
|||||||
else:
|
else:
|
||||||
self.refresh_content(order=order)
|
self.refresh_content(order=order)
|
||||||
|
|
||||||
@SubredditController.register(Command('SORT_GILDED'))
|
@SubredditController.register(Command('SORT_6'))
|
||||||
def sort_content_gilded(self):
|
def sort_content_gilded(self):
|
||||||
if self.content.query:
|
if self.content.query:
|
||||||
self.term.flash()
|
self.term.flash()
|
||||||
|
|||||||
@@ -117,12 +117,13 @@ imgur_client_id = 93396265f59dec9
|
|||||||
EXIT = q
|
EXIT = q
|
||||||
FORCE_EXIT = Q
|
FORCE_EXIT = Q
|
||||||
HELP = ?
|
HELP = ?
|
||||||
SORT_HOT = 1
|
SORT_1 = 1
|
||||||
SORT_TOP = 2
|
SORT_2 = 2
|
||||||
SORT_RISING = 3
|
SORT_3 = 3
|
||||||
SORT_NEW = 4
|
SORT_4 = 4
|
||||||
SORT_CONTROVERSIAL = 5
|
SORT_5 = 5
|
||||||
SORT_GILDED = 6
|
SORT_6 = 6
|
||||||
|
SORT_7 = 7
|
||||||
MOVE_UP = k, <KEY_UP>
|
MOVE_UP = k, <KEY_UP>
|
||||||
MOVE_DOWN = j, <KEY_DOWN>
|
MOVE_DOWN = j, <KEY_DOWN>
|
||||||
PREVIOUS_THEME = <KEY_F2>
|
PREVIOUS_THEME = <KEY_F2>
|
||||||
|
|||||||
Reference in New Issue
Block a user