Skip to content

Commit

Permalink
Changed the grammar and correct defenitions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
dfireBird committed Dec 24, 2019
1 parent 50ddebb commit 368fe59
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 135 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode

#build files
build/

#config
config.json
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
# Scrapddit

A program to retrive posts from a reddit user or a subreddit.
A program to retrive posts titles from a reddit user or a subreddit.

The program only retrives top 25 posts from a subreddit and reddit user.
The program only retrives titles of top 25 posts from a subreddit and reddit user.

## Usage

Download the program from [here] (https://github.com/Phoenix181/scrapddit/releases/tag/v1.0-beta)

**Warning**: Make sure to read any script from internet before running in your PC.

Usage: ```node index.js [options] [command]```
Usage: ```bash
node index.js [options] [command]
scrappdit [options] [command]
```
Use `u` flag to get the top 25 posts of the user.
Use `u` flag to get the top 25 posts titles of the user.
```node index.js u <username> ```
```bash
node index.js u <username>
scrappdit u <username>
```

Use `s` flag to get the hot 25 posts of the subreddit.
Use `s` flag to get the hot 25 posts titles of the subreddit.

```node index.js s <subredditname>```
```bash
node index.js s <subredditname>
scrappdit s <subredditname>
```

List of options available:

Expand All @@ -26,8 +37,8 @@ List of options available:

List of commands avaiable:

- user|u <username> Get posts from a user.
- subreddit|s <subredditname> Get posts from a subreddit.
- user|u <username> Get post titles from a user.
- subreddit|s <subredditname> Get post titles from a subreddit.

## Contributing

Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ const program = require('commander');

program
.version('1.0.0')
.description('Retrieves post from a subreddit or a reddit user. \n');
.description('Retrieves post titles from a subreddit or a reddit user. \n');

program
.command('user <username>')
.alias('u')
.description('Get posts from a user.')
.description('Get post titles from a user.')
.action((username) => {
Reddit.getUser(username).getSubmissions()
.then((Submissions) => {
Expand All @@ -23,7 +23,7 @@ program
program
.command('subreddit <subredditname>')
.alias('s')
.description('Get posts from a subreddit.')
.description('Get post titles from a subreddit.')
.action((subredditname) => {
Reddit.getSubreddit(subredditname).getHot().map(post => post.title)
.then(console.log)
Expand Down
Loading

0 comments on commit 368fe59

Please sign in to comment.