From 8629c757d9f69ce6ce86f9b4f928cdbe7b28b58e Mon Sep 17 00:00:00 2001 From: kojix2 Date: Sun, 11 Aug 2024 15:03:07 +0000 Subject: [PATCH] deploy: 8671b2fe37f333406cad773fe0d77fadb030da62 --- Wombat.html | 14 +++++++------- index.html | 36 ++++++++++++++++++++++++++---------- index.json | 2 +- search-index.js | 2 +- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/Wombat.html b/Wombat.html index 776183d..2341723 100644 --- a/Wombat.html +++ b/Wombat.html @@ -102,21 +102,21 @@

- + wombat.cr
- + wombat/lib_bat.cr
- + wombat/version.cr @@ -213,7 +213,7 @@


- [View source] + [View source]
@@ -229,7 +229,7 @@


- [View source] + [View source]
@@ -245,7 +245,7 @@


- [View source] + [View source]
@@ -261,7 +261,7 @@


- [View source] + [View source]
diff --git a/index.html b/index.html index e1e0373..6436537 100644 --- a/index.html +++ b/index.html @@ -73,6 +73,11 @@

wombat

+

Wombat is a Crystal binding for bat syntax highlighting library.

+

  • Run shards install

  • +
  • +

    Postinstall script will download the static library to `src/ext' directory.

    +
  • Usage

    -

    Download bat_c

    -
    crystal run scripts/download_static_library.cr
    + +

    + +Example

    +

    If you want to run the example, you need to download the static library first.

    +
    git clone https://github.com/kojix2/wombat
    +shards install
    +crystal run scripts/download_static_library.cr
    require "wombat"
     
     puts Wombat.pretty_string(%{puts "hello world"})
    @@ -104,19 +122,17 @@

    Development

    -

    Maintainability is important.

    +

    Contributing

    -
      -
    1. Fork it (https://github.com/your-github-user/bat/fork)
    2. -
    3. Create your feature branch (git checkout -b my-new-feature)
    4. -
    5. Commit your changes (git commit -am 'Add some feature')
    6. -
    7. Push to the branch (git push origin my-new-feature)
    8. -
    9. Create a new Pull Request
    10. -
    + diff --git a/index.json b/index.json index ba2d3d5..52bf903 100644 --- a/index.json +++ b/index.json @@ -1 +1 @@ -{"repository_name":"wombat","body":"# wombat\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n bat:\n github: kojix2/wombat\n ```\n\n2. Run `shards install`\n\n## Usage\n\nDownload bat_c\n\n```\ncrystal run scripts/download_static_library.cr\n```\n\n```crystal\nrequire \"wombat\"\n\nputs Wombat.pretty_string(%{puts \"hello world\"})\n```\n\n## Development\n\nMaintainability is important. \n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","program":{"html_id":"wombat/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"wombat","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"wombat/Wombat","path":"Wombat.html","kind":"module","full_name":"Wombat","name":"Wombat","abstract":false,"locations":[{"filename":"src/wombat.cr","line_number":4,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L4"},{"filename":"src/wombat/lib_bat.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat/lib_bat.cr#L1"},{"filename":"src/wombat/version.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat/version.cr#L1"}],"repository_name":"wombat","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version /home/runner/work/wombat/wombat/src/wombat`).chomp.stringify }}"}],"class_methods":[{"html_id":"bat_c_version:String-class-method","name":"bat_c_version","abstract":false,"location":{"filename":"src/wombat.cr","line_number":5,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L5"},"def":{"name":"bat_c_version","return_type":"String","visibility":"Public","body":"String.new(Wombat::Bat.bat_c_version)"}},{"html_id":"pretty_print(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":39,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L39"},"def":{"name":"pretty_print","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_print(path:String|Path,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":9,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L9"},"def":{"name":"pretty_print","args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(path.to_s, path.to_s.size, Wombat::Bat::BatInputType::BatFile, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_string(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=false,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=2,highlight_line:Int=-1):String-class-method","name":"pretty_string","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","location":{"filename":"src/wombat.cr","line_number":69,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L69"},"def":{"name":"pretty_string","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"return_type":"String","visibility":"Public","body":"len_ptr = Pointer(LibC::SizeT).malloc\nstr_ptr = Wombat::Bat.bat_pretty_print_to_string(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line), len_ptr)\nstr = String.new(str_ptr, len_ptr.value)\nWombat::Bat.bat_free_string(str_ptr)\nstr\n"}}]}]}} \ No newline at end of file +{"repository_name":"wombat","body":"# wombat\n\nWombat is a Crystal binding for [bat](https://github.com/sharkdp/bat) syntax highlighting library.\n\n- [bat](https://github.com/sharkdp/bat) - A cat(1) clone with wings.\n- [bat_c](https://github.com/kojix2/bat_c) - A C wrapper for bat.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n bat:\n github: kojix2/wombat\n ```\n\n2. Run `shards install`\n3. Postinstall script will download the static library to `src/ext' directory.\n\n## Usage\n\n- [API Documentation](https://kojix2.github.io/wombat/)\n\n### Example\n\nIf you want to run the example, you need to download the static library first.\n\n```\ngit clone https://github.com/kojix2/wombat\nshards install\ncrystal run scripts/download_static_library.cr\n```\n\n```crystal\nrequire \"wombat\"\n\nputs Wombat.pretty_string(%{puts \"hello world\"})\n```\n\n## Development\n\n- Sustainable development is important.\n\n## Contributing\n\n- Your contributions are always welcome!","program":{"html_id":"wombat/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"wombat","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"wombat/Wombat","path":"Wombat.html","kind":"module","full_name":"Wombat","name":"Wombat","abstract":false,"locations":[{"filename":"src/wombat.cr","line_number":4,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L4"},{"filename":"src/wombat/lib_bat.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat/lib_bat.cr#L1"},{"filename":"src/wombat/version.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat/version.cr#L1"}],"repository_name":"wombat","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version /home/runner/work/wombat/wombat/src/wombat`).chomp.stringify }}"}],"class_methods":[{"html_id":"bat_c_version:String-class-method","name":"bat_c_version","abstract":false,"location":{"filename":"src/wombat.cr","line_number":5,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L5"},"def":{"name":"bat_c_version","return_type":"String","visibility":"Public","body":"String.new(Wombat::Bat.bat_c_version)"}},{"html_id":"pretty_print(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":39,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L39"},"def":{"name":"pretty_print","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_print(path:String|Path,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":9,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L9"},"def":{"name":"pretty_print","args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(path.to_s, path.to_s.size, Wombat::Bat::BatInputType::BatFile, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_string(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=false,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=2,highlight_line:Int=-1):String-class-method","name":"pretty_string","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","location":{"filename":"src/wombat.cr","line_number":69,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L69"},"def":{"name":"pretty_string","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"return_type":"String","visibility":"Public","body":"len_ptr = Pointer(LibC::SizeT).malloc\nstr_ptr = Wombat::Bat.bat_pretty_print_to_string(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line), len_ptr)\nstr = String.new(str_ptr, len_ptr.value)\nWombat::Bat.bat_free_string(str_ptr)\nstr\n"}}]}]}} \ No newline at end of file diff --git a/search-index.js b/search-index.js index 015fd35..b1dd3b9 100644 --- a/search-index.js +++ b/search-index.js @@ -1 +1 @@ -crystal_doc_search_index_callback({"repository_name":"wombat","body":"# wombat\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n bat:\n github: kojix2/wombat\n ```\n\n2. Run `shards install`\n\n## Usage\n\nDownload bat_c\n\n```\ncrystal run scripts/download_static_library.cr\n```\n\n```crystal\nrequire \"wombat\"\n\nputs Wombat.pretty_string(%{puts \"hello world\"})\n```\n\n## Development\n\nMaintainability is important. \n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","program":{"html_id":"wombat/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"wombat","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"wombat/Wombat","path":"Wombat.html","kind":"module","full_name":"Wombat","name":"Wombat","abstract":false,"locations":[{"filename":"src/wombat.cr","line_number":4,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L4"},{"filename":"src/wombat/lib_bat.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat/lib_bat.cr#L1"},{"filename":"src/wombat/version.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat/version.cr#L1"}],"repository_name":"wombat","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version /home/runner/work/wombat/wombat/src/wombat`).chomp.stringify }}"}],"class_methods":[{"html_id":"bat_c_version:String-class-method","name":"bat_c_version","abstract":false,"location":{"filename":"src/wombat.cr","line_number":5,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L5"},"def":{"name":"bat_c_version","return_type":"String","visibility":"Public","body":"String.new(Wombat::Bat.bat_c_version)"}},{"html_id":"pretty_print(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":39,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L39"},"def":{"name":"pretty_print","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_print(path:String|Path,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":9,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L9"},"def":{"name":"pretty_print","args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(path.to_s, path.to_s.size, Wombat::Bat::BatInputType::BatFile, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_string(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=false,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=2,highlight_line:Int=-1):String-class-method","name":"pretty_string","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","location":{"filename":"src/wombat.cr","line_number":69,"url":"https://github.com/kojix2/wombat/blob/92744c82f7327041bac83eb475010c8c51934f22/src/wombat.cr#L69"},"def":{"name":"pretty_string","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"return_type":"String","visibility":"Public","body":"len_ptr = Pointer(LibC::SizeT).malloc\nstr_ptr = Wombat::Bat.bat_pretty_print_to_string(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line), len_ptr)\nstr = String.new(str_ptr, len_ptr.value)\nWombat::Bat.bat_free_string(str_ptr)\nstr\n"}}]}]}}) \ No newline at end of file +crystal_doc_search_index_callback({"repository_name":"wombat","body":"# wombat\n\nWombat is a Crystal binding for [bat](https://github.com/sharkdp/bat) syntax highlighting library.\n\n- [bat](https://github.com/sharkdp/bat) - A cat(1) clone with wings.\n- [bat_c](https://github.com/kojix2/bat_c) - A C wrapper for bat.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n ```yaml\n dependencies:\n bat:\n github: kojix2/wombat\n ```\n\n2. Run `shards install`\n3. Postinstall script will download the static library to `src/ext' directory.\n\n## Usage\n\n- [API Documentation](https://kojix2.github.io/wombat/)\n\n### Example\n\nIf you want to run the example, you need to download the static library first.\n\n```\ngit clone https://github.com/kojix2/wombat\nshards install\ncrystal run scripts/download_static_library.cr\n```\n\n```crystal\nrequire \"wombat\"\n\nputs Wombat.pretty_string(%{puts \"hello world\"})\n```\n\n## Development\n\n- Sustainable development is important.\n\n## Contributing\n\n- Your contributions are always welcome!","program":{"html_id":"wombat/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"wombat","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"wombat/Wombat","path":"Wombat.html","kind":"module","full_name":"Wombat","name":"Wombat","abstract":false,"locations":[{"filename":"src/wombat.cr","line_number":4,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L4"},{"filename":"src/wombat/lib_bat.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat/lib_bat.cr#L1"},{"filename":"src/wombat/version.cr","line_number":1,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat/version.cr#L1"}],"repository_name":"wombat","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version /home/runner/work/wombat/wombat/src/wombat`).chomp.stringify }}"}],"class_methods":[{"html_id":"bat_c_version:String-class-method","name":"bat_c_version","abstract":false,"location":{"filename":"src/wombat.cr","line_number":5,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L5"},"def":{"name":"bat_c_version","return_type":"String","visibility":"Public","body":"String.new(Wombat::Bat.bat_c_version)"}},{"html_id":"pretty_print(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":39,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L39"},"def":{"name":"pretty_print","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_print(path:String|Path,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=true,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=1,highlight_line:Int=1)-class-method","name":"pretty_print","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","args_html":"(path : String | Path, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = true, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 1, highlight_line : Int = 1)","location":{"filename":"src/wombat.cr","line_number":9,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L9"},"def":{"name":"pretty_print","args":[{"name":"path","external_name":"path","restriction":"String | Path"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"true","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"1","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"1","external_name":"highlight_line","restriction":"Int"}],"visibility":"Public","body":"Wombat::Bat.bat_pretty_print(path.to_s, path.to_s.size, Wombat::Bat::BatInputType::BatFile, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line))"}},{"html_id":"pretty_string(input:String,language:String|Nil=nil,theme:String|Nil=nil,tab_width:Int=4,colored_output:Bool=true,true_color:Bool=true,header:Bool=false,line_numbers:Bool=true,grid:Bool=true,rule:Bool=true,show_nonprintable:Bool=false,snip:Bool=true,wrapping_mode:Int=1,use_italics:Bool=true,paging_mode:Int=2,highlight_line:Int=-1):String-class-method","name":"pretty_string","abstract":false,"args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"args_string":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","args_html":"(input : String, language : String | Nil = nil, theme : String | Nil = nil, tab_width : Int = 4, colored_output : Bool = true, true_color : Bool = true, header : Bool = false, line_numbers : Bool = true, grid : Bool = true, rule : Bool = true, show_nonprintable : Bool = false, snip : Bool = true, wrapping_mode : Int = 1, use_italics : Bool = true, paging_mode : Int = 2, highlight_line : Int = -1) : String","location":{"filename":"src/wombat.cr","line_number":69,"url":"https://github.com/kojix2/wombat/blob/8671b2fe37f333406cad773fe0d77fadb030da62/src/wombat.cr#L69"},"def":{"name":"pretty_string","args":[{"name":"input","external_name":"input","restriction":"String"},{"name":"language","default_value":"nil","external_name":"language","restriction":"String | ::Nil"},{"name":"theme","default_value":"nil","external_name":"theme","restriction":"String | ::Nil"},{"name":"tab_width","default_value":"4","external_name":"tab_width","restriction":"Int"},{"name":"colored_output","default_value":"true","external_name":"colored_output","restriction":"Bool"},{"name":"true_color","default_value":"true","external_name":"true_color","restriction":"Bool"},{"name":"header","default_value":"false","external_name":"header","restriction":"Bool"},{"name":"line_numbers","default_value":"true","external_name":"line_numbers","restriction":"Bool"},{"name":"grid","default_value":"true","external_name":"grid","restriction":"Bool"},{"name":"rule","default_value":"true","external_name":"rule","restriction":"Bool"},{"name":"show_nonprintable","default_value":"false","external_name":"show_nonprintable","restriction":"Bool"},{"name":"snip","default_value":"true","external_name":"snip","restriction":"Bool"},{"name":"wrapping_mode","default_value":"1","external_name":"wrapping_mode","restriction":"Int"},{"name":"use_italics","default_value":"true","external_name":"use_italics","restriction":"Bool"},{"name":"paging_mode","default_value":"2","external_name":"paging_mode","restriction":"Int"},{"name":"highlight_line","default_value":"-1","external_name":"highlight_line","restriction":"Int"}],"return_type":"String","visibility":"Public","body":"len_ptr = Pointer(LibC::SizeT).malloc\nstr_ptr = Wombat::Bat.bat_pretty_print_to_string(input, input.size, Wombat::Bat::BatInputType::BatBytes, language, theme, Wombat::Bat::BatPrintOptions.new(tab_width: tab_width, colored_output: colored_output, true_color: true_color, header: header, line_numbers: line_numbers, grid: grid, rule: rule, show_nonprintable: show_nonprintable, snip: snip, wrapping_mode: wrapping_mode, use_italics: use_italics, paging_mode: paging_mode, highlight_line: highlight_line), len_ptr)\nstr = String.new(str_ptr, len_ptr.value)\nWombat::Bat.bat_free_string(str_ptr)\nstr\n"}}]}]}}) \ No newline at end of file