Skip to content

Checks a named board for general threads and compiles the thread urls into a json file

Notifications You must be signed in to change notification settings

acebos/4ch-gen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4chan General Go

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.

Usage

As a bash script

curl https://raw.githubusercontent.com/fluteds/4ch-gen/master/output/mappings.json | jq .g.wdg

As a simple JavaScript fetch request

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.

As a program

git clone
cd 4ch-general
go run ./

See the output JSON file in output/mappings.json

As a fork

  • 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 called PAT. 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.

About

Checks a named board for general threads and compiles the thread urls into a json file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • Go 100.0%