risp/README.md

43 lines
1.7 KiB
Markdown
Raw Normal View History

2024-02-15 16:17:40 +01:00
# RIS Parser
2024-02-15 16:17:13 +01:00
## Add new law text
2024-02-15 16:18:23 +01:00
- 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/`).
2024-02-04 12:11:34 +01:00
## Integration test
2024-02-04 12:11:34 +01:00
- Nice test would be to re-create html ris file and compare it (problem with custom fixes, though)
## Goals
2023-11-03 14:26:18 +01:00
2023-11-06 17:37:22 +01:00
- [x] I want to have the text of the law.
2023-11-07 08:50:04 +01:00
- [x] I want to see the structure (proper headers) of the law.
2023-11-03 14:26:18 +01:00
- [ ] 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.
2024-02-06 11:30:28 +01:00
- [.] Lawtext should be updateable
2023-11-03 14:26:18 +01:00
## Mindset
2023-11-03 14:26:18 +01:00
- 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
2023-11-03 22:40:19 +01:00
- Law ("Gesetz"): e.g. UHG, TEG, ABGB
- Section ("Paragraph")
- Subsection ("Absatz")
- Item ("Ziffer")
- Heading-{1,2,3,...}
2024-01-26 16:55:15 +01:00
## Folder-Structure of this repo
2024-02-06 11:30:28 +01:00
- ./data
- cache -> cache for tests
2024-02-06 11:30:28 +01:00
- 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](https://joinup.ec.europa.eu/software/page/eupl)