41 lines
1.6 KiB
Markdown
41 lines
1.6 KiB
Markdown
# Add new law text
|
|
## Tests
|
|
- Getting paragraphs from `law_id` (`risparser::overview::test::parse()`)
|
|
- Create file `law_id` in `./data/expected/overview` (then run tests to get current output + save in file)
|
|
- Create config file in `./data/configs/`
|
|
|
|
# Integration test
|
|
- Nice test would be to re-create html ris file and compare it (problem with custom fixes, though)
|
|
|
|
# Goals
|
|
|
|
- [x] I want to have the text of the law.
|
|
- [x] 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](docs.rs/nom) 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 `overview` tests
|
|
- expected
|
|
- overview -> expected xml links of law_ids
|
|
|
|
# History
|
|
- [I've created my first parser using RIS API, daily updated. Failed because I tried to do too much automatically (e.g. recognizing headers](https://gitlab.com/PhilippHofer/law)
|
|
- [Using print-website, I've extracted stuff w/ regex.](https://gitlab.com/PhilippHofer/ris/)
|
|
- [Tried to create a parser using print-website, proper(-ish) parser](https://gitlab.com/PhilippHofer/ris2)
|