Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
KIDJourney committed Mar 23, 2016
1 parent 56d093e commit c96b320
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,77 @@
# TiebaManager
Auto manage tool for baidu tieba .

There are still many unexcept situations unhandled , just a simple and crude demo to do basic job.
Auto manage tool for baidu tieba.

## Requirements

* Python3
* Requests module
* beautifulsoup4 module
* python redis module
* redis

Tested in only *linux* .
Tested only in *linux*.

## Install

After you satisfy the requirements .
Make sure your redis has default configure .
After you satisfy the requirements.
Make sure your Redis has the default configuration.

### Step 0
Clone the Repo .

Clone the Repo.
```
$ git clone https://github.com/KIDJourney/TiebaManager
```

### Step 1
Edit ```config.example.ini``` to add your cookie and managed bar . Then
Edit ```config.example.ini``` to add your cookie and managed bar. Then rename to ```config.ini```.
```
$ gedit config.example.ini
$ mv config.example.ini config.ini
```

### Step 2
Run the main file.
```
$ python3 main.py
```
You can use ```Tmux``` or something similar to run it in backgroud .
You can use ```Tmux``` or something similar to run it in backgroud.


## Feature

### Delete post

Use this tool to judge and delete post.

### Delete reply

Use this tool to judge and delete replies of post.

### Dynamic reload judge methods .

You can edit the methods you want to use while the program is running.

### Ban

This feature is not completely implemented , ban reply author may cause unexcpeted result.

## Judge Method

You can implement your own judge method in ```judgemethods.py``` .
You can implement your own judge method in ```judgemethods.py```.

There are two kind of method you can write yourself .
There are two kinds of methods you can write yourself.

### Post judge method

The method is implemented as a function . Accept a ```Post``` object as argument .
The method is implemented as a function . Accept a ```Post``` object as an argument.

Make sure you register your method with the ```post_method``` decorator.

### Reply judge method

The method is implemented as a function . Accept a ```Reply``` object as argument .
The method is implemented as a function . Accept a ```Reply``` object as an argument.

Make sure you register your method with the ```reply_method``` decorator.

Expand All @@ -56,4 +80,5 @@ Make sure you register your method with the ```reply_method``` decorator.
The Project is still in develop , some of code may be refactored frequently.

## Licenses

[Apache licenses](http://choosealicense.com/licenses/apache-2.0/)

0 comments on commit c96b320

Please sign in to comment.