|
40 | 40 | from util.yaml_utils import format_yaml_value |
41 | 41 | from util.datetime_utils import format_datetime |
42 | 42 | from util.file_utils import filter_json_files, save_to_disk |
43 | | -from util.normtyp_utils import determine_normtyp |
| 43 | +from util.doctype_utils import determine_doctype |
44 | 44 | from formatters.predocs_parser import parse_predocs_string |
45 | 45 |
|
46 | 46 |
|
@@ -312,9 +312,9 @@ def convert_to_markdown(data: Dict[str, Any], fetch_predocs_from_api: bool = Fal |
312 | 312 | organisation_data = data.get('organisation', {}) |
313 | 313 | organisation = organisation_data.get('namn', '') if organisation_data else '' |
314 | 314 |
|
315 | | - # Determine normtyp (grundlag, lag, or förordning) |
| 315 | + # Determine doctype (grundlag, lag, or förordning) |
316 | 316 | forfattningstyp_namn = data.get('forfattningstypNamn') |
317 | | - normtyp = determine_normtyp(beteckning, forfattningstyp_namn) |
| 317 | + doctype = determine_doctype(beteckning, forfattningstyp_namn) |
318 | 318 |
|
319 | 319 | # Extract the main text content from nested structure |
320 | 320 | innehall_text = fulltext_data.get('forfattningstext') |
@@ -353,7 +353,7 @@ def convert_to_markdown(data: Dict[str, Any], fetch_predocs_from_api: bool = Fal |
353 | 353 | beteckning: {format_yaml_value(beteckning)} |
354 | 354 | rubrik: {format_yaml_value(rubrik)} |
355 | 355 | departement: {format_yaml_value(organisation)} |
356 | | -normtyp: {format_yaml_value(normtyp)} |
| 356 | +doctype: {format_yaml_value(doctype)} |
357 | 357 | """ |
358 | 358 |
|
359 | 359 | # Add dates if they exist (ikraft_datum will be added separately if needed) |
|
0 commit comments