Class: Ucode::Commands::Audit::LibraryCommand
- Inherits:
-
Object
- Object
- Ucode::Commands::Audit::LibraryCommand
- Defined in:
- lib/ucode/commands/audit/library_command.rb
Overview
ucode audit library DIR — walk a directory of fonts and
produce one per-face audit plus a library-level rollup.
Delegates directory walking + per-face audit to
Audit::LibraryAuditor, then writes the per-face trees +
library-level index.json via Audit::Emitter::FaceDirectory.
Defined Under Namespace
Classes: Result, SkippedFile
Instance Method Summary collapse
Instance Method Details
#call(dir, output_root:, recursive: false, unicode_version: nil, verbose: false, with_glyphs: false, brief: false, browse: false, reference: nil, universal_set_root: nil, with_missing_glyph_pages: false) ⇒ Result
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/ucode/commands/audit/library_command.rb', line 41 def call(dir, output_root:, recursive: false, unicode_version: nil, verbose: false, with_glyphs: false, brief: false, browse: false, reference: nil, universal_set_root: nil, with_missing_glyph_pages: false) = (unicode_version: unicode_version, brief: brief) auditor = Ucode::Audit::LibraryAuditor.new(dir, recursive: recursive, options: , reference: reference) summary = auditor.audit directory = Ucode::Audit::Emitter::FaceDirectory.new( output_root: output_root, verbose: verbose, with_glyphs: with_glyphs, emit_browser: browse, universal_set_root: universal_set_root, with_missing_glyph_pages: with_missing_glyph_pages, ) directory.emit_library(summary: summary) Result.new( root: dir.to_s, total_files: summary.total_files, total_faces: summary.total_faces, output_dir: Ucode::Audit::Emitter::Paths.library_root(output_root).to_s, skipped: auditor.skipped.map { |s| parse_skipped(s) }, ) rescue StandardError => e Result.new(root: dir.to_s, error: "#{e.class}: #{e.}") end |