diff --git a/merge-output/export_xlsx.py b/merge-output/export_xlsx.py index d24b9d2..1ebbe23 100644 --- a/merge-output/export_xlsx.py +++ b/merge-output/export_xlsx.py @@ -116,7 +116,8 @@ def main(): cov_cols = ["sources_with_text", "article_chars", "untrimmed_blocks", "summary_status", "summary_chars"] new_cols = ["venue_of_control", "held_duration", "outcome", "arrests", "amount_demanded_usd", "amount_taken_usd"] cols = base_cols + FLAGS + cov_cols + new_cols + ["summary"] - ws.append(cols) + LABEL = {"kidnappings": "detention"} # the DB column keeps its old name; the export shows the glossary name + ws.append([LABEL.get(c, c) for c in cols]) for c in ws[1]: c.font = Font(bold=True) c.fill = HEAD @@ -210,7 +211,7 @@ def main(): # ---------------- case_violence ---------------- ws3 = wb.create_sheet("case_violence") - ws3.append(["case_id", "category", "subtype", "target", "evidence", "source"]) + ws3.append(["case_id", "category", "subtype", "target", "evidence", "source"]) # category 'detention' = DB flag kidnappings for c in ws3[1]: c.font = Font(bold=True) c.fill = HEAD @@ -224,7 +225,7 @@ def main(): elif int(v) > 0: n = int(v) if f == "life_taken" else 1 for _ in range(n): - ws3.append([r["id"], CATEGORY_OF[f], None, None, None, f"seeded from flag {f}={v}"]) + ws3.append([r["id"], CATEGORY_OF[f], None, None, None, f"seeded from flag {LABEL.get(f, f)}={v}"]) for c in ws3[ws3.max_row][2:5]: c.fill = ORANGE ws3.freeze_panes = "A2" @@ -252,6 +253,7 @@ def main(): ("blue", BLUE, "filled by a rule from existing data (venue from scenario, held from the flag, outcome from Dodged/life_taken, " "USD parsed from money_wanted, scenario tags proposed by the site's keyword engine): a proposal, not verified"), ("none", None, "present and verified")] + ws5.append(["note", "column 'detention' on the attacks sheet is the DB field 'kidnappings' (the detention violence category, see DEFINITIONS.md)"]) ws5.append(["colour", "meaning"]) for name, fill, meaning in rows: ws5.append([name, meaning]) diff --git a/merge-output/exports/.~lock.gart-kr-database-2026-09-15.xlsx# b/merge-output/exports/.~lock.gart-kr-database-2026-09-15.xlsx# new file mode 100644 index 0000000..24ac702 --- /dev/null +++ b/merge-output/exports/.~lock.gart-kr-database-2026-09-15.xlsx# @@ -0,0 +1 @@ +,disi,pop-os,15.09.2026 15:33,file:///home/disi/.config/libreoffice/4; \ No newline at end of file diff --git a/merge-output/exports/gart-kr-database-2026-09-15.xlsx b/merge-output/exports/gart-kr-database-2026-09-15.xlsx index 382caa6..e882859 100644 Binary files a/merge-output/exports/gart-kr-database-2026-09-15.xlsx and b/merge-output/exports/gart-kr-database-2026-09-15.xlsx differ