{"id":19361612,"url":"https://github.com/bluelovers/node-ck2","last_synced_at":"2025-06-10T09:04:02.309Z","repository":{"id":57199148,"uuid":"83528020","full_name":"bluelovers/node-ck2","owner":"bluelovers","description":"GFX game configuration format parser. Crusader Kings II | Paradox Interactive","archived":false,"fork":false,"pushed_at":"2018-10-28T07:49:01.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T07:15:34.874Z","etag":null,"topics":["config","configuration","crusader-kings-ii","game","gfx","paradox-interactive"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bluelovers.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}},"created_at":"2017-03-01T07:57:35.000Z","updated_at":"2022-08-13T20:29:56.000Z","dependencies_parsed_at":"2022-09-16T15:01:38.459Z","dependency_job_id":null,"html_url":"https://github.com/bluelovers/node-ck2","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/bluelovers%2Fnode-ck2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fnode-ck2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fnode-ck2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fnode-ck2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluelovers","download_url":"https://codeload.github.com/bluelovers/node-ck2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelovers%2Fnode-ck2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259043761,"owners_count":22797159,"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":["config","configuration","crusader-kings-ii","game","gfx","paradox-interactive"],"created_at":"2024-11-10T07:24:11.310Z","updated_at":"2025-06-10T09:04:02.288Z","avatar_url":"https://github.com/bluelovers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-ck2\r\n\r\nGFX game configuration format parser. Crusader Kings II | Paradox Interactive\r\n\r\n`npm install ck2`\r\n\r\nthis version is very stupid and slow, wellcome rewrite code\r\n\r\n```typescript\r\n\r\nconst ck2 = require('ck2');\r\nconst assert = require('assert');\r\n\r\nlet options = {\r\n\t//pretty: false,\r\n\tcomment: false,\r\n\tpretty: true,\r\n\t//pretty: false,\r\n\tprint_length: 50,\r\n};\r\n\r\nlet input = `\r\n##########remedy_fe_swapping6##########\r\nfe131  = { random = no customizer = no hidden = yes } #辛格尔德\r\nfe132  = { random = no customizer = no hidden = yes } #艾丝琳\r\nfe133  = { random = no customizer = no hidden = yes } #亚斯穆尔\r\nfe134  = { random = no customizer = no hidden = yes } #克尔特\r\nfe135  = { random = no customizer = no hidden = yes }\t#拜隆\r\nfe136  = { random = no customizer = no hidden = yes }\t#林格\r\nfe137  = { random = no customizer = no hidden = yes }\t#雷普托尔\r\nfe138  = { random = no customizer = no hidden = yes }\t#兰格巴鲁特\r\n\r\nloputousu = {\r\n\t\tgraphical_culture = westerngfx\r\n\t\tgraphical_unit_culture = western\r\n\t\t\r\n\t\tcolor = { 1.0 0.0 0.0 }\r\n\t\t\r\n\t\t# ?222 ?254 ?208 ?240 ?\r\n\t\t}\r\n`;\r\n\r\nlet data = ck2.parse(input, options);\r\nlet output = ck2.stringify(data, options);\r\nlet data2 = ck2.parse(output, options);\r\n\r\nconsole.log(data);\r\n\r\nassert.deepEqual(data, data2);\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelovers%2Fnode-ck2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluelovers%2Fnode-ck2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelovers%2Fnode-ck2/lists"}