Cleanup CLI interface and allow for regular expressions in search (#68)

* Cleanup CLI interface and allow for regular expressions in search

* Put a cap on beautifulsoup4
This commit is contained in:
Dave Gallant
2020-06-28 23:48:20 -04:00
committed by GitHub
parent da707a2682
commit dbcdc01457
5 changed files with 67 additions and 39 deletions

View File

@@ -9,7 +9,8 @@ Hot deals on the command line.
[![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)
![screenshot](https://user-images.githubusercontent.com/4519234/76671943-c9d24f80-656f-11ea-872e-85897add37db.png)
![screenshot](https://user-images.githubusercontent.com/4519234/85969861-e10a4100-b996-11ea-9a31-6203322c60ee.png)
## Install
@@ -17,19 +18,38 @@ Hot deals on the command line.
pip install rfd
```
## Use
## Usage
### view threads
```bash
rfd threads [--forum-id 9] [--limit 10]
```shell
Usage: rfd [OPTIONS] COMMAND [ARGS]...
CLI for https://forums.redflagdeals.com
Options:
-v, --version
--help Show this message and exit.
Commands:
posts Display all posts in a thread.
search Search deals based on a regular expression.
threads Displays threads in the forum. Defaults to hot deals.
```
### search
```bash
rfd search pizza [--num-pages 100]
## Examples
### view hot deals
```shell
rfd threads
```
## Support Tab Completion
### search for pizza
```shell
rfd search 'pizza'
```
## Tab Completion
To enable:
### bash