data(atlas): Schuilhoek — four Dutch farming worlds behind Cairn
GJ 68/Schuilhoek: Zomer (800K, warm, grains), Lente (600K, cool, leafy staples), Herfst (400K, soft fruit), Winter (200K, low-g pasture). 300-year-old farming commune, no external contact, 2M total across four cultivated worlds. No orbital infrastructure. Fixed sync-wiki topology clobbering bug. Restored topology sections for Cairn (GJ 845) and Aurelius (GJ 783A). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-19
@@ -1666,26 +1666,13 @@ fn cmd_sync_wiki(conn: &Connection, system_id: Option<&str>, wiki_dir: &str) {
|
||||
.unwrap_or(content.len());
|
||||
format!("{}{}\n{}", &content[..start_pos], section.trim_end(), &content[end_offset..])
|
||||
} else {
|
||||
// Insert after the System Profile section (after the first "---" pair)
|
||||
// Find the second "---" which ends the System Profile
|
||||
let mut dashes = 0;
|
||||
let mut insert_pos = None;
|
||||
for (i, line) in content.lines().enumerate() {
|
||||
if line.trim() == "---" {
|
||||
dashes += 1;
|
||||
if dashes == 3 {
|
||||
// Third --- is end of System Profile
|
||||
let byte_pos: usize = content.lines().take(i + 1).map(|l| l.len() + 1).sum();
|
||||
insert_pos = Some(byte_pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(pos) = insert_pos {
|
||||
format!("{}\n{}\n---\n\n{}", &content[..pos], section.trim_end(), &content[pos..])
|
||||
// Insert before ## Topology if it exists, otherwise before end of file
|
||||
if let Some(topo_pos) = content.find("\n## Topology") {
|
||||
let insert_pos = topo_pos + 1; // after the newline
|
||||
format!("{}{}\n\n{}", &content[..insert_pos], section.trim_end(), &content[insert_pos..])
|
||||
} else {
|
||||
// Fallback: append at end
|
||||
format!("{}\n{}", content, section)
|
||||
// No topology section — append at end
|
||||
format!("{}\n{}", content.trim_end(), section)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user