From 194b192801948d0aebbc35c96b89a8d4250e0012 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 8 May 2018 00:35:44 +0200 Subject: [PATCH 1/5] Added further explanations about usage --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2f38e29..4ca1e54 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,19 @@ generated file by hand. ## Usage +In Unix command lines, use: ``` node abp2blocklist.js < easylist.txt > easylist.json ``` +Alternately, the following command can be used in PowerShell, but it results in a larger filesize: + +``` +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 From d92c8c642b02047fb6512b2aa28024c4f60a402e Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 8 May 2018 16:22:04 +0200 Subject: [PATCH 2/5] Incorporated feedback-based changes --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4ca1e54..868d91d 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,12 @@ generated file by hand. ## Usage -In Unix command lines, use: +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: ``` node abp2blocklist.js < easylist.txt > easylist.json ``` -Alternately, the following command can be used in PowerShell, but it results in a larger filesize: - +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: ``` get-content easylist.txt | node abp2blocklist.js > easylist.json ``` From e6878536b4713aba9fb667d0f3aa5ea64a905449 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 8 May 2018 16:32:21 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 868d91d..b7b8086 100644 --- a/README.md +++ b/README.md @@ -34,17 +34,12 @@ 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: +In a Unix or Node.js command prompt, use: ``` node abp2blocklist.js < easylist.txt > easylist.json ``` -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: -``` -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. +This assumes 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 From e44328fad836116664ebaec53fbd20501a9fdd2e Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 8 May 2018 16:50:42 +0200 Subject: [PATCH 4/5] Added the newest feedback --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b7b8086..8a0dd2b 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,11 @@ generated file by hand. ## Usage -In a Unix or Node.js command prompt, use: +Create a WebKit block list ```output.json``` from the Adblock Plus filter list ```input.txt```: ``` -node abp2blocklist.js < easylist.txt > easylist.json +node abp2blocklist.js < input.txt > output.json ``` -This assumes 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 From 003ce914593aa2399998a200082b210296fe139c Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 8 May 2018 16:59:42 +0200 Subject: [PATCH 5/5] Changed triple-backticks to single-backticks --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a0dd2b..fa12560 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ generated file by hand. ## Usage -Create a WebKit block list ```output.json``` from the Adblock Plus filter list ```input.txt```: +Create a WebKit block list `output.json` from the Adblock Plus filter list `input.txt`: ``` node abp2blocklist.js < input.txt > output.json ```