2 Commits

Author SHA1 Message Date
Dave Gallant
1e0d6da48b do not check if branch is master 2019-10-18 00:10:31 -04:00
Dave Gallant
22d75f8332 check if tag is present in stage conditional 2019-10-18 00:07:28 -04:00
8 changed files with 18 additions and 25 deletions

View File

@@ -1,9 +1,8 @@
**What this PR does / why we need it:** *Description of changes:*
-
**Which issue(s) this PR fixes:** *Checklist:*
-
**Additional Notes:** - [ ] Write unit tests
- - [ ] `make pr` passes
- [ ] Write documentation

View File

@@ -4,22 +4,21 @@ Hot deals on the command line.
[![Build Status](https://travis-ci.org/davegallant/rfd.svg?branch=master)](https://travis-ci.org/davegallant/rfd) [![Build Status](https://travis-ci.org/davegallant/rfd.svg?branch=master)](https://travis-ci.org/davegallant/rfd)
[![PyPI version](https://badge.fury.io/py/rfd.svg)](https://badge.fury.io/py/rfd) [![PyPI version](https://badge.fury.io/py/rfd.svg)](https://badge.fury.io/py/rfd)
[![Dependabot](https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot)](https://dependabot.com/)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/davegallant/rfd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davegallant/rfd/alerts/) [![Total alerts](https://img.shields.io/lgtm/alerts/g/davegallant/rfd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davegallant/rfd/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/davegallant/rfd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davegallant/rfd/context:python) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/davegallant/rfd.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davegallant/rfd/context:python)
## Installation
![image](https://user-images.githubusercontent.com/4519234/71054408-e18c6a00-211f-11ea-89bc-3f990a4909de.png)
## Install
```bash ```bash
pip install rfd pip install rfd
``` ```
## Use ## Usage
### view threads ![rfd_demo_gif](https://user-images.githubusercontent.com/4519234/64501455-64836600-d28f-11e9-8381-3fbfda910230.gif)
### threads
```bash ```bash
rfd threads [--forum-id 9] [--limit 10] rfd threads [--forum-id 9] [--limit 10]
``` ```
@@ -29,7 +28,7 @@ rfd threads [--forum-id 9] [--limit 10]
rfd search pizza [--num-pages 100] rfd search pizza [--num-pages 100]
``` ```
## Support Tab Completion ## Tab Completion
### bash ### bash

View File

@@ -1,4 +1,4 @@
beautifulsoup4>=4.8.1 beautifulsoup4>=4.6.0
click>=7.0 click>=7.0
colorama>=0.4.3 colorama>=0.3.9
requests>=2.22.0 requests>=2.18.0

View File

@@ -1,4 +1,4 @@
pre-commit==1.20.0 pre-commit==1.18.3
pylint pylint
pytest>=4.6.6 pytest>=4.6.6
rope==0.14.0 rope==0.14.0

View File

@@ -1 +1 @@
0.3.4 0.3.3

View File

@@ -116,9 +116,6 @@ def threads(limit, forum_id):
+ get_vote_color(thread.score) + get_vote_color(thread.score)
+ Fore.RESET + Fore.RESET
+ "[%s] %s" % (thread.dealer_name, thread.title) + "[%s] %s" % (thread.dealer_name, thread.title)
+ Fore.LIGHTYELLOW_EX
+ " (%d views)" % thread.total_views
+ Fore.RESET
) )
click.echo(Fore.BLUE + " {}".format(thread.url)) click.echo(Fore.BLUE + " {}".format(thread.url))
click.echo(Style.RESET_ALL) click.echo(Style.RESET_ALL)

View File

@@ -1,11 +1,10 @@
# pylint: disable=old-style-class # pylint: disable=old-style-class
class Thread: class Thread:
def __init__(self, title, dealer_name, score, url, total_views): def __init__(self, title, dealer_name, score, url):
self.dealer_name = dealer_name self.dealer_name = dealer_name
self.score = score self.score = score
self.title = title self.title = title
self.url = url self.url = url
self.total_views = total_views
def __repr__(self): def __repr__(self):
return "Thread(%s)" % self.title return "Thread(%s)" % self.title

View File

@@ -29,7 +29,6 @@ def parse_threads(threads, limit):
dealer_name=topic["offer"].get("dealer_name"), dealer_name=topic["offer"].get("dealer_name"),
score=calculate_score(topic), score=calculate_score(topic),
url=build_web_path(topic.get("web_path")), url=build_web_path(topic.get("web_path")),
total_views=topic.get("total_views"),
) )
) )
return parsed_threads return parsed_threads