Self-updating bot running on a 6 hourly CRON job to match board generals to it's correct thread location. Forked from Bingosss420.
Example
{
"g": {
"wdg": "https://boards.4chan.org/g/thread/91798719"
}
}
The access patterns will always remain as board.general
, currently the only boards being scraped are:
- fit
- g
- biz
- ck
- vg
- vr
Which can be modified in main.go
file.
curl https://raw.githubusercontent.com/fluteds/4ch-gen/master/output/mappings.json | jq .g.wdg
fetch(
"https://raw.githubusercontent.com/fluteds/4ch-gen/master/output/mappings.json"
)
.then((r) => r.json())
.then((r) => {
if (r.g?.wdg) {
window.location.href = r.g.wdg;
}
});
The source will refresh every 6 hours. Files may be updated to be granular later as output/g.json
or output/fit.json
if the 6 hours interval was found to be too little for certain boards.
git clone
cd 4ch-general
go run ./
See the output JSON file in output/mappings.json
-
Set your repo's workflow settings to have read/write permissions.
Repo / Settings / Actions / General / Workflow Permissions / Read and Write Permissions
-
Set up a fine grained personal access token in GitHub by visiting
Profile / Settings / Developer settings / Personal access tokens / Fine-grained tokens / Generate new token
-
Set the token's permission to read/write under
Contents
. Copy the access token output and put that into a secret calledPAT
.Repo / Settings / Secrets and variables / Actions / New repository secret
-
Add another secret with the name being
EMAIL
and the value being your GitHub account email address. This is to sign off commits.