ICS contarina_it now suggest a regex and split_at parameter

This commit is contained in:
5ila5
2024-01-23 16:16:50 +01:00
committed by 5ila5
parent d529562f7e
commit 2bd2cb8286
2 changed files with 6 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ Contarina S.p.A is supported by the generic [ICS](/doc/source/ics.md) source. Fo
- Copy the `url` in the example configuration with this link. - Copy the `url` in the example configuration with this link.
- Replace the url's `{zone}` substring with your location's zone code (check below for the chart) - Replace the url's `{zone}` substring with your location's zone code (check below for the chart)
- Keeping `regex` and `split_at` as they are will remove potetially unnecessary names and split the waste types if there are multiple in one day.
Zone codes `{code} : {zone}`: Zone codes `{code} : {zone}`:
- 1 : "Treviso - cintura urbana", - 1 : "Treviso - cintura urbana",
@@ -73,5 +74,7 @@ waste_collection_schedule:
sources: sources:
- name: ics - name: ics
args: args:
regex: '.*: (.*)'
split_at: ', '
url: https://contarina.it/ajax/moduli/appbugfixapi/genera_ics_calendari?id_zona=1 url: https://contarina.it/ajax/moduli/appbugfixapi/genera_ics_calendari?id_zona=1
``` ```

View File

@@ -4,6 +4,7 @@ country: it
howto: | howto: |
- Copy the `url` in the example configuration with this link. - Copy the `url` in the example configuration with this link.
- Replace the url's `{zone}` substring with your location's zone code (check below for the chart) - Replace the url's `{zone}` substring with your location's zone code (check below for the chart)
- Keeping `regex` and `split_at` as they are will remove potetially unnecessary names and split the waste types if there are multiple in one day.
Zone codes `{code} : {zone}`: Zone codes `{code} : {zone}`:
- 1 : "Treviso - cintura urbana", - 1 : "Treviso - cintura urbana",
@@ -64,3 +65,5 @@ howto: |
test_cases: test_cases:
Treviso - cintura urbana": Treviso - cintura urbana":
url: "https://contarina.it/ajax/moduli/appbugfixapi/genera_ics_calendari?id_zona=1" url: "https://contarina.it/ajax/moduli/appbugfixapi/genera_ics_calendari?id_zona=1"
split_at: ", "
regex: ".*: (.*)"