Esempio n. 1
0
 def get_settings(self):
     yield Setting('order',
                   None,
                   etype='str',
                   desc='Order submissions by:',
                   opts=reddit.post_orders())
     yield Setting('time',
                   None,
                   etype='str',
                   desc='Select a time span to filter by:',
                   opts=reddit.time_filters())
     yield Setting(
         'limit',
         0,
         etype='int',
         desc='How many would you like to download? (0 for no limit):',
     )
 def get_settings(self):
     yield Setting(
         'subreddit',
         '',
         etype='str',
         desc='Name of the desired subreddit(s), separated by commas:')
     yield Setting('order',
                   None,
                   etype='str',
                   desc='Order submissions by:',
                   opts=reddit.post_orders())
     yield Setting('time',
                   None,
                   etype='str',
                   desc='Select a time span to filter by:',
                   opts=reddit.time_filters())
     yield Setting(
         'limit',
         0,
         etype='int',
         desc='How many would you like to download? (0 for no limit):')
Esempio n. 3
0
 def get_settings(self):
     yield Setting('owner',
                   '',
                   etype='str',
                   desc='Username of this multireddit owner:')
     yield Setting('multi_name',
                   '',
                   etype='str',
                   desc='Name of this user\'s multireddit:')
     yield Setting('order',
                   None,
                   etype='str',
                   desc='Order submissions by:',
                   opts=reddit.post_orders())
     yield Setting('time',
                   None,
                   etype='str',
                   desc='Select a time span to filter by:',
                   opts=reddit.time_filters())
     yield Setting(
         'limit',
         0,
         etype='int',
         desc='How many would you like to download? (0 for no limit):')
 def test_post_orders(self):
     """ All post orders should find a result from a subreddit """
     for order, time in pw.post_orders() + [('best', False)]:
         post = next(pw.subreddit_posts('funny', order, 1, 'all'))
         self.assertTrue(post, msg="Failed to find '%s' post." % order)