termimad-0.31.1/.cargo_vcs_info.json 0000644 00000000136 00000000001 0012720 0 ustar {
"git": {
"sha1": "f31a3b59f6dbf66fbee61413218fd89d237a2220"
},
"path_in_vcs": ""
} termimad-0.31.1/.github/workflows/deny.yml 0000644 0000000 0000000 00000001326 10461020230 0016571 0 ustar 0000000 0000000 on: [push, pull_request]
name: cargo-deny
jobs:
deny:
name: deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.73.0
- name: Cache
uses: Swatinem/rust-cache@v2
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
termimad-0.31.1/.gitignore 0000644 0000000 0000000 00000000051 10461020230 0013474 0 ustar 0000000 0000000 /target
Cargo.lock
trav
.bacon-locations
termimad-0.31.1/CHANGELOG.md 0000644 0000000 0000000 00000040164 10461020230 0013326 0 ustar 0000000 0000000 *If you're reading this because you try make sense of some new API or a breaking change, you might also be interested in coming to the chat for explanations or guidance.*
### v0.31.1 - 2024-11-17
- TextView::try_scroll_pages now accepts float values (anything `Into`)
### v0.31.0 - 2024-10-26
- reexport crossbeam
- new Ticker tool: emit tick(s) on a channel
### v0.30.1 - 2024-10-10
- input_field#display returns the curstor position if it's rendered - experimental - Thanks @xubaiwang
### v0.30.0 - 2024-08-12
- upgrade crossterm to 0.28
### v0.29.4 - 2024-06-17
- fix compilation with `default-features = false` - Fix #62
### v0.29.3 - 2024-06-13
- `ask!` macro doesn't need separate imports anymore
### v0.29.2 - 2024-04-24
- update Crokey to 1.0.0
### v0.29.1 - 2024-02-10
- event source's `combining` now `false` by default
### v0.29.0 - 2024-01-29
- list items are now by default indented as blocks. It's possible to revert to the old rendering (only the first line indented) with the list_items_identation_mod field of the skin - Fix #21
### v0.28.2 - 2024-01-26
- Better support of repeated keys in EventSource
### v0.28.1 - 2024-01-20
- EventSource by default mandates modifier (or space) for combinations with multiple simple keys. This can be changed with an option
### v0.28.0 - 2024-01-18
- Major change: termimad and its coolor and crokey dependencies now use the version 0.27 of Crossterm, which brings many breaking changes but allows new capabilities in key events handling. Termimad's EventSource now outputs key combinations along crossterm events.
### v0.27.0 - 2024-01-08
- paragraphs, code blocks, headers, and tables can be given a left_margin and a right_margin - Fix #11
### v0.26.1 - 2023-11-05
- can_move_left and can_move_right functions on InputField
### v0.26.0 - 2023-11-03
- MadSkin and other structs now implement serde::Serialize - Fix #19
### v0.25.7 - 2023-10-31
- upgrade coolor, removing the ansi_colours dependency, fixing a license incompatibility - Fix #51
### v0.25.6 - 2023-10-31
- upgrade terminal-clipboard due to RUSTSEC-2021-0019 in its X11 dependency
### v0.25.5 - 2023-10-16
- dependency version updated
### v0.25.3 - 2023-10-12
- coolor updated to 0.5.1
### v0.25.2 - 2023-09-03
- fix shift-key extending the selection
### v0.25.1 - 2023-09-01
- option for rounded corner tables in skin - see test-template example
### v0.25.0 - 2023-08-20
- `skin.limit_to_ascii()` makes the characters used for table borders, bullets, etc. be in the non extended ASCII range - see "high-compatibility" example
### v0.24.1 - 2023-08-15
- attribute parsing support RapidBlink and SlowBlink
- better error reporting on parsing invalid grey level
### v0.24.0 - 2023-08-13
- gray panicking on out of range level has been changed to a silent clamping
- skin now deserializable with serde
- several utilities to parse colors and style elements
### v0.23.2 - 2023-08-02
- utility functions (`FmtText::content_width` and `FmtText::set_rendering_width`) and example (content-align) helping base alignments on the content's width rather than the terminal's width
### v0.23.1 - 2023-06-15
- reexport coolor to ease dependency managment
### v0.23.0 - 2023-03-09
- FmtText::raw_str function to build a text with no markdown interpretation
### v0.22.0 - 2023-03-02
- with 1, 2, or 3 spaces before a bullet, you make a deeper list item - Fix #41
### v0.21.1 - 2023-02-25
- expose the DisplayableLine struct, which can be useful for some widgets
### v0.21.0 - 2023-02-05
- parsing markdown with options (clean indentation, continue spans); see parse-options example - Fix #38
### v0.20.6 - 2022-12-15
- fix cases of selection becoming wider than content in input field
### v0.20.5 - 2022-12-15
- fix coolor version to prevent a dependency version problem with crossterm
### v0.20.4 - 2022-12-03
- reexport crossterm
### v0.20.3 - 2022-09-20
- fix some '\' not being rendered because being incorrectly considered as escaping
### v0.20.2 - 2022-06-07
- update crossterm to 0.23.1 and coolor to 0.5
### v0.20.1 - 2022-04-14
- upgrade coolor to 0.4 (which is pure rust) to fix a cross-compilation problem
### v0.20.0 - 2021-12-25
- better algorithm for fitting tables, taking into account the whole column and not just its max width
- some fitting functions which could panic on an assert in extrem cases now return a Result (there are unlikely to be used directly so this shouldn't lead to breaking changes)
### v0.19.4 - 2021-12-22
- fix a case of crash in input field
### v0.19.3 - 2021-12-01
- fix dimension of drawn Rect
### v0.19.2 - 2021-11-28
- better support of wide characters in InputField
### v0.19.1 - 2021-11-26
- update Crossterm to 0.22.1 to fix some bugs
### v0.19.0 - 2021-11-15
- addition of the small `Rect` utility, which lets you draw rects
### v0.18.0 - 2021-11-11
- MadSkin blend_with function allows blending a skin with a color, with a given weight, enabling for example fading a skin into its background, which can be useful for displaying behind a dialog
### v0.17.1 - 2021-11-06
- InputField: fix suppr key at end of line not joining lines
### v0.17.0 - 2021-10-29
Several event related API have changed in a breaking way in this release
- EventSource now emits instances of TimedEvent, which wrap crossterm events
- InputField: selection & selection based operation (cut, copy, paste)
- InputField: double click selects the word around
### v0.16.4 - 2021-10-22
- Remove the need to explicitly import minimad for crates using mad_print_inline!
- InputField: remove `\r` from edited strings
### v0.16.3 - 2021-10-16
- Minimad's new TableBuilder, a facility to build text templates for tables
### v0.16.2 - 2021-09-27
- insert_str function in InputField
### v0.16.1 - 2021-09-08
- Home and End key now move to start and end of lines (i.e. no more of text) in multi-lines input fields
- several improvements and small fixes in input fields and scrolling
- TextView and MadView don't erase right of their area anymore
### v0.16.0 - 2021-09-05
- some scroll API now use unsigned ints instead of i32
- input fields much improved. Can now be several lines - see examples/inputs
- the API of InputFields changed - but adapting user code should be straighforward:
- Replace `set_content(&str)` with `set_str(AsRef)` or `clear()`.
- Use `set_focus(bool)` instead of the `focused` field (now private).
- Use `area()` and `set_area(Area)` instead of the `area` field (now private).
### v0.15.0 - 2021-08-29
- organize and augment the utilities dedicated to writing text, formatted or not, in a limited size area
- remove the Result type
- upgrade crossterm to 0.21
### v0.14.3 - 2021-08-23
- password mode in input field
### v0.14.2 - 2021-08-09
- add `MadSkin::default_dark` and `MadSkin::default_light`, two default skins suitable for specific kind of terminals
### v0.14.1 - 2021-08-06
- change default skin to ensure it's readable whatever the terminal theme
### v0.14.0 - 2021-07-07
- `ask!` macro and `Question` API
- the `mad_print_inline` and `mad_write_inline` macros now accept any argument supporting `to_string()` and not just `&str`
- fix a bug making tables sometimes exceed the width limit
### v0.13.0 - 2021-06-29
- support wide chars everywhere, rewritten algorithms for markdown wrapping and fitting
### v0.12.1 - 2021-06-24
- improved heuristics for table fitting & wrapping
### v0.12.0 - 2021-06-24
- upgrade crossterm to 0.20 (beware that crossterm's API changed)
### v0.11.1 - 2021-06-03
- fix some problems (including a crash) with input_field.del_word_right
### v0.11.0 - 2021-06-02
- eases imports: it's no more needed to import the lazy_static crate and no import is needed for using macros
### v0.10.3 - 2021-05-28
- fix a pb with wide chars in tables
### v0.10.2 - 2021-04-27
- consider backspace as having a col width of -1 (they move the cursor to the left when printed in terminal)
### v0.10.1 - 2021-03-18
- Fix a crash in `input_field.del_word_left()`
### v0.10.0 - 2021-02-15
- Style characters can now be escaped with a '\' - Fix #24
### v0.9.7 - 2021-02-10
- MadSkin::no_style() builds a skin without any style information, suitable for writing in files
### v0.9.6 - 2021-02-07
- fix a bad column widths reduction
### v0.9.5 - 2021-01-31
- names of variables in templates can now contain digits
- better column balancing in thight tables
### v0.9.4 - 2021-01-29
- update crossbeam dependency to 0.8
### v0.9.3 - 2021-01-27
- new version of minimad -> owning templates allow passing any Display as value
### v0.9.2 - 2020-12-21
- styled_char and compound_style now implement Debug
### v0.9.1 - 2020-11-27
- event source intercepts escape sequences and sends them (when finished) in a dedicated channel
(not reading this bounded channel is possible: escape sequences are just dropped in that case)
### v0.8.30 - 2020-11-13
- add the FitStr utility taken from broot (correct string cutting taking real char width in cols)
(note that not all functions in termimad precisely take all chars width in cols into account)
### v0.8.29 - 2020-10-15
- allow default value in template expansion
### v0.8.29 - 2020-10-15
- allow default value in template expansion
### v0.8.28 - 2020-10-11
- use the OwningTemplateExpander of Minimad 0.6.6
### v0.8.27 - 2020-10-07
- fix inverted move_left and move_to_start
### v0.8.26 - 2020-08-07
- upgrade crossterm to 0.17.7
### v0.8.25 - 2020-07-13
- interpred lines with just ">" as empty quotes
- fix panic on wrapping long strings without space
### v0.8.24 - 2020-06-22
- add a bunch of functions modifying the input (moving the cursor or deleting parts)
### v0.8.23 - 2020-05-29
- fix uppercase letters not used in input field
### v0.8.22 - 2020-05-25
- Prevent overflowing of large text from input field (some ellipsis added if necessary)
### v0.8.21 - 2020-05-13
- EventSource: better manage channel errors
### v0.8.20 - 2020-05-10
- relax the dependency version contraint on crossterm - Fix #18
### v0.8.18 - 2020-05-05
- input fields now have a "focused" bool in their state
### v0.8.17 - 2020-02-28
- added event handling functions in input_field for when you don't use termimad events or have a complex event dispatching
### v0.8.16 - 2020-02-26
- key modifiers in click events in event_source
- the new experimental feature flag: `special-renders` lets you define replacement chars (for now) with a out of skin rendering (contact me if you're interested by this kind of feature)
### v0.8.15 - 2020-02-22
- clear function in compound_style
### v0.8.14 - 2020-02-16
- check w in double-click detection
### v0.8.13 - 2020-02-08
- use crossterm 0.16.0 for slightly improved attributes storage
### v0.8.13 - 2020-01-19
- use crossterm 0.15 to fix ctrl-J being read as Enter
### v0.8.11 - 2020-01-19
- fix missing background on space after bullet in list
### v0.8.10 - 2020-01-11
- use crossterm 0.14.2 for freeBSD compatibility
### v0.8.9 - 2019-12-30
- fix the Enter key not recognized in combinations on some computers by normalizing '\r' and '\n' into 'Enter'
### v0.8.8 - 2019-12-26
- allow language specification in code fences
### v0.8.5 - 2019-12-20
- code fences support
### v0.8.4 - 2019-12-16
- fix a compilation problem on windows (see https://github.com/Canop/termimad/issues/13#issuecomment-565848039)
### v0.8.3 - 2019-12-15
- port to crossterm 0.14
### v0.8.2 - 2019-11-29
- skin.print_expander makes using a text template less verbose
### v0.8.1 - 2019-11-29
- TextView: draw the background till the end of line
### v0.8.0 - 2019-11-24
- Templates allow going further in separating form from content
### v0.7.6 - 2019-11-15
- fix skin's background not applied on empty lines at end of text_view
- use version minimad 0.4.3 to fix case of code not detected when following italic without space in between
### v0.7.5 - 2019-11-13
- fix skin's background not applied on empty lines at end of text_view
### v0.7.4 - 2019-11-11
- introduce inline templates, and especially the `mad_print_inline!` and `mad_write_inline!` macros
- add functions to shrink or extend a composite to a given width, using internal elision if possible
### v0.7.3 - 2019-11-08
- add easy alternate to `skin.print_text` handling IO error
### v0.7.2 - 2019-11-04
- incorporate crossterm 0.13.2 which fixes a regression on input reader
### v0.7.1 - 2019-11-03
- compatibility with crossterm 0.13
- mouse support in stderr
### v0.7.0 - 2019-09-22
- Displaying can be done on stderr or stdout, or in a subshell
### v0.6.6 - 2019-10-05
- provide a default terminal width when the real one can't be measured
### v0.6.5 - 2019-08-31
- list view: autoscroll on selection change
- list view: select_first_line & select_last_line
### v0.6.4 - 2019-08-02
- add ProgressBar
### v0.6.3 - 2019-08-01
- improvements of ListView
### v0.6.2 - 2019-07-31
- fix build inconsistencies due to lack of precise sub crate versionning in crossterm
### v0.6.1 - 2019-07-29
- add modifiable style for the input_field
### v0.6.0 - 2019-07-28
Some tools that were parts of several Termimad based applications are now shared here:
- an event source emmiting events on a crossbeam channel
- an input field
- a list view with auto-resized columns
### v0.5.1 - 2019-07-21
- a few utilies exported for apps with specific usages (compute_scrollbar, spacing.print_str, etc.)
### v0.5.0 - 2019-07-09
- different styles for inline_code and code_block
- rgb now longer a macro but a free function
- two more color functions: ansi and gray
- clean and complete documentation
### v0.4.0 - 2019-07-02
- support for horizontal rule (line made of dashes)
- support for quote (line starting with '>')
- support for bullet style customization (including colors)
- better wrapping, less frequently breaks words
- Skin API *breaking changes* to allow for more customization
termimad-0.31.1/Cargo.lock 0000644 00000067243 00000000001 0010707 0 ustar # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
dependencies = [
"memchr",
]
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anyhow"
version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "bumpalo"
version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "cc"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"libc",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-targets 0.48.5",
]
[[package]]
name = "cli-log"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d2ab00dc4c82ec28af25ac085aecc11ffeabf353755715a3113a7aa044ca5cc"
dependencies = [
"chrono",
"file-size",
"log",
"proc-status",
]
[[package]]
name = "clipboard-win"
version = "4.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362"
dependencies = [
"error-code",
"str-buf",
"winapi",
]
[[package]]
name = "clipboard_macos"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95"
dependencies = [
"objc",
"objc-foundation",
"objc_id",
]
[[package]]
name = "coolor"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "691defa50318376447a73ced869862baecfab35f6aabaa91a4cd726b315bfe1a"
dependencies = [
"crossterm",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]]
name = "crokey"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520e83558f4c008ac06fa6a86e5c1d4357be6f994cce7434463ebcdaadf47bb1"
dependencies = [
"crokey-proc_macros",
"crossterm",
"once_cell",
"serde",
"strict",
]
[[package]]
name = "crokey-proc_macros"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "370956e708a1ce65fe4ac5bb7185791e0ece7485087f17736d54a23a0895049f"
dependencies = [
"crossterm",
"proc-macro2",
"quote",
"strict",
"syn 1.0.109",
]
[[package]]
name = "crossbeam"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c"
dependencies = [
"cfg-if",
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-epoch",
"crossbeam-queue",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-channel"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
dependencies = [
"cfg-if",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
dependencies = [
"cfg-if",
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
dependencies = [
"autocfg",
"cfg-if",
"crossbeam-utils",
"memoffset 0.9.0",
"scopeguard",
]
[[package]]
name = "crossbeam-queue"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
dependencies = [
"cfg-if",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossterm"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
dependencies = [
"bitflags 2.4.2",
"crossterm_winapi",
"mio",
"parking_lot",
"rustix",
"signal-hook",
"signal-hook-mio",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
dependencies = [
"winapi",
]
[[package]]
name = "deser-hjson"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b4fe3d77c19507c98946cbc1077ee3c1b50222b4aafcd248e40f4137913ad98"
dependencies = [
"serde",
]
[[package]]
name = "diff"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
[[package]]
name = "errno"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "error-code"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
dependencies = [
"libc",
"str-buf",
]
[[package]]
name = "file-size"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9544f10105d33957765016b8a9baea7e689bf1f0f2f32c2fa2f568770c38d2b3"
[[package]]
name = "gethostname"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "hermit-abi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "iana-time-zone"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "itoa"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "js-sys"
version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "lazy-regex"
version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "576c8060ecfdf2e56995cf3274b4f2d71fa5e4fa3607c1c0b63c10180ee58741"
dependencies = [
"lazy-regex-proc_macros",
"once_cell",
"regex",
]
[[package]]
name = "lazy-regex-proc_macros"
version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9efb9e65d4503df81c615dc33ff07042a9408ac7f26b45abee25566f7fbfd12c"
dependencies = [
"proc-macro2",
"quote",
"regex",
"syn 2.0.38",
]
[[package]]
name = "libc"
version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "linux-raw-sys"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "lock_api"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "malloc_buf"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
dependencies = [
"libc",
]
[[package]]
name = "memchr"
version = "2.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
[[package]]
name = "memoffset"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
"autocfg",
]
[[package]]
name = "memoffset"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
dependencies = [
"autocfg",
]
[[package]]
name = "minimad"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6c4610f430e49b882fcaad0186134150d4d74fc76080b0a61f7000460c2e268"
dependencies = [
"once_cell",
]
[[package]]
name = "mio"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
"hermit-abi",
"libc",
"log",
"wasi",
"windows-sys",
]
[[package]]
name = "nix"
version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
dependencies = [
"bitflags 1.3.2",
"cfg-if",
"libc",
"memoffset 0.7.1",
]
[[package]]
name = "num-traits"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
dependencies = [
"autocfg",
]
[[package]]
name = "objc"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
dependencies = [
"malloc_buf",
]
[[package]]
name = "objc-foundation"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
dependencies = [
"block",
"objc",
"objc_id",
]
[[package]]
name = "objc_id"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
dependencies = [
"objc",
]
[[package]]
name = "once_cell"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "parking_lot"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-targets 0.48.5",
]
[[package]]
name = "pretty_assertions"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
dependencies = [
"diff",
"yansi",
]
[[package]]
name = "proc-macro2"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [
"unicode-ident",
]
[[package]]
name = "proc-status"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0e0c0ac915e7b76b47850ba4ffc377abde6c6ff9eeace61d0a89623db449712"
dependencies = [
"thiserror",
]
[[package]]
name = "quote"
version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "regex"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaac441002f822bc9705a681810a4dd2963094b9ca0ddc41cb963a4c189189ea"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5011c7e263a695dc8ca064cddb722af1be54e517a280b12a5356f98366899e5d"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "rustix"
version = "0.38.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
dependencies = [
"bitflags 2.4.2",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "ryu"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.38",
]
[[package]]
name = "serde_json"
version = "1.0.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
dependencies = [
"itoa",
"ryu",
"serde",
]
[[package]]
name = "signal-hook"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
dependencies = [
"libc",
"signal-hook-registry",
]
[[package]]
name = "signal-hook-mio"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
"mio",
"signal-hook",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc",
]
[[package]]
name = "smallvec"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
[[package]]
name = "str-buf"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
[[package]]
name = "strict"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f42444fea5b87a39db4218d9422087e66a85d0e7a0963a439b07bcdf91804006"
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "termimad"
version = "0.31.1"
dependencies = [
"anyhow",
"cli-log",
"coolor",
"crokey",
"crossbeam",
"deser-hjson",
"lazy-regex",
"minimad",
"pretty_assertions",
"serde",
"serde_json",
"terminal-clipboard",
"thiserror",
"unicode-width",
]
[[package]]
name = "terminal-clipboard"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e0fd8cb5cf744b501e657eb27df7909ff917eacbfee34bc4bb13d4e6411a131"
dependencies = [
"clipboard-win",
"clipboard_macos",
"once_cell",
"termux-clipboard",
"x11-clipboard",
]
[[package]]
name = "termux-clipboard"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f6aff13ca3293315b94f6dbd9c69e1c958fe421c294681e2ffda80c9858e36f"
[[package]]
name = "thiserror"
version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.38",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-width"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.38",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.38",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-wsapoll"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e"
dependencies = [
"winapi",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm 0.48.5",
"windows_aarch64_msvc 0.48.5",
"windows_i686_gnu 0.48.5",
"windows_i686_msvc 0.48.5",
"windows_x86_64_gnu 0.48.5",
"windows_x86_64_gnullvm 0.48.5",
"windows_x86_64_msvc 0.48.5",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "x11-clipboard"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b41aca1115b1f195f21c541c5efb423470848d48143127d0f07f8b90c27440df"
dependencies = [
"x11rb",
]
[[package]]
name = "x11rb"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a"
dependencies = [
"gethostname",
"nix",
"winapi",
"winapi-wsapoll",
"x11rb-protocol",
]
[[package]]
name = "x11rb-protocol"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc"
dependencies = [
"nix",
]
[[package]]
name = "yansi"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
termimad-0.31.1/Cargo.toml 0000644 00000006005 00000000001 0010717 0 ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2021"
rust-version = "1.56"
name = "termimad"
version = "0.31.1"
authors = ["dystroy "]
build = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Markdown Renderer for the Terminal"
readme = "README.md"
keywords = [
"markdown",
"terminal",
"tui",
"renderer",
"parser",
]
categories = [
"command-line-interface",
"text-processing",
"template-engine",
]
license = "MIT"
repository = "https://github.com/Canop/termimad"
resolver = "1"
[lib]
name = "termimad"
path = "src/lib.rs"
[[example]]
name = "ask"
path = "examples/ask/main.rs"
[[example]]
name = "content-align"
path = "examples/content-align/main.rs"
[[example]]
name = "fit-width"
path = "examples/fit-width/main.rs"
[[example]]
name = "high-compatibility"
path = "examples/high-compatibility/main.rs"
[[example]]
name = "indented-code"
path = "examples/indented-code/main.rs"
[[example]]
name = "inline-template"
path = "examples/inline-template/main.rs"
[[example]]
name = "inputs"
path = "examples/inputs/main.rs"
[[example]]
name = "parse-options"
path = "examples/parse-options/main.rs"
[[example]]
name = "progress"
path = "examples/progress/main.rs"
[[example]]
name = "render-input-markdown"
path = "examples/render-input-markdown/main.rs"
[[example]]
name = "scrollable"
path = "examples/scrollable/main.rs"
[[example]]
name = "serialize-skin"
path = "examples/serialize-skin/main.rs"
[[example]]
name = "simple"
path = "examples/simple/main.rs"
[[example]]
name = "skin-file"
path = "examples/skin-file/main.rs"
[[example]]
name = "stderr"
path = "examples/stderr/main.rs"
[[example]]
name = "table"
path = "examples/table/main.rs"
[[example]]
name = "text"
path = "examples/text/main.rs"
[[example]]
name = "text-template"
path = "examples/text-template/main.rs"
[dependencies.coolor]
version = "1.0.0"
features = ["crossterm"]
[dependencies.crokey]
version = "1.1.0"
[dependencies.crossbeam]
version = "0.8"
[dependencies.lazy-regex]
version = "3.2"
[dependencies.minimad]
version = "0.13.0"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.thiserror]
version = "1.0"
[dependencies.unicode-width]
version = "0.1.11"
[dev-dependencies.anyhow]
version = "1.0"
[dev-dependencies.cli-log]
version = "2"
[dev-dependencies.deser-hjson]
version = "2"
[dev-dependencies.pretty_assertions]
version = "1.4"
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.terminal-clipboard]
version = "0.4.1"
[features]
default = ["special-renders"]
special-renders = []
termimad-0.31.1/Cargo.toml.orig 0000644 0000000 0000000 00000002174 10461020230 0014403 0 ustar 0000000 0000000 [package]
name = "termimad"
version = "0.31.1"
authors = ["dystroy "]
repository = "https://github.com/Canop/termimad"
description = "Markdown Renderer for the Terminal"
edition = "2021"
keywords = ["markdown", "terminal", "tui", "renderer", "parser"]
license = "MIT"
categories = ["command-line-interface", "text-processing", "template-engine"]
readme = "README.md"
rust-version = "1.56"
resolver = "1"
[features]
special-renders = []
default = ["special-renders"]
[dependencies]
coolor = { version="1.0.0", features=["crossterm"] }
crokey = "1.1.0"
crossbeam = "0.8"
lazy-regex = "3.2"
minimad = "0.13.0"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
unicode-width = "0.1.11"
# cli-log = "2.0"
[dev-dependencies]
anyhow = "1.0"
cli-log = "2"
deser-hjson = "2"
pretty_assertions = "1.4"
serde_json = "1"
terminal-clipboard = "0.4.1"
[patch.crates-io]
# coolor = { path = "../coolor" }
# crokey = { path = "../crokey" }
# crossterm = { path = "../crossterm" }
# minimad = { path = "../minimad" }
# terminal-clipboard = { path = "../terminal-clipboard" }
# lazy-regex = { path = "../lazy-regex" }
termimad-0.31.1/LICENSE 0000644 0000000 0000000 00000002046 10461020230 0012517 0 ustar 0000000 0000000 MIT License
Copyright (c) 2019 Canop
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
termimad-0.31.1/README.md 0000644 0000000 0000000 00000027350 10461020230 0012776 0 ustar 0000000 0000000 [![MIT][s2]][l2] [![Latest Version][s1]][l1] [![docs][s3]][l3] [![Chat on Miaou][s4]][l4]
[s1]: https://img.shields.io/crates/v/termimad.svg
[l1]: https://crates.io/crates/termimad
[s2]: https://img.shields.io/badge/license-MIT-blue.svg
[l2]: LICENSE
[s3]: https://docs.rs/termimad/badge.svg
[l3]: https://docs.rs/termimad/
[s4]: https://miaou.dystroy.org/static/shields/room.svg
[l4]: https://miaou.dystroy.org/3
## Introduction
Termimad is a set of cross-platform utilities dedicated to CLI and TUI apps,
- leveraging Markdown to format terminal rendering, allowing separation of structure, data and skin,
- using [crossterm](https://github.com/crossterm-rs/crossterm) as backend for styling and event,
- based on [crokey](https://docs.rs/crokey/latest/crokey/) for key combinations support
- with a focus on total control and performances, with no active loop,
- using [crossbeam](https://docs.rs/crossbeam/latest/crossbeam/) for event passing,
- striving to be correct, even on Unicode and wide characters
Termimad is **not**
- a TUI framework: Unless you have serious performance concerns or want precise control, you'll find it much easier and faster, when building a TUI application, to just use one of the TUI frameworks of the Rust ecosystem
- a generic Markdown renderer
- consistent or complete in any way
## Markdown in Termimad

The goal isn't to display any markdown text with its various extensions (a terminal isn't really fit for that).
The goal is rather to improve the display of texts in a terminal application when we want both the text and the skin to be easily configured.
**Wrapping**, table balancing, and **scrolling** are essential features of Termimad.
A text or a table can be displayed in an *a priori* unknown part of the screen, scrollable if desired, with a dynamically discovered width.
For example this markdown:
|:-:|:-:|-
|**feature**|**supported**|**details**|
|-:|:-:|-
| tables | yes | pipe based, with or without alignments
| italic, bold | yes | star based |
| inline code | yes | `with backquotes` (it works in tables too)
| code bloc | yes |with tabs or code fences
| syntax coloring | no |
| crossed text | ~~not yet~~ | wait... now it works `~~like this~~`
| horizontal rule | yes | Use 3 or more dashes (`---`)
| lists | yes|* unordered lists supported
| | |* ordered lists *not* supported
| quotes | yes |> What a wonderful time to be alive!
| links | no | (but your terminal already handles raw URLs)
|-
will give different results depending on the width:



## Usage
```toml
[dependencies]
termimad = "0.20"
```
### With the default skin:
```rust
termimad::print_inline("**some** *nested **style*** and `some(code)`");
```
or
```rust
print!("{}", termimad::inline("**some** *nested **style*** and `some(code)`"));
```
Result:

### Inline snippets with a custom skin:
*Inline snippets* are one line or less.
```rust
let mut skin = MadSkin::default();
skin.bold.set_fg(Yellow);
skin.print_inline("*Hey* **World!** Here's `some(code)`");
skin.paragraph.set_fgbg(Magenta, rgb(30, 30, 40));
skin.italic.add_attr(Underlined);
println!("\nand now {}\n", skin.inline("a little *too much* **style!** (and `some(code)` too)"));
```
Result:

#### Texts
*Texts* can be several lines. Tables and code blocks are automatically aligned, justified and consistently wrapped.
```rust
skin.print_text("# title\n* a list item\n* another item");
```
### Scrollable TextView in a raw terminal:

The code for this example is in examples/scrollable. To read the whole text just do
cargo run --example scrollable
### Templates
In order to separate the rendering format from the content, you may want to have some constant markdown and fill some placeholders with dynamic items.
The `format!` macro is not always a good solution for that because you may not be sure the content is free of characters which may mess the markdown.
A solution is to use one of the templating functions or macros.
A template is to markdown what a prepared statement is to SQL: interpreted once and preventing the content to be interpreted as parts of the structure.
#### Inline Templates
Example:
```
mad_print_inline!(
&skin,
"**$0 formula:** *$1*", // the markdown template, interpreted once
"Disk", // fills $0
"2*π*r", // fills $1. Note that the stars don't mess the markdown
);
```

Main difference with using `skin.print_inline(format!( ... ))` to build some markdown and parse it:
* the markdown parsing and template building are done only once (using `once_cell` internally)
* the given values aren't interpreted as markdown fragments and don't impact the style
* arguments can be omited, repeated, given in any order
* no support for fmt parameters or arguments other than `&str` *(in the current version)*
Inline templates are especially convenient combined with automated expansion or ellipsis, for filling a field in a terminal application.
You'll find more examples and advice in the *inline-template* example.
#### Text Template
When you want to fill a multi-line area, for example the help page of your terminal application, you may use a text template.
A template defines placeholders as `${name}` which you may fill when using it.
For example
```
let text_template = TextTemplate::from(r#"
# ${app-name} v${app-version}
It is *very* ${adj}.
"#);
let mut expander = text_template.expander();
expander
.set("app-name", "MyApp")
.set("adj", "pretty")
.set("app-version", "42.5.3");
skin.print_expander(expander);
```
This would render like this:

The values you set with `set` aren't parsed as markdown, so they may freely contain stars or backquotes.
A template is reusable and can be defined from a text content or any string.
By using *sub-templates*, you may handle repetitions. They're handy for lists or tables.
For example
```
let text_template = TextTemplate::from(r#"
|:-:|:-:|:-:|
|**name**|**path**|**description**|
|-:|:-:|:-|
${module-rows
|**${module-name}**|`${app-version}/${module-key}`|${module-description}|
}
|-|-|-|
"#);
let mut expander = text_template.expander();
expander
.set("app-version", "2");
expander.sub("module-rows")
.set("module-name", "lazy-regex")
.set("module-key", "lrex")
.set("module-description", "eases regexes");
expander.sub("module-rows")
.set("module-name", "termimad")
.set("module-key", "tmd")
.set_md("module-description", "do things on *terminal*");
skin.print_expander(expander);
```
to get

On this example, you can note that
* `sub("module-rows")` gets an expander for the sub template called `module-rows`
* `set_md` can be used when you want to insert not just a raw uninterpreted string but some inline markdown.
* you don't need to fill global placeholders again (here `${app-version}`).
If you want to insert a block of code, you may use `set_lines` which applies the line style to all passed lines.
For example
```
let text_template = TextTemplate::from(r#"
## Example of a code block
${some-function}
"#);
let mut expander = text_template.expander();
expander.set_lines("some-function", r#"
fun test(a rational) {
irate(a)
}
"#);
skin.print_expander(expander);
```
to get

You'll find more text template functions in the documentation and in the example (run `cargo run --example text-template`).
You may also be interested in `OwningTemplateExpander`: an alternative expander owning the values which may be handy when you build them while iterating in sub templates.
### Asking questions
A frequent need in CLI apps is to ask the user to select an answer.
The `Question` API and the `ask!` macros cover most basic needs.
Here's an example of asking with a default choice (that you get by hitting *enter*) and a returned value:
```rust
let choice = ask!(skin, "Do you want to drink something ?", ('n') {
('w', "I'd like some **w**ater, please.") => {
mad_print_inline!(skin, "*Wait a minute, please, I'll fetch some.*\n");
Some("water")
}
('b', "Could I get a **b**eer glass ?") => {
mad_print_inline!(skin, "We have no glass, so here's a *bottle*.\n");
Some("beer")
}
('n', "*No*, thank you.") => {
None
}
});
dbg!(choice);
```

### Skin Files
A `MadSkin` can be deserialized using serde.
For example, such a skin in Hjson could be
```Hjson
bold: "#fb0 bold"
italic: dim italic
strikeout: crossedout red
bullet: ○ yellow bold
paragraph: gray(20)
code_block: gray(2) gray(15) center
headers: [
yellow bold center
yellow underlined
yellow
]
quote: > red
horizontal-rule: "~ #00cafe"
table: "#540 center"
scrollbar: "#fb0 gray(11) |"
```
Execute `cargo run --example skin-file` for an example and explanations.
## Events and inputs
Termimad also includes a few utilities helping efficient managing of events and user input in a multithread application.
## Advices to get started
* Start by reading the examples (in `/examples`): they cover almost the whole API, including templates, how to use an alternate screen or scroll the page, etc. Many examples print a bunch of relevant documentation.
* The render-input-markdown example lets you type some markdown in a text area and see it rendered below
* Be careful that some colors aren't displayable on all terminals. The default color set of your application should not include arbitrary RGB colors.
* The event / event-source part of Termimad is currently tailored for a short number of applications. If you use it or want to use it, please come and tell me so that your needs are taken into account!
* If your goal is to format some CLI application output, for example a few tables, have a look at [dysk](https://github.com/Canop/dysk) which is one of the simplest possible uses
* If a feature is missing, or you don't know how to use some part, come and ping me on [my chat](https://miaou.dystroy.org/3768) during West European hours.
## Open-source applications using termimad
* [broot](https://github.com/Canop/broot) is a file manager and uses termimad for its help screen, status information and event management
* [lfs](https://github.com/Canop/lfs) is a linux utility displaying file systems. Termimad templates are used to show the data in tables
* [SafeCloset](https://github.com/Canop/safecloset) is a secret safe. Its TUI uses Termimad a lot, especially inputs
* [Rhit](https://github.com/Canop/rhit) is a nginx log analyzer. Termimad templates are used to show the data in tables
* [bacon](https://github.com/Canop/bacon) is a background Rust compiler. It uses Termimad for display and event management
* [lapin](https://github.com/Canop/lapin) is a terminal game. It uses Termimad for display and event management
* [backdown](https://github.com/Canop/backdown) is a file deduplicator. It uses Termimad to print on screen and ask questions
* [Humility](https://github.com/oxidecomputer/humility) is a debugger for embedded systems. It uses Termimad to print Markdown documentation with the `humility doc` subcommand
If you're the author of another application using Termimad, please tell me.
## Crossterm compatibility
[Crossterm](https://github.com/crossterm-rs/crossterm) is a 0.x library which means its API isn't frozen. And it does change sometimes so libraries based on Crossterm can't always use its last version.
Crossterm 0.27.x is reexported by Termimad so you don't have to declare the import yourself. You may use crossterm as `termimad::crossterm`.
termimad-0.31.1/bacon.toml 0000644 0000000 0000000 00000004214 10461020230 0013470 0 ustar 0000000 0000000 # This is a configuration file for the bacon tool
#
# Bacon repository: https://github.com/Canop/bacon
# Complete help on configuration: https://dystroy.org/bacon/config/
default_job = "check-all"
[jobs.check]
command = ["cargo", "check", "--color", "always"]
need_stdout = false
[jobs.check-no-features]
command = ["cargo", "check", "--no-default-features", "--color", "always"]
need_stdout = false
[jobs.check-all]
command = ["cargo", "check", "--all-targets", "--color", "always"]
need_stdout = false
watch = ["tests", "benches", "examples"]
[jobs.clippy]
command = [
"cargo", "clippy", "--all-targets", "--color", "always",
"--",
"-A", "clippy::match_like_matches_macro",
"-A", "clippy::manual_range_contains",
"-A", "clippy::new_without_default",
]
need_stdout = false
watch = ["tests", "benches", "examples"]
[jobs.test]
command = ["cargo", "test", "--color", "always"]
need_stdout = true
watch = ["tests"]
[jobs.ex]
command = ["cargo", "run", "--color", "always", "--example"]
allow_warnings = true
need_stdout = true
[jobs.doc]
command = ["cargo", "doc", "--color", "always", "--no-deps"]
need_stdout = false
# If the doc compiles, then it opens in your browser and bacon switches
# to the previous job
[jobs.doc-open]
command = ["cargo", "doc", "--color", "always", "--no-deps", "--open"]
need_stdout = false
on_success = "back" # so that we don't open the browser at each change
# You can run your application and have the result displayed in bacon,
# *if* it makes sense for this crate. You can run an example the same
# way. Don't forget the `--color always` part or the errors won't be
# properly parsed.
# If you want to pass options to your program, a `--` separator
# will be needed.
[jobs.run]
command = [ "cargo", "run", "--color", "always" ]
need_stdout = true
allow_warnings = true
# You may define here keybindings that would be specific to
# a project, for example a shortcut to launch a specific job.
# Shortcuts to internal functions (scrolling, toggling, etc.)
# should go in your personal prefs.toml file instead.
[keybindings]
a = "job:check-all"
i = "job:initial"
c = "job:clippy"
d = "job:doc-open"
t = "job:test"
r = "job:run"
termimad-0.31.1/deny.toml 0000644 0000000 0000000 00000004524 10461020230 0013351 0 ustar 0000000 0000000 [licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
allow = []
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
deny = []
# The lint level for licenses considered copyleft
copyleft = "deny"
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will only be approved if it is both OSI-approved *AND* FSF/Free
# * either - The license will be approved if it is either OSI-approved *OR* FSF/Free
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF/Free
# * fsf-only - The license will be approved if is FSF/Free *AND NOT* OSI-approved
# * neither - The license will be denied if is FSF/Free *OR* OSI-approved
allow-osi-fsf-free = "either"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
# [possible values: any between 0.0 and 1.0].
confidence-threshold = 0.8
exceptions = [
]
[bans]
# Lint level for when multiple versions of the same crate are detected
multiple-versions = "warn"
# The graph highlighting used when creating dotgraphs for crates
# with multiple versions
# * lowest-version - The path to the lowest versioned duplicate is highlighted
# * simplest-path - The path to the version with the fewest edges is highlighted
# * all - Both lowest-version and simplest-path are used
highlight = "all"
# List of crates that are allowed. Use with care!
allow = [
]
# List of crates to deny
deny = [
# Each entry the name of a crate and a version range. If version is
# not specified, all versions will be matched.
]
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
]
# Similarly to `skip` allows you to skip certain crates during duplicate detection,
# unlike skip, it also includes the entire tree of transitive dependencies starting at
# the specified crate, up to a certain depth, which is by default infinite
skip-tree = [
]
[advisories]
ignore = [
]
termimad-0.31.1/doc/ask.png 0000644 0000000 0000000 00000033323 10461020230 0013545 0 ustar 0000000 0000000 PNG
IHDR D sBIT|d tEXtSoftware gnome-screenshot> .tEXtCreation Time Wed 07 Jul 2021 09:07:18 PM CESTg IDATxy\TMYuX\
\5qRs悙(]r_*i.(j\HٌtX~ ##0|>~d{~YcԾ}b@1
A)b@|2d0+W~r#F'8xQ[|=)/bĈU7CѰaCBCz~ŲeKb踞8ZlIh!-_qCajb*̜9;~d_=ԯ_xP!Ι3?Edd$})={0d\ǐSNu6CbkIFF_>S<<