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

empty rules #21

Closed
wmyrda opened this issue Jul 17, 2018 · 2 comments
Closed

empty rules #21

wmyrda opened this issue Jul 17, 2018 · 2 comments

Comments

@wmyrda
Copy link

wmyrda commented Jul 17, 2018

I am not sure how should converter behave in such a cases, but if the rule is not possibile to convert into privoxy understood regex than pehaps it is better to skip it with error message instead of creating an empty rule?

Examples

{+client-header-tagger{ab2p-block-dnt-R390} \
}
# |http://$subdocument,third-party,domain=clictune.com (onelist.txt: 39648)
# |https://$subdocument,third-party,domain=clictune.com (onelist.txt: 39627)

or

{+client-header-tagger{ab2p-block-dnt-R436} \
}
# |https://$ping,popup,stylesheet,subdocument,third-party,domain=daclips.com|daclips.in|gorillavid.in|movpod.in (onelist.txt: 39346)
# |http://$ping,popup,stylesheet,subdocument,third-party,domain=daclips.com|daclips.in|gorillavid.in|movpod.in (onelist.txt: 38970)

@wmyrda
Copy link
Author

wmyrda commented Jul 17, 2018

Quick check says in those list I use combined is almost 2000 of such recodrs which would double in ab2p.action file given there will be rules set for dnt and block-elem

cat onelist.txt |grep '|http:\/\/\$'|wc
    975 
cat onelist.txt |grep '|https:\/\/\$'|wc
    903     903   91692

WORKAROUND:
Before running adblock2privoxy one could add those grep statements to their script removing all those undesired records.

My current script among other include following statement

cat *.txt |grep -v -E -i -a '^\[|^!|^$|^~|\,\~www|\,\~ir\.|\,\~dea|\,\~all|\-abp\-|ipt:inj|\|(http|https):\/\/\$' >> ${scriptdir}/onelist.txt

@essandess
Copy link
Owner

These are the correct Privoxy actions for the supplied rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants