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: Address comments on PS3, add README Created Sept. 24, 2018, 10:04 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') | abp/filters/diff_script.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
===================================================================
--- a/README.md
+++ b/README.md
@@ -86,6 +86,32 @@
You can clone the necessary repositories to a local directory and add `-i`
options accordingly.
+## Rendering diffs
+
+A diff allows a client running adblocking software such as Adblock Plus to update
Sebastian Noack 2018/09/24 22:21:09 "ad blocking" are two words.
rhowell 2018/09/25 01:53:44 Done.
+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 filterlists called
Sebastian Noack 2018/09/24 22:21:09 ... between two versions of a filter list ...
rhowell 2018/09/25 01:53:44 Done.
+`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]:
Sebastian Noack 2018/09/24 22:21:09 This URL is not defined at the bottom.
rhowell 2018/09/25 01:53:45 Oops! I had it in a markdown editor, but forgot to
+* Special comments of the form `! <name>:[ <value>]`
+* Added filters of the form `+ <filter-text>`
+* Removed filter of the form `- <filter-text>`
+
+When applying the diff, a client will update any values in the form of special
+comments, remove any filters that have been removed, and then add any filters
Sebastian Noack 2018/09/24 22:21:09 That is not accurate. As of the current specificat
rhowell 2018/09/25 01:53:45 Ah right. I missed that change to the spec. Fixed.
+that have been added.
+
## Library API
Python-abp can also be used as a library for parsing filter lists. For example
« no previous file with comments | « no previous file | abp/filters/diff_script.py » ('j') | abp/filters/diff_script.py » ('J')

Powered by Google App Engine
This is Rietveld