DandelionSprout / adfilt

The place where I, DandelionSprout, store my web filter lists for countless topics, including my Nordic adblock list. As simple as that, really.
Other
1.3k stars 143 forks source link

Automating the creation of the uBlock Origin version of the ClearURLs list #326

Closed iam-py-test closed 2 years ago

iam-py-test commented 2 years ago

It creates a PR, but I can have it just push to the repo CCing @rusty-snake @DandelionSprout

iam-py-test commented 2 years ago

What just happened?

iam-py-test commented 2 years ago

I assume that you are ok with me copying your code?

rusty-snake commented 2 years ago

I assume that you are ok with me copying your code?

Absolutely, https://github.com/arkenfox/user.js/issues/1263#issuecomment-949932313:

@crssi Currently I'm not planing to publish it anywhere (and will delete the gist sooner or later). But if anyone uses it as a start, fixes the last bugs, implements exceptions and sets up a github actions which periodically (e.g. weekly) runs it ...

DandelionSprout commented 2 years ago

Okay, so I feel like this is proceeding way too fast, to the point I feel I'm beginning to lose control of the situation.

Off the top of my head, one option I'd be more comfortable with, would be if it was possible to place the three files in the same folder, so their filepaths become e.g. ClearURLs Converter/generate_clearurlsubo.yml, ClearURLs Converter/compile.py, and ClearURLs Converter/clear_urls_uboified.txt.

I also think the metadata of clear_urls_uboified.txt would need to be re-instated in some form.

iam-py-test commented 2 years ago

Okay, so I feel like this is proceeding way too fast, to the point I feel I'm beginning to lose control of the situation.

Off the top of my head, one option I'd be more comfortable with, would be if it was possible to place the three files in the same folder, so their filepaths become e.g. ClearURLs Converter/generate_clearurlsubo.yml, ClearURLs Converter/compile.py, and ClearURLs Converter/clear_urls_uboified.txt.

The YML can’t be in the same folder, it has to be in the .github/workflows folder. I could put both the script and output in a new folder, but that would break it for anyone who used the list. Maybe the script should go in the folder with the output like the alternate versions of the antimalware list

I also think the metadata of clear_urls_uboified.txt would need to be re-instated in some form.

I’m working on that, it just was late yesterday so I had to stop & continue today

DandelionSprout commented 2 years ago

The YML can’t be in the same folder, it has to be in the .github/workflows folder.

Fair point. I thus give my approval to keeping it in .github/workflows. ————————

I could put both the script and output in a new folder, but that would break it for anyone who used the list

Since the list is currently not listed on FilterLists.com, I presume we can change its folder and thus URL this time around.

rusty-snake commented 2 years ago

I could put both the script and output in a new folder, but that would break it for anyone who used the list

https://help.eyeo.com/adblockplus/how-to-write-filters

! Redirect: http://example.com/list.txt - This comment indicates that the filter list has moved to a new download address. Adblock Plus ignores any file content beyond that comment and immediately tries downloading from the new address. In case of success, the address of the filter list is updated in the settings. This comment is ignored if the new address is the same as the current address, meaning that it can be used to enforce the "canonical" address of the filter list.

Does anyone know if this this is supported by µBlock origin?

iam-py-test commented 2 years ago

The YML can’t be in the same folder, it has to be in the .github/workflows folder.

Fair point. I thus give my approval to keeping it in .github/workflows. ————————

I could put both the script and output in a new folder, but that would break it for anyone who used the list

Since the list is currently not listed on FilterLists.com, I presume we can change its folder and thus URL this time around.

To my knowledge, the only people who have subscribed to it is me, @kah0922, and maybe @rusty-snake So do you think the folder should be called something like ClearURLs for uBo?

iam-py-test commented 2 years ago

I could put both the script and output in a new folder, but that would break it for anyone who used the list

https://help.eyeo.com/adblockplus/how-to-write-filters

! Redirect: http://example.com/list.txt - This comment indicates that the filter list has moved to a new download address. Adblock Plus ignores any file content beyond that comment and immediately tries downloading from the new address. In case of success, the address of the filter list is updated in the settings. This comment is ignored if the new address is the same as the current address, meaning that it can be used to enforce the "canonical" address of the filter list.

Does anyone know if this this is supported by µBlock origin?

No: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/SyntaxMeaningsThatAreActuallyHumanReadable.md#adblock-plus-and-adblock-only I'm assuming it was never supported for security reasons, or just because there never was a use

We could make a post on #163 though

rusty-snake commented 2 years ago

We could make a post on #163 though

If people are aware of the list, they probably read in #163. So yes.

iam-py-test commented 2 years ago

@DandelionSprout would you rather a PR or just a direct commit

iam-py-test commented 2 years ago

Weirdly, some commits appear in one branch and others in another I think it is because this repo uses master as the main branch, while GitHub gives new repos the default branch of main

DandelionSprout commented 2 years ago

would you rather a PR or just a direct commit

PR, mostly because I need to handle vacuum cleaning and similar cleaning before I can tend to this in detail.

iam-py-test commented 2 years ago

would you rather a PR or just a direct commit

PR, mostly because I need to handle vacuum cleaning and similar cleaning before I can tend to this in detail.

Ok. I think I need to close this PR and open a new one, because GH is making it impossible to use this one

iam-py-test commented 2 years ago

Ok. Closing this in favor of #327