Module: Ucode::Audit::Emitter::Paths
- Defined in:
- lib/ucode/audit/emitter/paths.rb
Overview
Pure path conventions for the Mode 2 audit output tree.
The only code that knows the on-disk layout of the audit output.
Distinct from Repo::Paths (Mode 1 canonical UCD dataset):
Mode 2 output lives under output/font_audit/<label>/ and carries
a different chunk layout (planes/, blocks/, scripts/, codepoints/,
glyphs/, missing/, plus collection-face subdirs).
All methods are pure: no I/O, no global state. Returns Pathname
instances so callers can compose further. Block names are passed
through verbatim — never slugified (per 03-directory-output-spec.md
§"Block filename encoding").
Class Method Summary collapse
-
.block_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/blocks/<NAME>.json. - .block_under(face_dir, block_name) ⇒ Pathname
-
.codepoints_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/codepoints/<NAME>.json— verbose per-block codepoint detail. - .codepoints_under(face_dir, block_name) ⇒ Pathname
-
.collection_face_dir(output_root, source_label, face_index, face_label) ⇒ Pathname
Collection-face subdirectory:
00-<face>/,01-<face>/, ... -
.face_dir(output_root, label) ⇒ Pathname
Per-label directory (one face, or one TTC source).
-
.face_html_path(output_root, label) ⇒ Pathname
output/font_audit/<label>/index.html— per-face browser (added in TODO 14). -
.face_index_path(output_root, label) ⇒ Pathname
output/font_audit/<label>/index.json— per-face compact index. -
.glyph_path(output_root, label, cp_id) ⇒ Pathname
output/font_audit/<label>/glyphs/U+XXXX.svg. - .glyph_under(face_dir, cp_id) ⇒ Pathname
- .index_under(face_dir) ⇒ Pathname
-
.library_html_path(output_root) ⇒ Pathname
output/font_audit/index.html— library browser (TODO 15). -
.library_index_path(output_root) ⇒ Pathname
output/font_audit/index.json— library-mode top-level index. -
.library_root(output_root) ⇒ Pathname
Library-mode root: one level above the per-label directories.
-
.missing_dir(output_root, label) ⇒ Pathname
output/font_audit/<label>/missing/— per-block missing-glyph gallery directory (TODO 26). - .missing_dir_under(face_dir) ⇒ Pathname
-
.missing_glyph_page_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/missing/<BLOCK>.html. - .missing_glyph_page_under(face_dir, block_name) ⇒ Pathname
-
.plane_path(output_root, label, plane) ⇒ Pathname
output/font_audit/<label>/planes/<N>.json. - .plane_under(face_dir, plane) ⇒ Pathname
-
.release_audit_root(release_root) ⇒ Pathname
<release_root>/audit/— top-level audit subtree. -
.release_face_dir(release_root, slug, face_label) ⇒ Pathname
<release_root>/audit/<slug>/<face_label>/— one face. -
.release_formula_dir(release_root, slug) ⇒ Pathname
<release_root>/audit/<slug>/— one formula's audit subtree. -
.release_library_index_path(release_root) ⇒ Pathname
<release_root>/library.json— release-level library index aggregating every formula + face card. -
.release_manifest_path(release_root) ⇒ Pathname
<release_root>/manifest.json— release manifest (versions, sha256s, totals). -
.release_root(output_root) ⇒ Pathname
<output_root>/font_audit_release/. -
.release_universal_set_manifest_path(release_root) ⇒ Pathname
<release_root>/universal_glyph_set/manifest.json. -
.release_universal_set_root(release_root) ⇒ Pathname
<release_root>/universal_glyph_set/— the universal-set reference directory (built separately by TODO 24 and copied or symlinked into the release tree by the CI collector). -
.script_path(output_root, label, script_code) ⇒ Pathname
output/font_audit/<label>/scripts/<CODE>.json. - .script_under(face_dir, script_code) ⇒ Pathname
Class Method Details
.block_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/blocks/<NAME>.json. Block name is
verbatim — Unicode block names contain no path separators.
87 88 89 |
# File 'lib/ucode/audit/emitter/paths.rb', line 87 def block_path(output_root, label, block_name) face_dir(output_root, label).join(BLOCKS_DIR, "#{block_name}.json") end |
.block_under(face_dir, block_name) ⇒ Pathname
190 191 192 |
# File 'lib/ucode/audit/emitter/paths.rb', line 190 def block_under(face_dir, block_name) Pathname(face_dir).join(BLOCKS_DIR, "#{block_name}.json") end |
.codepoints_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/codepoints/<NAME>.json — verbose
per-block codepoint detail.
116 117 118 |
# File 'lib/ucode/audit/emitter/paths.rb', line 116 def codepoints_path(output_root, label, block_name) face_dir(output_root, label).join(CODEPOINTS_DIR, "#{block_name}.json") end |
.codepoints_under(face_dir, block_name) ⇒ Pathname
211 212 213 |
# File 'lib/ucode/audit/emitter/paths.rb', line 211 def codepoints_under(face_dir, block_name) Pathname(face_dir).join(CODEPOINTS_DIR, "#{block_name}.json") end |
.collection_face_dir(output_root, source_label, face_index, face_label) ⇒ Pathname
Collection-face subdirectory: 00-<face>/, 01-<face>/, ...
The 2-digit zero-padded prefix preserves source order and
disambiguates faces that share a PostScript name.
157 158 159 160 |
# File 'lib/ucode/audit/emitter/paths.rb', line 157 def collection_face_dir(output_root, source_label, face_index, face_label) face_dir(output_root, source_label).join(format("%<idx>02d-%<label>s", idx: face_index, label: face_label)) end |
.face_dir(output_root, label) ⇒ Pathname
Per-label directory (one face, or one TTC source).
60 61 62 |
# File 'lib/ucode/audit/emitter/paths.rb', line 60 def face_dir(output_root, label) library_root(output_root).join(label) end |
.face_html_path(output_root, label) ⇒ Pathname
output/font_audit/<label>/index.html — per-face browser
(added in TODO 14).
77 78 79 |
# File 'lib/ucode/audit/emitter/paths.rb', line 77 def face_html_path(output_root, label) face_dir(output_root, label).join(HTML_FILENAME) end |
.face_index_path(output_root, label) ⇒ Pathname
output/font_audit/<label>/index.json — per-face compact index.
68 69 70 |
# File 'lib/ucode/audit/emitter/paths.rb', line 68 def face_index_path(output_root, label) face_dir(output_root, label).join(INDEX_FILENAME) end |
.glyph_path(output_root, label, cp_id) ⇒ Pathname
output/font_audit/<label>/glyphs/U+XXXX.svg.
125 126 127 |
# File 'lib/ucode/audit/emitter/paths.rb', line 125 def glyph_path(output_root, label, cp_id) face_dir(output_root, label).join(GLYPHS_DIR, "#{cp_id}.svg") end |
.glyph_under(face_dir, cp_id) ⇒ Pathname
218 219 220 |
# File 'lib/ucode/audit/emitter/paths.rb', line 218 def glyph_under(face_dir, cp_id) Pathname(face_dir).join(GLYPHS_DIR, "#{cp_id}.svg") end |
.index_under(face_dir) ⇒ Pathname
183 184 185 |
# File 'lib/ucode/audit/emitter/paths.rb', line 183 def index_under(face_dir) Pathname(face_dir).join(INDEX_FILENAME) end |
.library_html_path(output_root) ⇒ Pathname
output/font_audit/index.html — library browser (TODO 15).
172 173 174 |
# File 'lib/ucode/audit/emitter/paths.rb', line 172 def library_html_path(output_root) library_root(output_root).join(HTML_FILENAME) end |
.library_index_path(output_root) ⇒ Pathname
output/font_audit/index.json — library-mode top-level index.
165 166 167 |
# File 'lib/ucode/audit/emitter/paths.rb', line 165 def library_index_path(output_root) library_root(output_root).join(INDEX_FILENAME) end |
.library_root(output_root) ⇒ Pathname
Library-mode root: one level above the per-label directories.
52 53 54 |
# File 'lib/ucode/audit/emitter/paths.rb', line 52 def library_root(output_root) Pathname(output_root).join(FONT_AUDIT_ROOT) end |
.missing_dir(output_root, label) ⇒ Pathname
output/font_audit/<label>/missing/ — per-block missing-glyph
gallery directory (TODO 26). Each touched block with missing
codepoints gets one <BLOCK>.html plus a paginated
<BLOCK>.json companion for large blocks.
136 137 138 |
# File 'lib/ucode/audit/emitter/paths.rb', line 136 def missing_dir(output_root, label) face_dir(output_root, label).join(MISSING_DIR) end |
.missing_dir_under(face_dir) ⇒ Pathname
224 225 226 |
# File 'lib/ucode/audit/emitter/paths.rb', line 224 def missing_dir_under(face_dir) Pathname(face_dir).join(MISSING_DIR) end |
.missing_glyph_page_path(output_root, label, block_name) ⇒ Pathname
output/font_audit/<label>/missing/<BLOCK>.html.
145 146 147 |
# File 'lib/ucode/audit/emitter/paths.rb', line 145 def missing_glyph_page_path(output_root, label, block_name) missing_dir(output_root, label).join("#{block_name}.html") end |
.missing_glyph_page_under(face_dir, block_name) ⇒ Pathname
231 232 233 |
# File 'lib/ucode/audit/emitter/paths.rb', line 231 def missing_glyph_page_under(face_dir, block_name) missing_dir_under(face_dir).join("#{block_name}.html") end |
.plane_path(output_root, label, plane) ⇒ Pathname
output/font_audit/<label>/planes/<N>.json.
96 97 98 |
# File 'lib/ucode/audit/emitter/paths.rb', line 96 def plane_path(output_root, label, plane) face_dir(output_root, label).join(PLANES_DIR, "#{plane}.json") end |
.plane_under(face_dir, plane) ⇒ Pathname
197 198 199 |
# File 'lib/ucode/audit/emitter/paths.rb', line 197 def plane_under(face_dir, plane) Pathname(face_dir).join(PLANES_DIR, "#{plane}.json") end |
.release_audit_root(release_root) ⇒ Pathname
<release_root>/audit/ — top-level audit subtree.
255 256 257 |
# File 'lib/ucode/audit/emitter/paths.rb', line 255 def release_audit_root(release_root) Pathname(release_root).join(RELEASE_AUDIT_DIR) end |
.release_face_dir(release_root, slug, face_label) ⇒ Pathname
<release_root>/audit/<slug>/<face_label>/ — one face.
274 275 276 |
# File 'lib/ucode/audit/emitter/paths.rb', line 274 def release_face_dir(release_root, slug, face_label) release_formula_dir(release_root, slug).join(face_label) end |
.release_formula_dir(release_root, slug) ⇒ Pathname
<release_root>/audit/<slug>/ — one formula's audit subtree.
Per-face directories live under here. The slug is a
caller-sanitized formula identifier (fontist formula slug).
265 266 267 |
# File 'lib/ucode/audit/emitter/paths.rb', line 265 def release_formula_dir(release_root, slug) release_audit_root(release_root).join(slug) end |
.release_library_index_path(release_root) ⇒ Pathname
<release_root>/library.json — release-level library index
aggregating every formula + face card.
282 283 284 |
# File 'lib/ucode/audit/emitter/paths.rb', line 282 def release_library_index_path(release_root) Pathname(release_root).join(RELEASE_LIBRARY_INDEX) end |
.release_manifest_path(release_root) ⇒ Pathname
<release_root>/manifest.json — release manifest (versions,
sha256s, totals).
290 291 292 |
# File 'lib/ucode/audit/emitter/paths.rb', line 290 def release_manifest_path(release_root) Pathname(release_root).join(RELEASE_MANIFEST) end |
.release_root(output_root) ⇒ Pathname
<output_root>/font_audit_release/.
248 249 250 |
# File 'lib/ucode/audit/emitter/paths.rb', line 248 def release_root(output_root) Pathname(output_root).join(RELEASE_ROOT_DIR) end |
.release_universal_set_manifest_path(release_root) ⇒ Pathname
<release_root>/universal_glyph_set/manifest.json.
306 307 308 |
# File 'lib/ucode/audit/emitter/paths.rb', line 306 def release_universal_set_manifest_path(release_root) release_universal_set_root(release_root).join(RELEASE_MANIFEST_ENTRY) end |
.release_universal_set_root(release_root) ⇒ Pathname
<release_root>/universal_glyph_set/ — the universal-set
reference directory (built separately by TODO 24 and copied
or symlinked into the release tree by the CI collector).
299 300 301 |
# File 'lib/ucode/audit/emitter/paths.rb', line 299 def release_universal_set_root(release_root) Pathname(release_root).join(RELEASE_UNIVERSAL_SET_DIR) end |
.script_path(output_root, label, script_code) ⇒ Pathname
output/font_audit/<label>/scripts/<CODE>.json. Script code
is the ISO 15924 short form (Latn, Grek, …).
106 107 108 |
# File 'lib/ucode/audit/emitter/paths.rb', line 106 def script_path(output_root, label, script_code) face_dir(output_root, label).join(SCRIPTS_DIR, "#{script_code}.json") end |
.script_under(face_dir, script_code) ⇒ Pathname
204 205 206 |
# File 'lib/ucode/audit/emitter/paths.rb', line 204 def script_under(face_dir, script_code) Pathname(face_dir).join(SCRIPTS_DIR, "#{script_code}.json") end |