npm.io
1.0.0 • Published 2 years agoCLI

mersul-microbuzelor

Licence
ISC
Version
1.0.0
Deps
3
Size
25 kB
Vulns
0
Weekly
0

katistix/mersul-microbuzelor

Get information about the bus schedule in Romania.

This project is inspired by IonicaBizau/mersul-trenurilor. And it uses @IonicaBizau's scrape-it module to scrape the data from autogari.ro.

Installation

You can install the package globally and use it as command line tool:

# Using npm
npm install -g mersul-microbuzelor

# Using yarn
yarn global add mersul-microbuzelor

Using it as a library

const mersulMicrobuzelor = require("mersul-microbuzelor");

mersulMicrobuzelor
    .getDepartures("Bucuresti", "Ploiesti", "2024-01-01")
    .then((data) => {
        console.log(data);
    });

This will output a list of departures from Bucuresti to Ploiesti on 2024-01-01 in the form of:

type DepartureOutput = {
    departure_time: string;
    arrival_time: string;
    price: string;
    company: string;
};

Support my projects

I love open source and I love programming. If you want to show your appreciation for my work, consider supporting me on Patreon or Ko-Fi. This way I can continue to create awesome projects and share them with everyone. Thank you!

Patreon Ko-Fi

Keywords