by adom
adom-lbr — the EDA library translator. Bring a component in from any supported EDA tool and convert it to any other (KiCad ⇄ Altium ⇄ EAGLE/Fusion) through one canonical adom-lbr JSON — symbol + footprint + 3D + pin↔pad map. Altium is written natively (no Altium needed). Includes the adom-lbr Manager: browse wiki components and view symbol/footprint/3D + the per-EDA layer stackup.
← Commit history
2.47.12: assemble-altium keeps every dot of the --out base; GH 6fe0372
8 files changed
+37−10
CHANGELOG.md+3@@ -1,5 +1,8 @@ # Changelog +## 2.47.12 (2026-11-13)+- `assemble-altium --out` keeps every dot in the base name. `--out "Rev 1.2"` writes `Rev 1.2.SchLib` and `Rev 1.2.PcbLib`; it used to cut at the last dot and write `Rev 1.SchLib`, and a name like `parts_2.47.11` lost two segments. Only a `.SchLib`, `.PcbLib` or `.IntLib` already on the base is replaced.+ ## 2.47.11 (2026-11-13) - `export-viewers` can render a page before it is public. `--sym <file.kicad_sym> --fp <file.kicad_mod>` renders from local files instead of the wiki, with the same output. Reads from the wiki now carry your token (`ADOM_WIKI_TOKEN`, else the adom-wiki CLI's stored token, else the container key), so `--slug` works on a private page you can see. A page it cannot read now says so, instead of reporting no KiCad files. (#40)
Cargo.lock+1−1@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "adom-lbr"-version = "2.47.11"+version = "2.47.12" dependencies = [ "altium-codec", "anyhow",
Cargo.toml+1−1@@ -1,6 +1,6 @@ [package] name = "adom-lbr"-version = "2.47.11"+version = "2.47.12" edition = "2021" description = "adom-lbr generator / EDA translator: the canonical adom-lbr JSON is the hub, with native converters to Altium (.SchLib/.PcbLib/.IntLib), EAGLE/Fusion (.lbr), and KiCad. Altium output is written natively — no Altium needed at conversion time."
VERSION+1−1@@ -1 +1 @@-2.47.11+2.47.12
bin/adom-lbr⋯ 1 unchanged line ⋯
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-lbr",- "version": "2.47.11",+ "version": "2.47.12", "type": "app", "description": "adom-lbr \u2014 the EDA library translator. Bring a component in from any supported EDA tool and convert it to any other (KiCad \u21c4 Altium \u21c4 EAGLE/Fusion) through one canonical adom-lbr JSON \u2014 symbol + footprint + 3D + pin\u2194pad map. Altium is written natively (no Altium needed). Includes the adom-lbr Manager: browse wiki components and view symbol/footprint/3D + the per-EDA layer stackup.", "dependencies": {},
page.json+2−2@@ -1,6 +1,6 @@ { "slug": "adom-lbr",- "version": "2.47.11",+ "version": "2.47.12", "type": "app", "description": "adom-lbr — the EDA library translator. Bring a component in from any supported EDA tool and convert it to any other (KiCad ⇄ Altium ⇄ EAGLE/Fusion) through one canonical adom-lbr JSON — symbol + footprint + 3D + pin↔pad map. Altium is written natively (no Altium needed). Includes the adom-lbr Manager: browse wiki components and view symbol/footprint/3D + the per-EDA layer stackup.", "dependencies": {},@@ -89,4 +89,4 @@ "label": "Browse parts" } ]-}+}
src/main.rs+28−4@@ -305,7 +305,9 @@ enum Commands { /// skipped[]) for machine callers; skips are always NAMED, never silent, /// and a partial library still ships. Exit 2 only when nothing assembled. AssembleAltium {- /// Output base path; writes <base>.SchLib and <base>.PcbLib+ /// Output base path; writes <base>.SchLib and <base>.PcbLib. Dots in the base+ /// are kept ("Rev 1.2" writes "Rev 1.2.SchLib"); a trailing .SchLib, .PcbLib+ /// or .IntLib is dropped first #[arg(short, long)] out: PathBuf, /// Paths to adom-lbr JSONs (one per part)@@ -3503,6 +3505,19 @@ fn eagle_keepout_lost(part: &str, kms: &[&str]) -> Option<LostFeature> { }) } +/// `<base>.<ext>` for an assemble-altium `--out` base. Only an Altium library+/// extension already on the base is replaced; any other dot is part of the name,+/// so "Rev 1.2" and "parts_2.47.11" keep every character (with_extension cut both+/// at their last dot, and the library came out under a truncated name).+fn altium_lib_path(base: &std::path::Path, ext: &str) -> PathBuf {+ let known = base.extension().and_then(|e| e.to_str())+ .is_some_and(|e| ["schlib", "pcblib", "intlib"].contains(&e.to_ascii_lowercase().as_str()));+ let stem = if known { base.with_extension("") } else { base.to_path_buf() };+ let mut name = stem.into_os_string();+ name.push(format!(".{ext}"));+ PathBuf::from(name)+}+ /// Pin/pad agreement for an imported part. A symbol whose pins do not all land /// on pads, or a footprint with far more pads than the symbol has pins, is the /// shape of a wrong pairing (a 32-pin symbol on a 100-pad footprint, wiki #28).@@ -4276,9 +4291,8 @@ The geometry is fine but a BOM cannot order this part - pass --part-metadata or .unwrap_or_else(|e| { println!("{}", json!({"status":"error","error": format!("encode SchLib: {e:#}"), "skipped": skipped})); process::exit(2); }); let pcb_bytes = altium_codec::encode_pcblib_many_with_models(&fps, &models) .unwrap_or_else(|e| { println!("{}", json!({"status":"error","error": format!("encode PcbLib: {e:#}"), "skipped": skipped})); process::exit(2); });- let base = out.with_extension("");- let sp = base.with_extension("SchLib");- let pp = base.with_extension("PcbLib");+ let sp = altium_lib_path(&out, "SchLib");+ let pp = altium_lib_path(&out, "PcbLib"); if let Err(e) = fs::write(&sp, &sch_bytes) { println!("{}", json!({"status":"error","error": format!("write {}: {e}", sp.display())})); process::exit(2); } if let Err(e) = fs::write(&pp, &pcb_bytes) { println!("{}", json!({"status":"error","error": format!("write {}: {e}", pp.display())})); process::exit(2); } let deduped: Vec<Value> = fp_shared.iter().filter(|(_, v)| v.len() > 1)@@ -4801,6 +4815,16 @@ fn cmd_embed(dir: &std::path::Path, out: Option<PathBuf>) -> Result<(), String> mod lost_feature_tests { use super::*; + #[test]+ fn assemble_altium_keeps_every_dot_of_the_out_base() {+ let p = |s: &str, e: &str| altium_lib_path(std::path::Path::new(s), e).display().to_string();+ assert_eq!(p("work/ztest_lbr_2.47.11_check", "SchLib"), "work/ztest_lbr_2.47.11_check.SchLib");+ assert_eq!(p("Rev 1.2", "PcbLib"), "Rev 1.2.PcbLib");+ assert_eq!(p("lib", "SchLib"), "lib.SchLib");+ assert_eq!(p("out/lib.SchLib", "PcbLib"), "out/lib.PcbLib", "a library extension on the base is replaced");+ assert_eq!(p("v2.0 parts.schlib", "SchLib"), "v2.0 parts.SchLib");+ }+ #[test] fn kicad_overbars_become_eagle_bangs_and_survive_the_charset() { assert_eq!(kicad_overbar_to_eagle("PB0 (~{SS}/PCINT0)"), "PB0 (!SS!/PCINT0)");