Skip to content

Sniadanie-z-Programowaniem/breakfast-md-parser

Repository files navigation

☕️ breakfast-md parser

Markdown parser for files containing data from "Śniadanie z Programowaniem" episodes. It aims to work only with this particular schema of .md files.

Data lives on this repo.

Installation

npm ci

Usage

Output JSON to terminal

npm start -- --dir ../path-to-sniadanie-links-dir

Save to file

npm start -- --dir ../path-to-sniadanie-links-dir --out result.json

Result

Example usage

$ npm start -- --dir ../sniadanie-z-programowaniem-front-end/ --out ./dist/result.json

> breakfast-md-parser@1.0.0 start
> ⠙ Processing ../sniadanie-z-programowaniem-front-end/ dir
> 🎉 Result saved to ./dist/result.json

Fragment of result JSON

[
    {
        "date": "2021-02-26T00:00:00.000Z",
        "number": 72,
        "type": "FRONTEND",
        "hosts": [
            {
                "name": "@michalczukm",
                "twitterHandler": "https://twitter.com/michalczukm"
            },
            {
                "name": "@mmiszy",
                "twitterHandler": "https://twitter.com/mmiszy"
            },
            {
                "name": "@cytrowski",
                "twitterHandler": "https://twitter.com/cytrowski"
            }
        ],
        "news": [
            {
                "title": "typeofweb/mostly-adequate-guide-polish",
                "description": "Mostly adequate guide to FP (in javascript). Contribute to typeofweb/mostly-adequate-guide-polish development by creating an account on GitHub.",
                "links": [
                    {
                        "url": "https://github.com/typeofweb/mostly-adequate-guide-polish/commits/master"
                    }
                ]
            },
            {
                "title": "Interaktywny słownik CSS",
                "description": "",
                "links": [
                    {
                        "url": "http://apps.workflower.fi/vocabs/css/en"
                    }
                ]
            }
            // ...
        ],
        "stream": {
            "url": "https://www.youtube.com/watch?v=IlVu4VEJQ_8"
        }
    }
    // ...
]

Help

npm start -- --help

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Prepare

npm ci

Will also setup git hooks.

Tests

Run them via:

npm run test

License

MIT

About

Markdown parser for files containing data from "Śniadanie z Programowaniem" episodes

Resources

Stars

Watchers

Forks

Languages