Left: | ||
Right: |
OLD | NEW |
---|---|
1 # python-abp | 1 # python-abp |
2 | 2 |
3 This repository contains a library for working with Adblock Plus filter lists | 3 This repository contains a library for working with Adblock Plus filter lists |
4 and the script that is used for building Adblock Plus filter lists from the | 4 and the script that is used for building Adblock Plus filter lists from the |
5 form in which they are authored into the format suitable for consumption by the | 5 form in which they are authored into the format suitable for consumption by the |
6 adblocking software. | 6 adblocking software. |
7 | 7 |
8 ## Installation | 8 ## Installation |
9 | 9 |
10 Prerequisites: | 10 Prerequisites: |
(...skipping 20 matching lines...) Expand all Loading... | |
31 The produced filter list is marked with a version, a timestamp and | 31 The produced filter list is marked with a version, a timestamp and |
32 a [checksum][1]. | 32 a [checksum][1]. |
33 | 33 |
34 Python-abp contains a script that can do this called `flrender`: | 34 Python-abp contains a script that can do this called `flrender`: |
35 | 35 |
36 $ flrender fragment.txt filterlist.txt | 36 $ flrender fragment.txt filterlist.txt |
37 | 37 |
38 This will take the top level fragment in `fragment.txt`, render it and save into | 38 This will take the top level fragment in `fragment.txt`, render it and save into |
39 `filterlist.txt`. | 39 `filterlist.txt`. |
40 | 40 |
41 The `flrender` script can also be used by only specifying `fragment.txt`: | |
42 | |
43 $flrender fragment.txt | |
44 | |
45 in which case the rendering result will be returned to `stdout`. Moreover, when | |
Vasily Kuznetsov
2018/07/09 17:00:57
"returned" feels a bit weird here. What do you thi
Tudor Avram
2018/07/10 16:09:47
Done.
| |
46 being run with no positional arguments: | |
Vasily Kuznetsov
2018/07/09 17:00:57
Perhaps eliminate the passive here to make it easi
Tudor Avram
2018/07/10 16:09:47
Done.
| |
47 | |
48 $flrender | |
49 | |
50 it will read from `stdin` and output the results to `stdout`. | |
51 | |
41 Fragments might reference other fragments that should be included into them. | 52 Fragments might reference other fragments that should be included into them. |
42 The references come in two forms: http(s) includes and local includes: | 53 The references come in two forms: http(s) includes and local includes: |
43 | 54 |
44 %include http://www.server.org/dir/list.txt% | 55 %include http://www.server.org/dir/list.txt% |
45 %include easylist:easylist/easylist_general_block.txt% | 56 %include easylist:easylist/easylist_general_block.txt% |
46 | 57 |
47 The first instruction contains a URL that will be fetched and inserted at the | 58 The first instruction contains a URL that will be fetched and inserted at the |
48 point of reference. | 59 point of reference. |
49 The second one contains a path inside easylist repository. | 60 The second one contains a path inside easylist repository. |
50 `flrender` needs to be able to find a copy of the repository on the local | 61 `flrender` needs to be able to find a copy of the repository on the local |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 | 157 |
147 All public functions, classes and methods should have docstrings compliant with | 158 All public functions, classes and methods should have docstrings compliant with |
148 [NumPy/SciPy documentation guide][5]. One exception is the constructors of | 159 [NumPy/SciPy documentation guide][5]. One exception is the constructors of |
149 classes that the user is not expected to instantiate (such as exceptions). | 160 classes that the user is not expected to instantiate (such as exceptions). |
150 | 161 |
151 [1]: https://adblockplus.org/filters#special-comments | 162 [1]: https://adblockplus.org/filters#special-comments |
152 [2]: https://adblockplus.org/filters#options | 163 [2]: https://adblockplus.org/filters#options |
153 [3]: http://pytest.org/ | 164 [3]: http://pytest.org/ |
154 [4]: https://tox.readthedocs.org/ | 165 [4]: https://tox.readthedocs.org/ |
155 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt | 166 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt |
OLD | NEW |