Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added further explanations about usage #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ generated file by hand.

## Usage

We recommend the use of [Node.js](https://nodejs.org/en/download/)'s own command prompt, but it should also work in regular Unix command prompts (e.g. Cygwin). In either case the command is:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few people use Windows to run this code, so I don't think we should assume people are running Windows in this documentation, or start off by talking about Windows specific stuff.

Copy link
Contributor Author

@DandelionSprout DandelionSprout May 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since some 85-90% of the world runs Windows, and that Abp2blocklist can only be run through a command prompt to the best of my knowledge, I had previously thought that they'd need extra assistance in learning about how to use command prompts in order to use this tool.

It was merely 3 months ago that I was highly confused about how command lines worked like, and I found it difficult to learn how they worked, so I figured that I should create this pull request in general to teach other list maintainers who may currently be in the situation that I was previously in.

```
node abp2blocklist.js < easylist.txt > easylist.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can you modify this example to use the names input.txt and output.json instead?

```

We don't recommend using PowerShell, since it adds bloated metadata that increases the size of the output file, but if so needed, the following command can be used there:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't recommend PowerShell why mention it at all or explain how to use it?

```
get-content easylist.txt | node abp2blocklist.js > easylist.json
```

Both possibilities assume that you're trying to convert an input file that'd be called _easylist.txt_, and that you've navigated to the file's correct folder through the _cd_ command. If the input file has a different name, replace _easylist.txt_ with the file's name.

## Tests

Unit tests live in the `tests/` directory. To run the unit tests ensure you have
Expand Down