class

Bon::Config

Inherits Reference < Object

Constructors

load(cwd = Dir.current) : Config
Source
new(printer_name : String | Nil = nil, paper_width_mm : Float64 = 80.0, printable_width_pt : Float64 | Nil = nil, min_media_pt : Float64 = 72.0, max_media_height_pt : Float64 = 5669.3, typst_bin : String = "typst", typst_mode : String = "pdf", image_ppi : Int32 = 203, raster_ppi_multiplier : Int32 = 2, raster_threshold : Float64 = 0.125, raster_dither : String = "none", latex_engine : String = "auto", cups_copies : Int32 = 1, cups_dry_run : Bool = false, cups_options : Hash(String, String) = {"Resolution" => "203x203dpi", "TmxPaperCut" => "CutPerPage", "TmxPaperReduction" => "Top"}, simulate_top_mm : Float64 = 10.0, simulate_bottom_mm : Float64 = 14.0, simulate_min_top_mm : Float64 = 12.0, simulate_min_bottom_mm : Float64 = 2.0, simulate_background_tint : String = "#f5f1e0", simulate_foreground_color : String = "#232320", simulate_foreground_fade : Float64 = 1.0, web_host : String = "0.0.0.0", web_port : Int32 = 8080, web_token : Nil | String = nil.as(String | ::Nil), web_max_upload_mb : Int32 = 25, web_job_ttl_seconds : Int32 = 3600)
Source

Class methods

default_printable_width_pt(paper_width_mm : Float64) : Float64
Source
default_toml(selected_printer : String | Nil = nil) : String
Source
global_path
Source
load_with_sources(cwd = Dir.current) : LoadedConfig
Source
source_statuses(cwd = Dir.current) : Array(ConfigSourceStatus)
Source
used_sources(cwd = Dir.current) : Array(ConfigSource)
Source
validate_file!(path : String) : Nil
Source

Instance methods

apply_printer_overrides!(name : String) : Nil
Source
cups_copies
Source
cups_copies=(cups_copies : Int32)
Source
cups_dry_run
Source
cups_dry_run=(cups_dry_run : Bool)
Source
cups_options
Source
cups_options=(cups_options : Hash(String, String))
Source
explicit_printable_width_pt?
Source
image_ppi
Source
image_ppi=(image_ppi : Int32)
Source
latex_engine
Source
latex_engine=(latex_engine : String)
Source
max_media_height_pt
Source
max_media_height_pt=(max_media_height_pt : Float64)
Source
min_media_pt
Source
min_media_pt=(min_media_pt : Float64)
Source
overlay(values : Hash(String, TomlScalar), source = "config") : Nil
Source
overlay_file(path : String) : Nil
Source
paper_width_mm
Source
paper_width_mm=(paper_width_mm : Float64)
Source
paper_width_pt
Source
printable_width_pt
Source
printable_width_pt=(value : Float64) : Float64
Source
printable_width_pt=(value : Nil) : Nil
Source
printer_name
Source
printer_name=(printer_name : String | Nil)
Source
printer_overrides
Source
raster_dither
Source
raster_dither=(raster_dither : String)
Source
raster_ppi_multiplier
Source
raster_ppi_multiplier=(raster_ppi_multiplier : Int32)
Source
raster_threshold
Source
raster_threshold=(raster_threshold : Float64)
Source
simulate_background_tint
Source
simulate_background_tint=(simulate_background_tint : String)
Source
simulate_bottom_mm
Source
simulate_bottom_mm=(simulate_bottom_mm : Float64)
Source
simulate_foreground_color
Source
simulate_foreground_color=(simulate_foreground_color : String)
Source
simulate_foreground_fade
Source
simulate_foreground_fade=(simulate_foreground_fade : Float64)
Source
simulate_min_bottom_mm
Source
simulate_min_bottom_mm=(simulate_min_bottom_mm : Float64)
Source
simulate_min_top_mm
Source
simulate_min_top_mm=(simulate_min_top_mm : Float64)
Source
simulate_top_mm
Source
simulate_top_mm=(simulate_top_mm : Float64)
Source
to_effective_toml
Source
to_toml
Source
typst_bin
Source
typst_bin=(typst_bin : String)
Source
typst_mode
Source
typst_mode=(typst_mode : String)
Source
validate!
Source
warnings
Source
web_host
Source
web_host=(web_host : String)
Source
web_job_ttl_seconds
Source
web_job_ttl_seconds=(web_job_ttl_seconds : Int32)
Source
web_max_upload_mb
Source
web_max_upload_mb=(web_max_upload_mb : Int32)
Source
web_port
Source
web_port=(web_port : Int32)
Source
web_token
Source
web_token=(web_token : String | Nil)
Source