module Cheet

Defined in:

cheet.cr
cheet/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

Instance Method Summary

Class Method Detail

def self.atx_heading(line, offset = 0_u64) : Heading | Nil #

[View source]
def self.consists_only_of?(string, char) #

[View source]
def self.each_child_recursive(dirname : Dir | Path | String, skip_hidden = true, &) #

Yields every path inside dirname and any subdirectories to the block.


[View source]
def self.each_child_recursive(dirs : Array, &) #

Yields every path inside any directory in dirs and any of its subdirectories to the block.


[View source]
def self.each_file_recursive(dir, &) #

Yields every regular file inside dir and any subdirectories to the block. The argument can also be an array of directories.


[View source]
def self.load_document(path) #

[View source]
def self.print(match : Match, config = Config.new) #

Prints single match to the output.


[View source]
def self.print(matches : Enumerable(Match), config = Config.new) #

Prints given matches to the output.


[View source]
def self.print_content_formatted(match : Match, config = Config.new) #

Parses the content of single match and prints it formatted into the output.


[View source]
def self.print_content_raw(match : Match, config = Config.new) #

Prints the raw content of single match to the output.


[View source]
def self.print_content_raw(content, output = STDOUT) #

Copies raw content into output.


[View source]
def self.print_header(document, output = STDOUT, color = :default) #

[View source]
def self.print_same_file_separator(output = STDOUT, color = :default) #

[View source]
def self.promote_headings(markup : Poor::Markup, levels : Int) #

[View source]
def self.promote_headings(markup : Poor::Markup) #

[View source]
def self.run(area, topics, config) : Int32 #

[View source]
def self.search(area : Area | Nil, topics : Array(Topic), config = Config.new, &) #

Searches topics in area and yields matches to the block.


[View source]
def self.search(area : Area | Nil, topics : Array(Topic), config = Config.new) #

Searches topics in area and returns an array of the matches.


[View source]
def self.search_print(area : Area | Nil, topics : Array(Topic), config = Config.new) #

Searches for topics in area and prints matching sections.

Returns the number of matches.


[View source]
def self.setext_heading(lines, offset = 0_u64) : Heading | Nil #

[View source]

Instance Method Detail

def print_version(io = STDOUT, revision = false) #

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).


[View source]