Skip to content

Commit

Permalink
Expand readme, prep for public release.
Browse files Browse the repository at this point in the history
Better (?, longer for sure) README
Clean up and flesh out setup.py for distribution via PyPI
  • Loading branch information
jacobpa committed Jul 26, 2018
1 parent 0d46f71 commit b2a223e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,37 @@ posts to, and allows you to choose, along with the source/destination subreddit:
* The sort method of the posts chosen (hot, new, controversial, and top)
* The time frame to grab posts from (day, week, month, year, all)
* How many posts to grab
* Whether or not to include the comments from the post you mirrored (this
functionality is very time consuming)

### Why?

Whenever I create reddit bots, I would normally manually create posts that mimic
the posts I would expect when using my bot. This becomes tedious, especially as
the bot grows more dynamic over time. Instead, I figured I could write a script
which would do this tedious work for me, and as an added bonus, the content
would be real data from the subreddits I would be targeting.

#### Can't you use this for spam?

I suppose so, but you shouldn't. This script includes a simple check to make
sure that you're a moderator of the subreddit your mirroring posts to. Although
this is easy enough to remove, I figured that anyone who'd want to make a spam
bot could and probably would have without much effort.

## Installation

```
$ pip install subreddit-mirror
```

Alternatively, manually download and install the release file from the Github release page.

## Usage
```
usage: subreddit-mirror [-h] [--count COUNT]
[--sort {hot,new,controversial,top}]
[--time {day,week,month,year,all}]
[--time {day,week,month,year,all}] [--comments] [-v]
subreddit destination
Mirror posts from another subreddit.
Expand All @@ -29,12 +54,20 @@ optional arguments:
how to sort posts
--time {day,week,month,year,all}
time frame to grab from
--comments [CAUTION] also mirror comments from threads, may take
a long time
-v, --version show program's version number and exit
```

### Optional Parameter Defaults
* `--count`: `15`
* `--sort`: `new`
* `--time`: `day`

| Option | Default Parameter |
|--------------|-------------------|
| `--count` | `15` |
| `--sort` | `'new'` |
| `--time` | `'day'` |
| `--comments` | `False` |


### Examples

Expand All @@ -45,6 +78,10 @@ optional arguments:

Copies the top 10 posts of all time from /r/calamariraceteam to /r/motorcycles

## Dependencies
* [PRAW](https://github.com/praw-dev/praw)
* [progress](https://github.com/verigak/progress)

## License
```
subreddit-mirror -- A script to copy posts from one subreddit to another.
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
author="Jacob Patterson",
author_email="[email protected]",
entry_points={
"console_scripts": ['subreddit-mirror = subredditmirror.__main__']
"console_scripts": ['subreddit-mirror = subredditmirror.mirror:main']
},
classifiers=['Programming Language :: Python :: 3.6',
'Operating System :: OS Independent',
'Natural Language :: English'],
description="A script to copy posts from one subreddit to another.",
install_requires=['progress==1.4', 'praw==5.4.0'],
license="GNU GPLv3",
keywords='reddit mirror crosspost bot script',
license="GPLv3",
long_description=long_description,
long_description_content_type="text/markdown",
packages=['subredditmirror'],
project_urls={
"Github": "https://github.com/jacobpa/subreddit-mirror",
},
)

0 comments on commit b2a223e

Please sign in to comment.