bad-websites icon indicating copy to clipboard operation
bad-websites copied to clipboard

Use a GitHub action to make Websites.json

Open SpiderMath opened this issue 4 years ago • 13 comments

The websites.json file needs to be autogenerated, now that it has been separated into categories. And as far as I can see on the website, there is nothing to automate the process, which leaves room for human errors. So I'd request using a GitHub action to automate the process of making Websites.json.

SpiderMath avatar Oct 27 '21 03:10 SpiderMath

Could you explain me a little bit how does it work? I don’t usually use github actions

elbkr avatar Oct 27 '21 21:10 elbkr

Its possible to make Workflows using JavaScript.

You can basically loop through all the directories and read their jsons. And then take all the arrays and merge them into a single one, which is written into websites.json & committed (so that websites.json is actually changed for all of us, else it won't be useful)

SpiderMath avatar Oct 30 '21 06:10 SpiderMath

So only change the files that are inside separated folder?

elbkr avatar Oct 30 '21 14:10 elbkr

Could you make it an open a pull request?

elbkr avatar Oct 30 '21 15:10 elbkr

That's possible too There's already stuff doing that in the github action marketplace

SpiderMath avatar Nov 01 '21 10:11 SpiderMath

And about changing stuff in separated folder, its up to you how to want to use it You could also go through the content in separated folders and combine all those arrays into websites.json as well :shrug:

SpiderMath avatar Nov 01 '21 10:11 SpiderMath

I was trying to make an action, but it didn't work :/

elbkr avatar Nov 05 '21 20:11 elbkr

Then may I try to make an Action? (I will do it on a separate repo and if I fail I'll let you know)

SpiderMath avatar Nov 06 '21 11:11 SpiderMath

Oh ok! you can also fork the repo and make your tests, so you can see if it works with the files structure

elbkr avatar Nov 06 '21 11:11 elbkr

@elbkr why don't you make a ML that recognises bad links and makes a PR or just pushes stuff into the files so you don't need to update manually I can make a discord bot if you like it

r-rajaneesh avatar Nov 06 '21 12:11 r-rajaneesh

but how would it recognize bad links that aren't in this list? I mean, I used it for a bot who recognizes bad url in messages, but only from this list

elbkr avatar Nov 06 '21 12:11 elbkr

add me in discord so we can talk better: https://discord.com/users/521311050193436682

elbkr avatar Nov 06 '21 12:11 elbkr

#25 adds GitHub Action

techguy16 avatar Mar 27 '24 04:03 techguy16