{"action":"created","issue":{"url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/1","labels_url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/1/comments","events_url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/1/events","html_url":"https://github.com/jamesmacwhite/squidguard-adblock/issues/1","id":89825841,"number":1,"title":"ufdbguard support","user":{"login":"soakes","id":813389,"avatar_url":"https://avatars.githubusercontent.com/u/813389?v=3","gravatar_id":"","url":"https://api.github.com/users/soakes","html_url":"https://github.com/soakes","followers_url":"https://api.github.com/users/soakes/followers","following_url":"https://api.github.com/users/soakes/following{/other_user}","gists_url":"https://api.github.com/users/soakes/gists{/gist_id}","starred_url":"https://api.github.com/users/soakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soakes/subscriptions","organizations_url":"https://api.github.com/users/soakes/orgs","repos_url":"https://api.github.com/users/soakes/repos","events_url":"https://api.github.com/users/soakes/events{/privacy}","received_events_url":"https://api.github.com/users/soakes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"jamesmacwhite","id":8067792,"avatar_url":"https://avatars.githubusercontent.com/u/8067792?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesmacwhite","html_url":"https://github.com/jamesmacwhite","followers_url":"https://api.github.com/users/jamesmacwhite/followers","following_url":"https://api.github.com/users/jamesmacwhite/following{/other_user}","gists_url":"https://api.github.com/users/jamesmacwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmacwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmacwhite/subscriptions","organizations_url":"https://api.github.com/users/jamesmacwhite/orgs","repos_url":"https://api.github.com/users/jamesmacwhite/repos","events_url":"https://api.github.com/users/jamesmacwhite/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmacwhite/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-06-20T22:18:58Z","updated_at":"2015-06-21T10:21:15Z","closed_at":null,"body":"Hi there,\r\n\r\nJust like to say a big thank you for providing this as its hard to find a good regex list for the easylist as theres a lot out there which are out of date and I haven't had the time/energy to work it all out by hand.  \r\n\r\nI am persoanly still using \"ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gz\" due to haven't been able to get easylist working (as of yet) but with the code you have provided, I should be able to make the necessary changes to make it work with ufdbuard which is what I use.\r\n\r\nJust one quick comment/feature, if you haven't herd of ufdbguard, you may want to take a little look into this as its much more memory and CPU effcient then SquidGuard.  I personaly have used both and the issue with SquidGuard is if you have a big list, it starts eating a lot of RAM and CPU cycles.  Since changing over, all these issues have gone.\r\n\r\nufdbguard also supports SquidGuard based lists (assuming you put them though the converter tool).  I thougt you may would like to add direct support into this script to make some peoples lifes easier.\r\n\r\nMore info can be found here:\r\nhttps://www.urlfilterdb.com/products/ufdbguard.html\r\n\r\nKind Regards,\r\n\r\nSimon"},"comment":{"url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/comments/113881906","html_url":"https://github.com/jamesmacwhite/squidguard-adblock/issues/1#issuecomment-113881906","issue_url":"https://api.github.com/repos/jamesmacwhite/squidguard-adblock/issues/1","id":113881906,"user":{"login":"soakes","id":813389,"avatar_url":"https://avatars.githubusercontent.com/u/813389?v=3","gravatar_id":"","url":"https://api.github.com/users/soakes","html_url":"https://github.com/soakes","followers_url":"https://api.github.com/users/soakes/followers","following_url":"https://api.github.com/users/soakes/following{/other_user}","gists_url":"https://api.github.com/users/soakes/gists{/gist_id}","starred_url":"https://api.github.com/users/soakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soakes/subscriptions","organizations_url":"https://api.github.com/users/soakes/orgs","repos_url":"https://api.github.com/users/soakes/repos","events_url":"https://api.github.com/users/soakes/events{/privacy}","received_events_url":"https://api.github.com/users/soakes/received_events","type":"User","site_admin":false},"created_at":"2015-06-21T10:21:15Z","updated_at":"2015-06-21T10:21:15Z","body":"Hehe, yes it does make it easier to read, however I personaly don't like to use any extra files where possible (not even tmp ones if I can do without) and so I have it all self contained.  \r\n\r\nI also highly doubt these rules will be changing anytime soon and so ive just added it in one rather long sed line.  Its not so easy to read, that I must admit but it keeps it cleaner/contained.  Each to their own I guess.\r\n\r\nHeres a quick snipit from my main script which pulls the subscription file(s) down and places it in the right location ready for the converstion function which converts it to ufdbguard.  This you may find useful in future to save you having to use tmp files all the time.  i.e use stdin \r\n\r\n```\r\nfor rules in $subscriptions; do\r\n\r\n        debug \"  =INFO=== Creating '${rules}' layout..\"\r\n        mkdir ${rules}\r\n\r\n        debug \"  =INFO=== Downloading adblock '${rules}' rules ..\"\r\n        wget --no-check-certificate -qO- https://easylist-downloads.adblockplus.org/${rules}.txt | sed -e 's/\\r//g;' -e '/Adblock/d;' -e '/.*\\$.*/d;' -e '/\\n/d;' -e '/.*\\#.*/d;' -e '/@@.*/d;' -e '/^!.*/d;' -e '/^\\[.*\\]$/d;' -e 's#http://#||#g;' -e 's/\\/\\//||/g;' -e 's,[+.?&/|],\\\\&,g;' -e 's/\\[/\\\\\\[/g;' -e 's/\\]/\\\\\\]/g;' -e 's#*#.*#g;' -e 's,\\$.*$,,g;' -e 's/\\\\|\\\\|\\(.*\\)\\^\\(.*\\)/\\.\\1\\\\\\/\\2/g;' -e 's/\\\\|\\\\|\\(.*\\)/\\.\\1/g;' -e '/^\\.\\*$/d;' -e '/^$/d;' > ${basedir}/blacklists/$rules/domains\r\n\r\n# check to make sure file is not zero sized\r\nif [ ! -s ${basedir}/blacklists/$rules/domains ]; then\r\n        debug \"  =ERROR=== Downloading adblock '${rules}' rules (failed)\"\r\n        syslog \"Downloading adblock '${rules}' rules (failed)\"\r\nfi\r\n\r\ndone\r\n```\r\np.s. subscruptions is just a space seperated list of easylist subscription names i.e. easylist easyprivacy\r\n\r\nHope this snipet gives you some ideas for future projects."}}