# build-source-text

> Collect a specified amount of plaintext from a language Wikipedia

Latest version **1.0.0** (published 2017-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install build-source-text
pnpm add build-source-text
yarn add build-source-text
bun add build-source-text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-12-09 |
| First published | 2017-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Nick Doiron |
| Maintainers | ndoiron |

## Links

- npm: https://www.npmjs.com/package/build-source-text
- Repository: https://github.com/mapmeld/build-source-text
- Homepage: https://github.com/mapmeld/build-source-text#readme
- Issues: https://github.com/mapmeld/build-source-text/issues
- npm.io page: https://npm.io/package/build-source-text

## Dependencies (2)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [request](https://npm.io/package/request.md) ^2.83.0

## Recent versions

- 1.0.0 (latest) — 2017-12-09

## README

# build-source-text

Node module to pull down *n* MB of plaintext from a language's Wikipedia for NLP/analysis.

Avoids duplicate articles, meta/category articles, additional links and templating, HTML, etc.

## Usage

```javascript
const builder = require('build-source-text');

let wiki = 'eo'; // Esperanto
let size = 10; // MB
let directory = './esperanto'; // existing directory output for articles

// starts on the main page and crawls links (most significant articles first)
builder.crawl(wiki, size, directory, (err) => {
  if (err) {
    throw err;
  }
  console.log('downloaded ' + size + 'MB from ' + wiki + '.wikipedia.org');
});

// uses random article
builder.random(wiki, size, directory, callback);
```

## License

Open source, MIT license

---
_Source: https://npm.io/package/build-source-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
