This package has been deprecated

Author message:

replaced by @tricoteuses/arbre-de-la-loi

@tricoteuses/dossiers-legislatifs
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

Tricoteuses-Dossiers-Législatifs

Generate Git repositories for the bills of the French Parliament

Installation

git clone https://git.en-root.org/tricoteuses/tricoteuses-dossiers-legislatifs
cd tricoteuses-dossiers-legislatifs/

Create a .env file to set PostgreSQL database informations and other configuration variables (you can use example.env as a template). Then

npm install

Usage

Bills retrieval

Retrieve bills source HTML pages; store them into Git repositories; push them to (existing or new) GitLab projects.

npx babel-node --extensions ".ts" -- src/scripts/fetch_original_pages.ts --dossier energie_climat --commit --push ../dossiers-legislatifs

Bills to Markdown conversion

Convert HTML pages of a bill to Markdown:

npx babel-node --extensions ".ts" -- src/scripts/convert_bill_pages_to_markdown.ts --commit --push ../dossiers-legislatifs/R5L15/energie_climat/

Merge restructured Markdown into "edition" branch (aka the branch edited by users):

npx babel-node --extensions ".ts" -- src/scripts/generate_bill_edition_branch.ts --push ../dossiers-legislatifs/R5L15/energie_climat

Retrieve versions of "texte de loi" in "edition" branch and commit them chronologically in "master" branch:

npx babel-node --extensions ".ts" -- src/scripts/generate_bill_master_branch.ts --push ../dossiers-legislatifs/R5L15/energie_climat

Sample commands

npx babel-node --extensions ".ts" -- src/scripts/fetch_original_pages.ts --commit --dossier energie_climat ../dossiers-legislatifs
npx babel-node --extensions ".ts" -- src/scripts/convert_bill_pages_to_markdown.ts --commit ../dossiers-legislatifs/R5L15/energie_climat/
npx babel-node --extensions ".ts" -- src/scripts/generate_bill_edition_branch.ts ../dossiers-legislatifs/R5L15/energie_climat
npx babel-node --extensions ".ts" -- src/scripts/generate_bill_master_branch.ts ../dossiers-legislatifs/R5L15/energie_climat

npx babel-node --extensions ".ts" -- src/scripts/fetch_original_pages.ts --commit --dossier plfss_2021 ../dossiers-legislatifs
npx babel-node --extensions ".ts" -- src/scripts/convert_bill_pages_to_markdown.ts --commit ../dossiers-legislatifs/R5L15/plfss_2021/
npx babel-node --extensions ".ts" -- src/scripts/generate_bill_edition_branch.ts ../dossiers-legislatifs/R5L15/plfss_2021
npx babel-node --extensions ".ts" -- src/scripts/generate_bill_master_branch.ts ../dossiers-legislatifs/R5L15/plfss_2021

/@tricoteuses/dossiers-legislatifs/

    Package Sidebar

    Install

    npm i @tricoteuses/dossiers-legislatifs

    Weekly Downloads

    2

    Version

    0.3.2

    License

    AGPL-3.0-or-later

    Unpacked Size

    862 kB

    Total Files

    72

    Last publish

    Collaborators

    • eraviart