Opened on 02/19/2016 at 06:19:04 PM

Closed on 02/26/2016 at 04:28:57 PM

#3671 closed change (fixed)

[abp2blocklist] Turn the command line interface into an API

Reported by: kzar Assignee: kzar
Priority: P2 Milestone:
Module: Platform Keywords:
Cc: sebastian Blocked By:
Blocking: #3675, #3687 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by sebastian)


Currently we use abp2blocklist.js by calling it from the command line using node.js. The script then uses the node.js readline module to pipe the input, and when finished simply uses console.log to output the result. In the future, however, abp2blocklist won't always be used in a node.js environment and it won't always be used from the command line.

What to change

Separate the logic for converting the rules to produce the block list from the node.js specific command line interaction code.

Provide a module, which can be used in node.js and other JavaScript envrionments, that exposes an API to convert a sequence of Adblock Plus Filter instances to an array of WebKit blocking rules.

Modify the existing node.js script to make use of this API.

Attachments (0)

Change History (8)

comment:1 Changed on 02/19/2016 at 06:38:10 PM by sebastian

  • Description modified (diff)
  • Priority changed from Unknown to P3
  • Ready set
  • Summary changed from [abp2blocklist] Don't assume code is being called from node.js to [abp2blocklist] Turn the command line interface into an API

Thanks for bringing this up! Just recently, I thought myself about turning abp2blocklist more into an API. However, in particular considering how that code would be used in Adblock Plus for Safari, it makes more sense to have the API expect a sequence of parsed filters rather than plain text. I updated the description accordingly.

comment:2 Changed on 02/19/2016 at 07:13:03 PM by kzar

  • Owner set to kzar

comment:3 Changed on 02/20/2016 at 10:01:18 PM by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed on 02/21/2016 at 11:45:43 AM by kzar

  • Review URL(s) modified (diff)

comment:5 Changed on 02/21/2016 at 09:14:44 PM by sebastian

  • Blocking 3675 added

comment:6 Changed on 02/24/2016 at 01:27:19 AM by sebastian

  • Blocking 3687 added

comment:7 Changed on 02/24/2016 at 05:09:24 PM by sebastian

  • Priority changed from P3 to P2

Increasing priority, as it is blocking another P2 issue.

comment:8 Changed on 02/26/2016 at 04:28:57 PM by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from kzar.
Note: See TracTickets for help on using tickets.