{"id":18645519,"url":"https://github.com/cscott/mw-ocg-texter","last_synced_at":"2025-11-05T03:30:31.989Z","repository":{"id":21375274,"uuid":"24692648","full_name":"cscott/mw-ocg-texter","owner":"cscott","description":"Convert mediawiki collection bundles to stripped plaintext.","archived":false,"fork":false,"pushed_at":"2015-09-26T18:45:57.000Z","size":12676,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T11:42:38.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.mediawiki.org/wiki/Offline_content_generator","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/cscott.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-10-01T19:42:03.000Z","updated_at":"2018-09-22T20:53:47.000Z","dependencies_parsed_at":"2022-07-30T03:47:58.456Z","dependency_job_id":null,"html_url":"https://github.com/cscott/mw-ocg-texter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cscott%2Fmw-ocg-texter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cscott%2Fmw-ocg-texter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cscott%2Fmw-ocg-texter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cscott%2Fmw-ocg-texter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cscott","download_url":"https://codeload.github.com/cscott/mw-ocg-texter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449567,"owners_count":19640533,"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-11-07T06:16:18.814Z","updated_at":"2025-02-18T09:46:34.382Z","avatar_url":"https://github.com/cscott.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mw-ocg-texter\n[![NPM][NPM1]][NPM2]\n\n[![Build Status][1]][2] [![dependency status][3]][4] [![dev dependency status][5]][6]\n\nConverts mediawiki collection bundles (as generated by [mw-ocg-bundler]) to\nstripped plaintext.\n\nThis is a proof-of-concept, but it could be used to archive or embed the\ntextual content of wikipedia in a minimal amount of space.\n\n## Installation\n\nNode version 0.8 and 0.10 are tested to work.\n\nInstall the node package dependencies.\n```\nnpm install\n```\n\nInstall other system dependencies.\n```\napt-get install unzip\n```\n\n## Generating bundles\n\nYou may wish to install the [mw-ocg-bundler] npm package to create bundles\nfrom wikipedia articles.  The below text assumes that you have done\nso; ignore the `mw-ocg-bundler` references if you have bundles from\nsome other source.\n\n## Running\n\nTo generate a plaintext file named `out.txt` from the `en.wikipedia.org` article\n\"United States\":\n```\n$SOMEPATH/bin/mw-ocg-bundler -v -o us.zip -h en.wikipedia.org \"United States\"\nbin/mw-ocg-texter -o out.txt us.zip\n```\n\nIn the above command `$SOMEPATH` is the place you installed\n`mw-ocg-bundler`; if you've used the directory structure recommended\nby `mw-ocg-service` this will be `../mw-ocg-bundler`.\n\nThe default format does 80-column word wrap.  If you would like to\nuse \"semantic\" new lines (that is, newlines end paragraphs and there\nare no newlines within paragraphs) use the `--no-wrap`\noption:\n```\nbin/mw-ocg-texter --no-wrap -o out.txt us.zip\n```\n\nFor other options, see:\n```\nbin/mw-ocg-texter --help\n```\n\n## Standalone mode\nTo convert a single article without the bundle creation step, use:\n```\nbin/mw-ocg-texter -h en.wikipedia.org -t \"United States\"\n```\nThe `-h` option specifies the hostname of the wiki, and the `-t`\noption gives the title to convert.  The content will be fetched\nfrom the Wikimedia REST API and converted, with output to standard\nout (unless the `-o` option is given).\n\n## Other ideas\nThis backend should implement the [Unicode Nearly Plain-Text Encoding of\nMathematics](http://unicode.org/notes/tn28/UTN28-PlainTextMath-v3.pdf)\nto render math content.\n\n## Related Projects\n\n* [mw-ocg-bundler][]\n* [mw-ocg-latexer][]\n\n## License\n\nGPLv2\n\n(c) 2013-2014 by C. Scott Ananian\n\n[mw-ocg-bundler]: https://github.com/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-bundler\n[mw-ocg-latexer]: https://github.com/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-latex_renderer\n\n[NPM1]: https://nodei.co/npm/mw-ocg-texter.png\n[NPM2]: https://nodei.co/npm/mw-ocg-texter/\n\n[1]: https://travis-ci.org/cscott/mw-ocg-texter.svg\n[2]: https://travis-ci.org/cscott/mw-ocg-texter\n[3]: https://david-dm.org/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-text_renderer.svg\n[4]: https://david-dm.org/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-text_renderer\n[5]: https://david-dm.org/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-text_renderer/dev-status.svg\n[6]: https://david-dm.org/wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-text_renderer#info=devDependencies\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcscott%2Fmw-ocg-texter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcscott%2Fmw-ocg-texter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcscott%2Fmw-ocg-texter/lists"}