# memparse

> A memrise course JSON dictionary parser

Latest version **0.1.3** (published 2016-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install memparse
pnpm add memparse
yarn add memparse
bun add memparse
```

Provides the command `memparse`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-11-01 |
| First published | 2016-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Vincas Stonys |
| Maintainers | vincaslt |
| Keywords | memrise |

## Links

- npm: https://www.npmjs.com/package/memparse
- Repository: https://github.com/vincaslt/memparse
- Homepage: https://github.com/vincaslt/memparse#readme
- Issues: https://github.com/vincaslt/memparse/issues
- npm.io page: https://npm.io/package/memparse

## Dependencies (7)

- [x-ray](https://npm.io/package/x-ray.md) ^2.3.1
- [eslint](https://npm.io/package/eslint.md) ^3.9.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [prettyjson](https://npm.io/package/prettyjson.md) ^1.1.3
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^3.3.0
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^6.2.1
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) ^2.0.1

## Recent versions

- 0.1.3 (latest) — 2016-11-01
- 0.1.2 — 2016-10-30
- 0.1.1 — 2016-10-30
- 0.1.0 — 2016-10-29

## README

# Memparse

[![Build Status](https://travis-ci.org/vincaslt/memparse.svg?branch=master)](https://travis-ci.org/vincaslt/memparse) [![Coverage Status](https://coveralls.io/repos/github/vincaslt/memparse/badge.svg?branch=master)](https://coveralls.io/github/vincaslt/memparse?branch=master)

Memparse is a [Memrise](http://www.memrise.com) course parser.
It can be used from the command line or from a function in a Node.js project.

### CLI usage

First, globally install memparse: `npm i --save -g memparse`

```
memparse <courseId> [--file <output-file>]

  courseId - required course id, i.e. http://www.memrise.com/course/<courseId>
  --f, -f  - optional file name to write the output to,
             if none is provided it will be printed to the console
```

Output format to file is JSON, to console - prettified JSON.

Example command: `memparse 1098046 -f output.json` - will write [this course](http://www.memrise.com/course/1098046/spanish-spain-4/) to output.json:
```
{
  "course": "Spanish (Spain) 4",
  "levels": [
    {
      "name": "Relax with the Crew",
      "words": [
        {
          "word": "emocionante",
          "meaning": "exciting"
        },
      ...
    },
    ...
  ]
}
```
### Node.js usage

Install memparse to node_modules: `npm i --save memparse`

### Example

```
const memparse = require('memparse')(1098046)
memparse.parse()
  .then(json => console.log(json.levels[0].words[0]))
```

Output: `{ "word": "emocionante", "meaning": "exciting" }`

### API

* `require('memparse')` - returns memparse initializer, which requires `courseId` parameter.

* `memparse.parse()` - returns ES6 `Promise`, which eventually returns JSON array

* `memparse.xrayParse()` returns [Xray](https://github.com/lapwinglabs/x-ray) object

* `memparse.BASE_URL` - url constant which is being used to access memrise course, currently: `http://www.memrise.com/course`

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