Class: Ucode::Commands::GlyphsCommand
- Inherits:
-
Object
- Object
- Ucode::Commands::GlyphsCommand
- Defined in:
- lib/ucode/commands/glyphs.rb
Overview
ucode glyphs — extract per-codepoint SVGs from Code Charts PDFs.
Thin Thor-facing wrapper around Glyphs::Pipeline:
opt-in gate + experimental warning live here; the pipeline
assembly (block loading, fetcher, per-block specs) lives in
Glyphs::Pipeline.
Status (v0.1): EXPERIMENTAL. The cell-extraction pipeline
currently includes cell-border decorations alongside the actual
character outline because the Code Charts PDFs composite the two
into a single glyph definition. The output is therefore not yet
suitable for end-user display. The command is retained so the
pipeline can be iterated on without churning the CLI surface, but
callers MUST opt in via include_glyphs: true (CLI: --include-glyphs)
and will receive a printed warning. Tracked for v0.2.
Takes a resolved version string; CLI callers resolve via VersionResolver.resolve once and thread it through. See Candidate 4 of the 2026-06-29 architecture review.
Class Method Summary collapse
-
.experimental_warning ⇒ String
The experimental-status banner.
Instance Method Summary collapse
-
#call(version, output_root:, block_filter: nil, force: false, monolith_path: Glyphs::Pipeline::DEFAULT_MONOLITH_PATH, include_glyphs: false, warn: nil) ⇒ Hash
Aggregated Writer tally + version, or a
skippedpayload when opt-in is false.
Class Method Details
.experimental_warning ⇒ String
Returns the experimental-status banner. Exposed so the CLI and BuildCommand surface the same message verbatim.
36 37 38 |
# File 'lib/ucode/commands/glyphs.rb', line 36 def experimental_warning ExperimentalWarning end |
Instance Method Details
#call(version, output_root:, block_filter: nil, force: false, monolith_path: Glyphs::Pipeline::DEFAULT_MONOLITH_PATH, include_glyphs: false, warn: nil) ⇒ Hash
Returns aggregated Writer tally + version, or a skipped
payload when opt-in is false.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/ucode/commands/glyphs.rb', line 55 def call(version, output_root:, block_filter: nil, force: false, monolith_path: Glyphs::Pipeline::DEFAULT_MONOLITH_PATH, include_glyphs: false, warn: nil) return skipped(version) unless include_glyphs warn&.puts(ExperimentalWarning) pipeline = Glyphs::Pipeline.new( version: version, block_filter: block_filter, monolith_path: monolith_path, ) specs = pipeline.build_specs(force: force) writer = Glyphs::Writer.new( output_root: Pathname.new(output_root), parallel_workers: workers, ) tally = writer.write_all(specs) tally.merge(version: version, block_count: specs.size) end |