module Cheet
Defined in:
cheet.crcheet/config.cr
cheet/core.cr
cheet/parsing.cr
Constant Summary
-
BUILD_DATE =
{{ (`date -u -I`).chomp.stringify }}
-
Log =
::Log.for("cheet")
-
REVISION =
{{ env("CHEET_GIT_COMMIT") }}
-
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-Singond-Cheet-v0.2.0/src/cheet`).chomp.stringify }}
Class Method Summary
- .atx_heading(line, offset = 0_u64) : Heading | Nil
- .consists_only_of?(string, char)
-
.each_child_recursive(dirname : Dir | Path | String, skip_hidden = true, &)
Yields every path inside dirname and any subdirectories to the block.
-
.each_child_recursive(dirs : Array, &)
Yields every path inside any directory in dirs and any of its subdirectories to the block.
-
.each_file_recursive(dir, &)
Yields every regular file inside dir and any subdirectories to the block.
- .load_document(path)
-
.print(match : Match, config = Config.new)
Prints single match to the output.
-
.print(matches : Enumerable(Match), config = Config.new)
Prints given matches to the output.
-
.print_content_formatted(match : Match, config = Config.new)
Parses the content of single match and prints it formatted into the output.
-
.print_content_raw(match : Match, config = Config.new)
Prints the raw content of single match to the output.
-
.print_content_raw(content, output = STDOUT)
Copies raw content into output.
- .print_header(document, output = STDOUT, color = :default)
- .print_same_file_separator(output = STDOUT, color = :default)
- .promote_headings(markup : Poor::Markup, levels : Int)
- .promote_headings(markup : Poor::Markup)
- .run(area, topics, config) : Int32
-
.search(area : Area | Nil, topics : Array(Topic), config = Config.new, &)
Searches topics in area and yields matches to the block.
-
.search(area : Area | Nil, topics : Array(Topic), config = Config.new)
Searches topics in area and returns an array of the matches.
-
.search_print(area : Area | Nil, topics : Array(Topic), config = Config.new)
Searches for topics in area and prints matching sections.
- .setext_heading(lines, offset = 0_u64) : Heading | Nil
Instance Method Summary
-
#print_version(io = STDOUT, revision = false)
Prints version information into io.
Class Method Detail
Yields every path inside any directory in dirs and any of its subdirectories to the block.
Yields every regular file inside dir and any subdirectories to the block. The argument can also be an array of directories.
Prints single match to the output.
Prints given matches to the output.
Parses the content of single match and prints it formatted into the output.
Prints the raw content of single match to the output.
Searches topics in area and yields matches to the block.
Searches topics in area and returns an array of the matches.
Searches for topics in area and prints matching sections.
Returns the number of matches.
Instance Method Detail
Prints version information into io.
The information printed includes the program version and the date it was built.
If a configuration object is given and the log level is higher than
Notice
, it includes additional information like the corresponding
Git commit hash (provided it was available at compile time).