Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: README.md

Issue 29884571: Issue 6945 - Add script to make filter list diffs (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Patch Set: Fix docstring Created Sept. 26, 2018, 6:20 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | abp/filters/diff_script.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
===================================================================
--- a/README.md
+++ b/README.md
@@ -86,6 +86,28 @@
You can clone the necessary repositories to a local directory and add `-i`
options accordingly.
+## Rendering diffs
+
+A diff allows a client running ad blocking software such as Adblock Plus to update
+the filter lists incrementally, instead of downloading a new copy of a full list
+during each update. This is meant to lessen the amount of resources used when updating
+filter lists (e.g. network data, memory usage, battery consumption, etc.), allowing
+clients to update their lists more frequently using less resources.
+
+Python-abp contains a script that produces the diff between two versions of a
+filter list called `fldiff`:
+
+ $ fldiff base.txt latest.txt output.txt
+
+This will produce a diff that shows how a client may get from `base.txt` to
+`latest.txt`, and write the output to `output.txt`. The output argument is
+optional. If ommitted, the data will be written to `stdout`.
+
+The script produces three types of lines, as specified in the [technical specification][5]:
+* Special comments of the form `! <name>:[ <value>]`
+* Added filters of the form `+ <filter-text>`
+* Removed filter of the form `- <filter-text>`
+
## Library API
Python-abp can also be used as a library for parsing filter lists. For example
@@ -182,3 +204,4 @@
[2]: http://pytest.org/
[3]: https://tox.readthedocs.org/
[4]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
+ [5]: https://docs.google.com/document/d/1SoEqaOBZRCfkh1s5Kds5A5RwUC_nqbYYlGH72sbsSgQ/
« no previous file with comments | « no previous file | abp/filters/diff_script.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld