# `catleg` Helper tools for querying French legislative texts **Usage**: ```console $ catleg [OPTIONS] COMMAND [ARGS]... ``` **Options**: * `--help`: Show this message and exit. **Commands**: * `article`: Output an article. * `diff`: Show differences between each article in a... * `check-expiry`: Check articles in a catala file for expiry. * `skeleton`: Output a Markdown-formatted rendering of a... * `jorf`: Output a markdown-formatted Journal... * `lf`: Commands for querying the raw Legifrance API ## `catleg article` Output an article. By default, outputs markdown-formatted text. **Usage**: ```console $ catleg article [OPTIONS] AID_OR_URL ``` **Arguments**: * `AID_OR_URL`: An article ID or Legifrance URL, for instance `LEGIARTI000033971416` or `https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033971416`. [required] **Options**: * `--nb / --no-nb`: If specified, do not print breadcrumbs (table of contents headers) [default: no-nb] * `--help`: Show this message and exit. ## `catleg diff` Show differences between each article in a catala file and a reference version. **Usage**: ```console $ catleg diff [OPTIONS] FILE ``` **Arguments**: * `FILE`: [required] **Options**: * `--help`: Show this message and exit. ## `catleg check-expiry` Check articles in a catala file for expiry. **Usage**: ```console $ catleg check-expiry [OPTIONS] FILE ``` **Arguments**: * `FILE`: [required] **Options**: * `--help`: Show this message and exit. ## `catleg skeleton` Output a Markdown-formatted rendering of a section of a law text. **Usage**: ```console $ catleg skeleton [OPTIONS] URL_OR_TEXTID [SECTIONID] ``` **Arguments**: * `URL_OR_TEXTID`: A text ID or text section URL such as `LEGITEXT000006069577` or `https://www.legifrance.gouv.fr/codes/section_lc/LEGITEXT000006069577/LEGISCTA000006191575/` [required] * `[SECTIONID]`: A section ID such as `LEGISCTA000006191575`. If not provided, `url_or_textid` must be a URL containing a text ID and a section ID. **Options**: * `--help`: Show this message and exit. ## `catleg jorf` Output a markdown-formatted Journal Officiel text (JORFTEXT) **Usage**: ```console $ catleg jorf [OPTIONS] JORFTEXTID ``` **Arguments**: * `JORFTEXTID`: [required] **Options**: * `--help`: Show this message and exit. ## `catleg lf` Commands for querying the raw Legifrance API **Usage**: ```console $ catleg lf [OPTIONS] COMMAND [ARGS]... ``` **Options**: * `--help`: Show this message and exit. **Commands**: * `article`: Retrieve an article from Legifrance. * `codes`: Retrieve a JSON list of available codes. * `toc`: Retrieve the JSON table of contents for a... * `jorf`: Retrieve the JSON contents of a JORF... * `legi`: Retrieve the JSON contents of a LEGI text ### `catleg lf article` Retrieve an article from Legifrance. Outputs the raw Legifrance JSON representation. **Usage**: ```console $ catleg lf article [OPTIONS] AID_OR_URL ``` **Arguments**: * `AID_OR_URL`: An article ID or Legifrance URL, for instance `LEGIARTI000033971416` or `https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033971416`. [required] **Options**: * `--help`: Show this message and exit. ### `catleg lf codes` Retrieve a JSON list of available codes. **Usage**: ```console $ catleg lf codes [OPTIONS] ``` **Options**: * `--help`: Show this message and exit. ### `catleg lf toc` Retrieve the JSON table of contents for a given code. **Usage**: ```console $ catleg lf toc [OPTIONS] CODE ``` **Arguments**: * `CODE`: [required] **Options**: * `--help`: Show this message and exit. ### `catleg lf jorf` Retrieve the JSON contents of a JORF (Journal Officiel) text. **Usage**: ```console $ catleg lf jorf [OPTIONS] ID ``` **Arguments**: * `ID`: [required] **Options**: * `--help`: Show this message and exit. ### `catleg lf legi` Retrieve the JSON contents of a LEGI text **Usage**: ```console $ catleg lf legi [OPTIONS] ID ``` **Arguments**: * `ID`: [required] **Options**: * `--help`: Show this message and exit.