Changes between Initial Version and Version 5 of Ticket #7371


Ignore:
Timestamp:
03/28/2019 10:06:43 PM (18 months ago)
Author:
tlucas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7371

    • Property Owner set to tlucas
    • Property Cc greiner hfiguiere added
    • Property Blocking changed from 7360 to 7338, 7360
  • Ticket #7371 – Description

    initial v5  
    11=== Background === 
    22 
    3 Currently, `chrome/content/ui/subscriptions.xml` in `adblockpluscore` is generated by `sitescripts/subscriptions/bin/processTemplate.py` in `sitescripts`. This should rather be done by an `npm` script within `adblockpluscore`. Also we should rather use JSON (than XML), as it can be parsed more easily, in particular in manifest V3 background pages which no longer have access to `DOMParser`. 
     3Currently, `chrome/content/ui/subscriptions.xml` in `adblockpluscore` is generated by `sitescripts/subscriptions/bin/processTemplate.py` in `sitescripts`.  
     4 
     5For this one needed a `sitescripts.ini` with at least the following content: 
     6 
     7{{{ 
     8[subscriptions] 
     9recommendationsTemplate=subscriptions/template/recommendations.xml 
     10repository=<subscriptionlist repository path> 
     11}}} 
     12 
     13, run the command  
     14 
     15{{{ 
     16$ python -m sitescripts.subscriptions.bin.processTemplate recommendations subscriptions.xml 
     17}}} 
     18 
     19and finally copy the resulting `subscriptions.xml` to it's designated location. 
     20 
     21This should rather be done by an `npm` script within `adblockpluscore`. Also we should rather use JSON (than XML), as it can be parsed more easily, in particular in manifest V3 background pages which no longer have access to `DOMParser`. 
    422 
    523=== What to change === 
    624In `adblockpluscore`, add a script to the `build/` folder and configure it as script in `package.json`, that generates `data/subscriptions.json` from the contents of https://hg.adblockplus.org/subscriptionlist, including the same metadata provided in `chrome/content/ui/subscriptions.xml` but in JSON format. 
     25 
     26The script should be called as follows: 
     27 
     28{{{ 
     29$ npm run generate-recommended-subscriptions <subscriptionlist repository location> 
     30}}}