{"id":25940707,"url":"https://github.com/2003scape/rsc-censor","last_synced_at":"2025-03-04T05:18:35.865Z","repository":{"id":57093534,"uuid":"230518036","full_name":"2003scape/rsc-censor","owner":"2003scape","description":"🤬 runescape classic chat censor and cache modification","archived":false,"fork":false,"pushed_at":"2021-03-31T09:57:49.000Z","size":56,"stargazers_count":8,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T14:03:06.336Z","etag":null,"topics":["censor","chat-filter","profanity","rsc","runescape"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2003scape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-27T21:03:10.000Z","updated_at":"2024-07-09T09:50:48.000Z","dependencies_parsed_at":"2022-08-22T21:40:16.804Z","dependency_job_id":null,"html_url":"https://github.com/2003scape/rsc-censor","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/2003scape%2Frsc-censor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-censor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-censor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-censor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003scape","download_url":"https://codeload.github.com/2003scape/rsc-censor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787647,"owners_count":20020133,"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":["censor","chat-filter","profanity","rsc","runescape"],"created_at":"2025-03-04T05:18:35.431Z","updated_at":"2025-03-04T05:18:35.855Z","avatar_url":"https://github.com/2003scape.png","language":"JavaScript","readme":"# rsc-censor\nrunescape classic chat censor and cache modification. this censor is\nsemi-intelligent and can detect similar looking symbols and spacing.\n\n## install\n\n    $ npm install @2003scape/rsc-censor # -g for CLI program\n\n## cli usage\n```\nrsc-censor \u003ccommand\u003e\n\nCommands:\n  rsc-censor censor \u003carchive\u003e \u003cmessage\u003e     censor message using filters in\n                                            archive\n  rsc-censor dump-json \u003carchive\u003e            dump JSON files of each censor\n                                            section\n  rsc-censor pack-json \u003carchive\u003e \u003cfiles..\u003e  encode and compress JSON files into\n                                            filter archive\n\nOptions:\n  --help     Show help                                                 [boolean]\n  --version  Show version number                                       [boolean]\n```\n\n\t$ rsc-censor censor filter2.jag \"you suck\"\n\n## example\n```javascript\nconst Censor = require('./src');\nconst fs = require('fs');\n\nconst censor = new Censor();\ncensor.loadArchive(fs.readFileSync('./filter2.jag'));\n\nconsole.log(censor.censorMessage('hey you suck! visit dogs.com'))\n// hey you ****! visit ********\n\ncensor.badWords = censor.badWords.filter(({ word }) =\u003e !/suc/i.test(word));\ncensor.populateBuffers();\n\nconsole.log(censor.censorMessage('hey you suck! visit dogs.com'))\n// hey you suck! visit ********\n\nfs.writeFileSync('./filter3.jag', censor.toArchive());\n```\n\n## api\n### censor = new Censor()\ncreate a new censor instance.\n\n### censor.badWords\narray of profanities.\n\n```javascript\n[\n    {\n        word: 'breast',\n        // this allows \"abreast\" and \"breastplate\", but not \"breast\"\n        ignore: [\n            {\n                prefix: 'a',\n                postfix: null\n            },\n            {\n                prefix: null,\n                postfix: 'p'\n            }\n        ]\n    }\n]\n```\n\n### censor.hosts\narray of webiste [hostnames](https://en.wikipedia.org/wiki/Hostname).\n\n```javascript\n[\n    {\n        word: 'aol',\n        // allows for \"gaols\" but not \"go aol\"\n        ignore: [\n            {\n                prefix: 'g',\n                postfix: 's'\n            }\n            // ...\n        ]\n    }\n]\n```\n\n### censor.tlds\narray of [TLDs](https://en.wikipedia.org/wiki/Top-level_domain).\n\n```javascript\n[\n    {\n        word: 'com',\n        type: 3\n    }\n]\n```\n\n### censor.fragments\narray of word fragments. these seem to be used to fix the censor when it's\n[greedy](https://en.wikipedia.org/wiki/Regular_expression#Lazy_matching) and\nasterisks too many characters.\n\n### censor.loadArchive(buffer)\nload a filter jag archive buffer.\n\n### censor.populateBuffers()\napply changes to internal properties to the filter instance.\n\n### censor.censorMessage(message)\nreturn a censored string.\n\n### censor.toArchive()\nreturn a filter jag archive.\n\n## license\nCopyright 2019  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see http://www.gnu.org/licenses/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-censor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003scape%2Frsc-censor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-censor/lists"}