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

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

Closed
wants to merge 28 commits into from

Conversation

iam-py-test
Copy link
Collaborator

@iam-py-test iam-py-test commented Nov 6, 2021

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

@iam-py-test
Copy link
Collaborator Author

What just happened?

@iam-py-test iam-py-test restored the main branch November 6, 2021 20:46
@iam-py-test iam-py-test reopened this Nov 6, 2021
Copy link
Contributor

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct (can't say to much about the workflow). I'm not sure how strict you are about code styling, so fell free to ignore the suggestions below.

scripts/compile.py Outdated Show resolved Hide resolved
scripts/compile.py Outdated Show resolved Hide resolved
scripts/compile.py Show resolved Hide resolved
scripts/compile.py Show resolved Hide resolved
iam-py-test and others added 3 commits November 6, 2021 19:25
Fix the styling

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
@iam-py-test
Copy link
Collaborator Author

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

@rusty-snake
Copy link
Contributor

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

Absolutely, arkenfox/user.js#1263 (comment):

@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 ...

iam-py-test and others added 2 commits November 6, 2021 23:46
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
@DandelionSprout
Copy link
Owner

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.

Copy link
Contributor

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested try to generated the head.


ClearURLs Converter/generate_clearurlsubo.yml

The workflow must be in .github/workflows.

scripts/compile.py Show resolved Hide resolved
scripts/compile.py Outdated Show resolved Hide resolved
scripts/compile.py Show resolved Hide resolved
@iam-py-test
Copy link
Collaborator Author

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
Copy link
Owner

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
Copy link
Contributor

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

iam-py-test commented Nov 7, 2021

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
Copy link
Contributor

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 and others added 4 commits November 7, 2021 11:30
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
@iam-py-test
Copy link
Collaborator Author

iam-py-test commented Nov 7, 2021

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

@iam-py-test
Copy link
Collaborator Author

iam-py-test commented Nov 7, 2021

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
Copy link
Owner

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Ok. Closing this in favor of #327

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

Successfully merging this pull request may close these issues.

3 participants