{"id":13621628,"url":"https://github.com/bingsoo420/4ch-general","last_synced_at":"2025-04-15T01:33:26.057Z","repository":{"id":115446501,"uuid":"607392789","full_name":"bingsoo420/4ch-general","owner":"bingsoo420","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-09T18:17:22.000Z","size":1882,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T19:27:45.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bingsoo420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T22:11:26.000Z","updated_at":"2025-04-09T18:17:31.000Z","dependencies_parsed_at":"2024-04-15T04:40:54.744Z","dependency_job_id":"6ab3ab19-fb8f-46cd-b4c7-7e6681834a3a","html_url":"https://github.com/bingsoo420/4ch-general","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingsoo420%2F4ch-general","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingsoo420%2F4ch-general/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingsoo420%2F4ch-general/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingsoo420%2F4ch-general/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bingsoo420","download_url":"https://codeload.github.com/bingsoo420/4ch-general/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248989430,"owners_count":21194585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:08.825Z","updated_at":"2025-04-15T01:33:25.754Z","avatar_url":"https://github.com/bingsoo420.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# 4chan General [![Go](https://github.com/bingsoo420/4ch-general/actions/workflows/go.yml/badge.svg)](https://github.com/bingsoo420/4ch-general/actions/workflows/go.yml)\n\n## What is this?\n\nThe repo contains a self-updating bot running on a 6 hourly CRON job to build\nboard general to it's correct thread location.\n\nExample payload\n\n```json\n{\n  \"g\": {\n    \"wdg\": \"https://boards.4chan.org/g/thread/91798719\"\n  }\n}\n```\n\nThe access patterns will always remain as `board.general`, currently the only\nboards being scraped are\n\n- fit\n- g\n- biz\n\nWhich can be modified in `main.go` file\n\n## How do I use?\n\n### As a source of truth\n\nAs a bash script\n\n```sh\ncurl https://raw.githubusercontent.com/bingsoo420/4ch-general/master/output/mappings.json | jq .g.wdg\n```\n\nAs a simple JavaScript fetch request\n\n```js\nfetch(\n  \"https://raw.githubusercontent.com/bingsoo420/4ch-general/master/output/mappings.json\"\n)\n  .then((r) =\u003e r.json())\n  .then((r) =\u003e {\n    if (r.g?.wdg) {\n      window.location.href = r.g.wdg;\n    }\n  });\n```\n\nThe source of truth will refresh every 6 hours. Files may be updated to be\ngranular later as `output/g.json` or `output/fit.json` if the 6 hours interval\nwas found to be too little for certain boards.\n\n### As a program\n\n```sh\ngit clone https://github.com/bingsoo420/4ch-general\ncd 4ch-general\ngo run ./\n```\n\nSee the output JSON file in `output/mappings.json`\n\n### As a fork\n\nSet up a personal access token in GitHub by visiting\n\n`Profile / Settings / Developer settings / Personal access tokens / Fine-grained tokens / generate new token`\n\nSet the token's permission to have read/write to `Contents`\n\nCopy the output and put that into your forked repo settings\n\n`Repo / Settings / Secrets and variables / Actions / New repository secret`\n\nAdd your access token with the name `PAT` and the value is your copied token.\n\nAdd your email with the name `EMAIL` and the value is your GitHub account email.\n\nSet workflow permission to have read/write permissions\n\n`Repo / Settings / Actions / General / Workflow Permissions / Read and Write Permissions`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingsoo420%2F4ch-general","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbingsoo420%2F4ch-general","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingsoo420%2F4ch-general/lists"}