Go to file
philipp e10144b0dd
All checks were successful
CI/CD Pipeline / test (push) Successful in 1m30s
Update CI/CD Pipeline / update (push) Successful in 1m45s
Merge pull request 'Update laws' (#40) from update-branch into main
Reviewed-on: #40
2024-10-30 08:03:13 +01:00
.gitea/workflows proper schedule 2024-10-17 20:00:11 +02:00
data Automated update of laws 2024-10-28 23:01:43 +00:00
src allow multi-line in par_notes; format doctests 2024-10-17 18:21:46 +02:00
.gitignore empty rust project 2023-11-03 13:45:25 +01:00
Cargo.lock update deps 2024-07-24 21:12:19 +02:00
Cargo.toml update deps 2024-06-05 15:09:13 +02:00
LICENSE use ascii ' in license text 2024-02-15 16:10:18 +01:00
README.md update data folder structure explanation 2024-02-15 16:20:51 +01:00
update_laws.sh allow to specify 'fassung' of laws 2024-08-27 13:48:31 +02:00

RIS Parser

Add new law text

  • Tests: Create config file in ./data/configs/ and run the tests (cargo t). This will automatically create tests both for overview and par (by adding new files in data/expected/).

Integration test

  • Nice test would be to re-create html ris file and compare it (problem with custom fixes, though)

Goals

  • I want to have the text of the law.
  • I want to see the structure (proper headers) of the law.
  • I want to be able to make comments (e.g. Erschöpfung) on certain parts
  • I want to see since when this paragraph is in use.
  • [.] Lawtext should be updateable

Mindset

  • I don't want to restrict myself with a parser combinators but code it myself using recursive descent parser.
  • Be strict in what I process. Fail if anything unexpected happens. The user should handle this case. It's fine if one decides to ignore the new/unexpected field, but it should be done deliberately.

Nomenclature

  • Law ("Gesetz"): e.g. UHG, TEG, ABGB
  • Section ("Paragraph")
  • Subsection ("Absatz")
  • Item ("Ziffer")
  • Heading-{1,2,3,...}

Folder-Structure of this repo

  • ./data
    • cache -> cache for tests
    • expected
      • overview -> expected xml links of law_ids
      • par -> expected LawBuilder calls for a given law
    • configs -> configs for various law texts. If you want to support a new law text, add respective config here.

License

Licensed under the EUPL, Version 1.2 or as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence"). You may not use this work except in compliance with the Licence.

License: European Union Public License v1.2