Skip to content

A scrapper to get verbs and their conjugations in all tenses from bab.la.

Notifications You must be signed in to change notification settings

ThamosIO/language-verb-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Install

First and foremost, install direnv.

# macOS
$ brew install direnv

# Debian-like
$ apt install direnv

Then :

$ direnv allow

Install npm modules :

$ npm i

Configuration

You should set in your .envrc the language configuration you're looking for.

This consists of three variables LANG, CONJUGATION, LANGUAGE which will be used to build the URL used for the scrapping.

A few examples :

# French to Italian

export LANG=fr
export CONJUGATION=conjugaison
export LANGUAGE=italien
# English to French

export LANG=en
export CONJUGATION=conjugation
export LANGUAGE=french

The next step is set the verbs you want to scrap, this is done in verbs.json at the root.

Simply put them as an array of strings in the language you're trying to learn (should be the same as LANGUAGE),

["stare", "mangiare", "bere", "essere"]

Scrapping the data

Once everything is set up, you can start the scrapping using npm start.

This will create a json file scrapped-verbs.json.

Changing the format of data

If the format of the verbs is not to your liking, you can set the fields and the way you scrap them in constants.js.

About

A scrapper to get verbs and their conjugations in all tenses from bab.la.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published