From 7fdbd97cdc5d145c0fa2d18afb0249e1b79f7df3 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Sun, 8 Sep 2024 14:41:29 +0200 Subject: [PATCH 01/14] chore: renaming --- Cargo.lock | 136 +++++++++++++++++++++++++------------------------- Cargo.toml | 8 +-- README.md | 100 +++++++++++++++++++------------------ docs/main.md | 22 ++++---- src/config.rs | 4 +- 5 files changed, 136 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffaf307..c019d79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "arbitrary" @@ -228,9 +228,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -252,9 +252,9 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", @@ -328,9 +328,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -706,7 +706,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -818,9 +818,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -1003,9 +1003,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1043,9 +1043,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "itertools" @@ -1347,9 +1347,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -1394,9 +1394,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.3.2+3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" dependencies = [ "cc", ] @@ -1896,9 +1896,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f86ae463694029097b846d8f99fd5536740602ae00022c0c50c5600720b2f71" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ "bytemuck", ] @@ -1926,9 +1926,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -1994,11 +1994,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2030,20 +2030,48 @@ dependencies = [ "libc", ] +[[package]] +name = "see" +version = "0.3.1" +dependencies = [ + "ansi_colours", + "crossterm 0.28.1", + "dirs", + "emojis", + "hyperpolyglot", + "image 0.25.2", + "include_dir", + "inkjet", + "lazy_static", + "markdown", + "openssl-sys", + "reqwest", + "serde", + "serde_json", + "sha2", + "tempfile", + "termcolor", + "toml 0.8.19", + "tree-sitter 0.23.0", + "tree-sitter-highlight 0.23.0", + "url", + "viuer", +] + [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -2052,9 +2080,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -2179,34 +2207,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "smd" -version = "0.3.1" -dependencies = [ - "ansi_colours", - "crossterm 0.28.1", - "dirs", - "emojis", - "hyperpolyglot", - "image 0.25.2", - "include_dir", - "inkjet", - "lazy_static", - "markdown", - "openssl-sys", - "reqwest", - "serde", - "serde_json", - "sha2", - "tempfile", - "termcolor", - "toml 0.8.19", - "tree-sitter 0.23.0", - "tree-sitter-highlight 0.23.0", - "url", - "viuer", -] - [[package]] name = "socket2" version = "0.5.7" @@ -2240,9 +2240,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.76" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -2377,9 +2377,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -2413,9 +2413,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -2463,7 +2463,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -2476,7 +2476,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", diff --git a/Cargo.toml b/Cargo.toml index 18e4c6c..64d1ce1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "smd" +name = "see" version = "0.3.1" edition = "2021" authors = ["Guilherme Prokisch "] -homepage = "https://github.com/guilhermeprokisch/smd" +homepage = "https://github.com/guilhermeprokisch/see" description = "A minimalistic Markdown renderer for the terminal with syntax highlighting, emoji support, and image rendering" license = "MIT" -repository = "https://github.com/guilhermeprokisch/smd" +repository = "https://github.com/guilhermeprokisch/see" readme = "README.md" keywords = ["markdown", "terminal", "renderer", "syntax-highlighting", "emoji"] categories = ["command-line-utilities", "text-processing"] @@ -52,7 +52,7 @@ ci = "github" # The installers to generate for each app installers = ["shell", "homebrew"] # A GitHub repo to push Homebrew formulas to -tap = "guilhermeprokisch/homebrew-smd" +tap = "guilhermeprokisch/homebrew-see" # Target platforms to build apps for (Rust target-triple syntax) targets = [ "aarch64-apple-darwin", diff --git a/README.md b/README.md index e74807a..b446ac1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# smd (Simple Markdown Viewer and Code Viewer) +# see(LI) - A Styled Cat and Markdown Viewer for Your CLI + +> cat you see!? Its a fancy cat! :cat: image image @@ -6,71 +8,71 @@ > [!WARNING] > **DISCLAIMER: This project is currently in alpha stage. It may contain bugs, incomplete features, or undergo significant changes. Use with caution and please report any issues you encounter.** -smd is a minimalistic Markdown renderer for the terminal with syntax highlighting, emoji support, and image rendering. It provides a visually appealing way to view Markdown content directly in your console. +see is a tool that functions as both a minimalistic Markdown renderer and a code viewer for the terminal. It provides syntax highlighting, emoji support, and image rendering capabilities, offering a visually appealing way to view both Markdown content and various code files directly in your console. -## Motivation +# Motivation -The primary goal of smd is to create CLI documentation in Markdown that can be rendered both in the terminal and viewed in a web browser. This dual-format approach aims to: +The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browsers. This approach aims to: -1. Provide a unified documentation format accessible across different environments -2. Enable quick viewing end editing of cli documentations from anywhere +Provide a unified documentation and code viewing format accessible across different environments +Enable quick viewing and editing of CLI documentation and code files from anywhere +Make your CLI experience more visually appealing and informative -As the project evolved, support for more complex Markdown features was added. This expansion opens up possibilities for integration with other documentation tools and workflows, potentially enhancing its utility in diverse development ecosystems. +As the project evolved from its initial focus on Markdown, support for viewing code files was added, expanding its utility in diverse development ecosystems. Now, see is your go-to tool for seeing everything that a cat can see! ## Features -- Rich text rendering in the terminal -- Syntax highlighting for code blocks and standalone code files +- Minimalistic rich markdown rendering in the terminal +- State-of-the-art code viewing capabilities with superior syntax highlighting for a wide range of programming languages, powered by tree-sitter +- More accurate, context-aware syntax highlighting - Emoji support :smile: - Image rendering (when possible) - Clickable links (in supported terminals) - Table formatting -- Task list rendering -- Nested list support - Blockquote styling - And more adding soon! ## Installation -There are several ways to install smd: +There are several ways to install see: ### 1. Install prebuilt binaries via shell script (Recommended) -The easiest and fastest way to install smd is by using our shell script: +The easiest and fastest way to install see is by using our shell script: ```sh -curl --proto '=https' --tlsv1.2 -LsSf https://github.com/guilhermeprokisch/smd/releases/download/v0.2.10/smd-installer.sh | sh +curl --proto '=https' --tlsv1.2 -LsSf https://github.com/guilhermeprokisch/see/releases/download/v0.2.10/see-installer.sh | sh ``` -**DISCLAIMER: The version number in the URL above (v0.2.10) may not be the latest version. Please check the [releases page](https://github.com/guilhermeprokisch/smd/releases) for the most recent version and update the URL accordingly before running the command.** +**DISCLAIMER: The version number in the URL above (v0.2.10) may not be the latest version. Please check the [releases page](https://github.com/guilhermeprokisch/see/releases) for the most recent version and update the URL accordingly before running the command.** ### 2. Using prebuilt binaries from GitHub releases If you prefer to manually download and install the binary: -1. Visit the [smd releases page](https://github.com/guilhermeprokisch/smd/releases) on GitHub. +1. Visit the [see releases page](https://github.com/guilhermeprokisch/see/releases) on GitHub. 2. Find the latest release version. 3. Download the appropriate binary for your operating system and architecture. 4. Extract the downloaded file if necessary. -5. Move the `smd` binary to a directory in your system's PATH (e.g., `/usr/local/bin` on Unix-like systems). +5. Move the `see` binary to a directory in your system's PATH (e.g., `/usr/local/bin` on Unix-like systems). ### 3. Install prebuilt binaries via Homebrew -If you're using Homebrew, you can install smd with: +If you're using Homebrew, you can install see with: ```sh -brew install guilhermeprokisch/smd/smd +brew install guilhermeprokisch/see/see ``` ### 4. Using Cargo -You can install smd directly from crates.io using Cargo: +You can install see directly from crates.io using Cargo: ```bash -cargo install smd +cargo install see ``` -This will download, compile, and install the latest version of smd. Make sure your Rust installation is up to date. +This will download, compile, and install the latest version of see. Make sure your Rust installation is up to date. ### 5. Building from Source @@ -81,8 +83,8 @@ If you prefer to build from source or want to contribute to the project: 2. Clone the repository: ```bash - git clone https://github.com/guilhermeprokisch/smd.git - cd smd + git clone https://github.com/guilhermeprokisch/see.git + cd see ``` 3. Build and install the project using Cargo: @@ -91,48 +93,48 @@ If you prefer to build from source or want to contribute to the project: cargo install --path . ``` -This will compile the project and install the `smd` binary in your Cargo bin directory, which should be in your PATH. +This will compile the project and install the `see` binary in your Cargo bin directory, which should be in your PATH. ## Usage -There are two main ways to use smd: +There are two main ways to use see: ### 1. Rendering a Markdown file To render a Markdown file, simply pass the path to the file as an argument: ```bash -smd path/to/your/markdown_file.md +see path/to/your/markdown_file.md ``` ### 2. Rendering Markdown from piped input -smd can also read Markdown content from standard input, allowing you to pipe content directly into it: +see can also read Markdown content from standard input, allowing you to pipe content directly into it: ```bash -echo "# Hello, *world*" | smd +echo "# Hello, *world*" | see ``` -This feature is particularly useful for integrating smd with other commands or for quickly rendering Markdown snippets. For example: +This feature is particularly useful for integrating see with other commands or for quickly rendering Markdown snippets. For example: ```bash -cat README.md | smd # Render a file's content -curl -sL https://raw.githubusercontent.com/guilhermeprokisch/smd/master/README.md | smd # Render a remote Markdown file +cat README.md | see # Render a file's content +curl -sL https://raw.githubusercontent.com/guilhermeprokisch/see/master/README.md | see # Render a remote Markdown file ``` #### Integration with CLI Tools -smd can be easily integrated with CLI tools to replace traditional man pages with rich Markdown documentation. Here's an example of how you can use smd with a custom CLI tool's --help flag: +see can be easily integrated with CLI tools to replace traditional man pages with rich Markdown documentation. Here's an example of how you can use see with a custom CLI tool's --help flag: ```bash #!/bin/bash # Name: mycli -# Description: Example CLI tool using smd for documentation +# Description: Example CLI tool using see for documentation if [[ "$1" == "--help" ]]; then - # Use smd to render the Markdown help file - smd ~/.mycli/help.md + # Use see to render the Markdown help file + see ~/.mycli/help.md else # Regular CLI functionality echo "Running mycli with arguments: $@" @@ -145,40 +147,40 @@ In this example, create a Markdown file at `~/.mycli/help.md` with your CLI docu This approach allows you to maintain a single source of documentation that's readable in raw form, rendered nicely in the terminal, and viewable in web browsers. -#### Viewing smd's Own Documentation +#### Viewing see's Own Documentation -smd uses itself to display its own documentation. You can view smd's documentation directly in your terminal by running: +see uses itself to display its own documentation. You can view see's documentation directly in your terminal by running: ```bash -smd --help +see --help ``` -This command will render smd's main documentation file `/docs`, giving you a practical example of smd in action and providing detailed information about its usage and features. +This command will render see's main documentation file `/docs`, giving you a practical example of see in action and providing detailed information about its usage and features. -## smd as a Code Viewer (Experimental) +## see as a Code Viewer (Experimental) image -In addition to rendering Markdown, smd serves as a powerful code viewer for the terminal. It provides an efficient way to review code directly in your console with advanced syntax highlighting powered by [tree-sitter](https://github.com/tree-sitter/tree-sitter) which gives more accurate, context-aware syntax highlighting, +In addition to rendering Markdown, see serves as a powerful code viewer for the terminal. It provides an efficient way to review code directly in your console with advanced syntax highlighting powered by [tree-sitter](https://github.com/tree-sitter/tree-sitter) which gives more accurate, context-aware syntax highlighting, Usage: ```bash -smd path/to/your/code_file.py -smd --line-numbers path/to/your/code_file.py # with line numbers +see path/to/your/code_file.py +see --line-numbers path/to/your/code_file.py # with line numbers ``` ## Configuration -smd supports user-defined configuration files. You can customize various aspects of the rendering process by creating a `config.toml` file in the following location: +see supports user-defined configuration files. You can customize various aspects of the rendering process by creating a `config.toml` file in the following location: -- On Linux and macOS: `~/.config/smd/config.toml` -- On Windows: `C:\Users\\AppData\Roaming\smd\config.toml` +- On Linux and macOS: `~/.config/see/config.toml` +- On Windows: `C:\Users\\AppData\Roaming\see\config.toml` You can generate a default configuration file by running: ```bash -smd --generate-config +see --generate-config ``` Here's an example of what you can configure: @@ -198,7 +200,7 @@ show_line_numbers = true - `render_table_borders`: If true, tables will be rendered with ASCII borders (default: false) - `show_line_numbers`: If true, line numbers will be shown for code files (can also be set with `--line-numbers` option) -Note: smd uses [tree-sitter](https://github.com/tree-sitter/tree-sitter) thanks to [inkjet](https://github.com/Colonial-Dev/inkjet) for syntax highlighting. Currently, only one theme is implemented, but there are plans to make smd compatible with Helix editor themes in the future, which will greatly expand customization options. +Note: see uses [tree-sitter](https://github.com/tree-sitter/tree-sitter) thanks to [inkjet](https://github.com/Colonial-Dev/inkjet) for syntax highlighting. Currently, only one theme is implemented, but there are plans to make see compatible with Helix editor themes in the future, which will greatly expand customization options. ## Contributing diff --git a/docs/main.md b/docs/main.md index 0ec188f..3f832fa 100644 --- a/docs/main.md +++ b/docs/main.md @@ -1,12 +1,12 @@ -# smd: simple Markdown and Code renderer +# see: simple Markdown and Code renderer ## Usage ```bash -smd [OPTIONS] [FILE] +see [OPTIONS] [FILE] ``` -If FILE is not provided, smd reads from standard input. +If FILE is not provided, see reads from standard input. ## Options @@ -29,47 +29,47 @@ If FILE is not provided, smd reads from standard input. Render a Markdown file: ```bash -smd path/to/your/markdown_file.md +see path/to/your/markdown_file.md ``` Render a code file without line numbers: ```bash -smd --show-line-numbers=false path/to/your/code_file.py +see --show-line-numbers=false path/to/your/code_file.py ``` Render from standard input: ```bash -echo "# Hello, world" | smd +echo "# Hello, world" | see ``` Generate a default configuration file: ```bash -smd --generate-config +see --generate-config ``` Use a custom configuration file: ```bash -smd --config /path/to/custom/config.toml path/to/your/markdown_file.md +see --config /path/to/custom/config.toml path/to/your/markdown_file.md ``` Render with maximum image dimensions: ```bash -smd --max-image-width=60 --max-image-height=20 path/to/your/markdown_file.md +see --max-image-width=60 --max-image-height=20 path/to/your/markdown_file.md ``` Disable image rendering: ```bash -smd --render-images=false path/to/your/markdown_file.md +see --render-images=false path/to/your/markdown_file.md ``` Enable table borders: ```bash -smd --render-table-borders=true path/to/your/markdown_file.md +see --render-table-borders=true path/to/your/markdown_file.md ``` diff --git a/src/config.rs b/src/config.rs index 895ab73..f23ea1d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -62,7 +62,7 @@ impl AppConfig { } else { dirs::config_dir().unwrap_or_else(|| PathBuf::from(".")) }; - config_dir.join("smd").join("config.toml") + config_dir.join("see").join("config.toml") } } @@ -132,7 +132,7 @@ fn parse_cli_args() -> io::Result<(AppConfig, Option)> { std::process::exit(0); } "version" => { - println!("smd version {}", env!("CARGO_PKG_VERSION")); + println!("see version {}", env!("CARGO_PKG_VERSION")); std::process::exit(0); } "generate-config" => { From 4abf9d65cd89675e9b2b93072dbf344599a12ed3 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Sun, 8 Sep 2024 14:42:31 +0200 Subject: [PATCH 02/14] chore: renaming --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b446ac1..0ca688c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# see(LI) - A Styled Cat and Markdown Viewer for Your CLI +# see(LI) - A Styled Cat and Minimalistic Markdown Viewer > cat you see!? Its a fancy cat! :cat: From fbabfeb9f26b19f32dc7a70fff3defc897c516c4 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Sun, 8 Sep 2024 14:53:08 +0200 Subject: [PATCH 03/14] docs: update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ca688c..2f7ef4b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# see(LI) - A Styled Cat and Minimalistic Markdown Viewer +# seeLI : A Styled Cat and Minimalistic Markdown Viewer > cat you see!? Its a fancy cat! :cat: +> +> +> see cli in a style! + image image From b00bf00d1f33b9917b3e76c4e15797924b07e1aa Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:14:25 +0200 Subject: [PATCH 04/14] docs: updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ca688c..8d00d5e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# see(LI) - A Styled Cat and Minimalistic Markdown Viewer +# see - See a cute cat > cat you see!? Its a fancy cat! :cat: From 93333fde19fc26281c8efbbcde7316dd797af882 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:17:29 +0200 Subject: [PATCH 05/14] wip: 1725880649 --- README.md | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d00d5e --- /dev/null +++ b/README.md @@ -0,0 +1,223 @@ +# see - See a cute cat + +> cat you see!? Its a fancy cat! :cat: + +image +image + +> [!WARNING] +> **DISCLAIMER: This project is currently in alpha stage. It may contain bugs, incomplete features, or undergo significant changes. Use with caution and please report any issues you encounter.** + +see is a tool that functions as both a minimalistic Markdown renderer and a code viewer for the terminal. It provides syntax highlighting, emoji support, and image rendering capabilities, offering a visually appealing way to view both Markdown content and various code files directly in your console. + +# Motivation + +The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browsers. This approach aims to: + +Provide a unified documentation and code viewing format accessible across different environments +Enable quick viewing and editing of CLI documentation and code files from anywhere +Make your CLI experience more visually appealing and informative + +As the project evolved from its initial focus on Markdown, support for viewing code files was added, expanding its utility in diverse development ecosystems. Now, see is your go-to tool for seeing everything that a cat can see! + +## Features + +- Minimalistic rich markdown rendering in the terminal +- State-of-the-art code viewing capabilities with superior syntax highlighting for a wide range of programming languages, powered by tree-sitter +- More accurate, context-aware syntax highlighting +- Emoji support :smile: +- Image rendering (when possible) +- Clickable links (in supported terminals) +- Table formatting +- Blockquote styling +- And more adding soon! + +## Installation + +There are several ways to install see: + +### 1. Install prebuilt binaries via shell script (Recommended) + +The easiest and fastest way to install see is by using our shell script: + +```sh +curl --proto '=https' --tlsv1.2 -LsSf https://github.com/guilhermeprokisch/see/releases/download/v0.2.10/see-installer.sh | sh +``` + +**DISCLAIMER: The version number in the URL above (v0.2.10) may not be the latest version. Please check the [releases page](https://github.com/guilhermeprokisch/see/releases) for the most recent version and update the URL accordingly before running the command.** + +### 2. Using prebuilt binaries from GitHub releases + +If you prefer to manually download and install the binary: + +1. Visit the [see releases page](https://github.com/guilhermeprokisch/see/releases) on GitHub. +2. Find the latest release version. +3. Download the appropriate binary for your operating system and architecture. +4. Extract the downloaded file if necessary. +5. Move the `see` binary to a directory in your system's PATH (e.g., `/usr/local/bin` on Unix-like systems). + +### 3. Install prebuilt binaries via Homebrew + +If you're using Homebrew, you can install see with: + +```sh +brew install guilhermeprokisch/see/see +``` + +### 4. Using Cargo + +You can install see directly from crates.io using Cargo: + +```bash +cargo install see +``` + +This will download, compile, and install the latest version of see. Make sure your Rust installation is up to date. + +### 5. Building from Source + +If you prefer to build from source or want to contribute to the project: + +1. Ensure you have Rust and Cargo installed. If not, get them from [https://rustup.rs/](https://rustup.rs/). + +2. Clone the repository: + + ```bash + git clone https://github.com/guilhermeprokisch/see.git + cd see + ``` + +3. Build and install the project using Cargo: + + ```bash + cargo install --path . + ``` + +This will compile the project and install the `see` binary in your Cargo bin directory, which should be in your PATH. + +## Usage + +There are two main ways to use see: + +### 1. Rendering a Markdown file + +To render a Markdown file, simply pass the path to the file as an argument: + +```bash +see path/to/your/markdown_file.md +``` + +### 2. Rendering Markdown from piped input + +see can also read Markdown content from standard input, allowing you to pipe content directly into it: + +```bash +echo "# Hello, *world*" | see +``` + +This feature is particularly useful for integrating see with other commands or for quickly rendering Markdown snippets. For example: + +```bash +cat README.md | see # Render a file's content +curl -sL https://raw.githubusercontent.com/guilhermeprokisch/see/master/README.md | see # Render a remote Markdown file +``` + +#### Integration with CLI Tools + +see can be easily integrated with CLI tools to replace traditional man pages with rich Markdown documentation. Here's an example of how you can use see with a custom CLI tool's --help flag: + +```bash +#!/bin/bash + +# Name: mycli +# Description: Example CLI tool using see for documentation + +if [[ "$1" == "--help" ]]; then + # Use see to render the Markdown help file + see ~/.mycli/help.md +else + # Regular CLI functionality + echo "Running mycli with arguments: $@" +fi +``` + +In this example, create a Markdown file at `~/.mycli/help.md` with your CLI documentation. When users run `mycli --help`, they'll see a beautifully rendered version of your Markdown documentation instead of a plain text man page. + +image + +This approach allows you to maintain a single source of documentation that's readable in raw form, rendered nicely in the terminal, and viewable in web browsers. + +#### Viewing see's Own Documentation + +see uses itself to display its own documentation. You can view see's documentation directly in your terminal by running: + +```bash +see --help +``` + +This command will render see's main documentation file `/docs`, giving you a practical example of see in action and providing detailed information about its usage and features. + +## see as a Code Viewer (Experimental) + +image + +In addition to rendering Markdown, see serves as a powerful code viewer for the terminal. It provides an efficient way to review code directly in your console with advanced syntax highlighting powered by [tree-sitter](https://github.com/tree-sitter/tree-sitter) which gives more accurate, context-aware syntax highlighting, + +Usage: + +```bash +see path/to/your/code_file.py +see --line-numbers path/to/your/code_file.py # with line numbers +``` + +## Configuration + +see supports user-defined configuration files. You can customize various aspects of the rendering process by creating a `config.toml` file in the following location: + +- On Linux and macOS: `~/.config/see/config.toml` +- On Windows: `C:\Users\\AppData\Roaming\see\config.toml` + +You can generate a default configuration file by running: + +```bash +see --generate-config +``` + +Here's an example of what you can configure: + +```toml +max_image_width = 40 +max_image_height = 13 +render_images = true +render_links = true +render_table_borders = false +show_line_numbers = true +``` + +- `max_image_width` and `max_image_height`: Maximum dimensions for rendered images +- `render_images`: If false, images will not be rendered +- `render_links`: If false, links will not be clickable +- `render_table_borders`: If true, tables will be rendered with ASCII borders (default: false) +- `show_line_numbers`: If true, line numbers will be shown for code files (can also be set with `--line-numbers` option) + +Note: see uses [tree-sitter](https://github.com/tree-sitter/tree-sitter) thanks to [inkjet](https://github.com/Colonial-Dev/inkjet) for syntax highlighting. Currently, only one theme is implemented, but there are plans to make see compatible with Helix editor themes in the future, which will greatly expand customization options. + +## Contributing + +Contributions are welcome! Please feel free to submit a Pull Request. As this project is in alpha, your input and contributions can significantly shape its development. + +## Known Issues + +As this is an alpha version, you may encounter bugs or incomplete features. Some known limitations include: + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +## TODO: + +1. Extended Markdown Support + +2. Improve syntax highlighting + +3. Theming and Customization: Develop user-customizable color schemes and rendering options From 442565a4d7bf7f3b8e9cd5dbc4dacc2293384864 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:19:41 +0200 Subject: [PATCH 06/14] docs: updated --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d00d5e..38bdd48 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# see - See a cute cat +# See, a cute cat. > cat you see!? Its a fancy cat! :cat: @@ -12,7 +12,7 @@ see is a tool that functions as both a minimalistic Markdown renderer and a code # Motivation -The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browsers. This approach aims to: +The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browse:rs. This approach aims to: Provide a unified documentation and code viewing format accessible across different environments Enable quick viewing and editing of CLI documentation and code files from anywhere From d5a77092255afea036f2024ebf3e90a00931b2af Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:20:13 +0200 Subject: [PATCH 07/14] docs: updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38bdd48..7e46e2e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# See, a cute cat. +# see - See a cute cat. > cat you see!? Its a fancy cat! :cat: From e608b2e8485318c6ee44eeaafc6eca218416fffc Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:29:08 +0200 Subject: [PATCH 08/14] feat: rename to see --- Cargo.toml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 64d1ce1..00421b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,29 @@ [package] -name = "see" -version = "0.3.1" +name = "see-cat" +version = "0.1.0" edition = "2021" authors = ["Guilherme Prokisch "] homepage = "https://github.com/guilhermeprokisch/see" -description = "A minimalistic Markdown renderer for the terminal with syntax highlighting, emoji support, and image rendering" +description = "A cute cat(1)" license = "MIT" repository = "https://github.com/guilhermeprokisch/see" readme = "README.md" -keywords = ["markdown", "terminal", "renderer", "syntax-highlighting", "emoji"] +keywords = [ + "markdown", + "cat", + "terminal", + "renderer", + "syntax-highlighting", + "emoji", +] categories = ["command-line-utilities", "text-processing"] include = ["src/**/*", "docs/**/*", "Cargo.toml"] +[[bin]] +name = "see" +path = "src/main.rs" + [dependencies] serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" From c01989f7beefa5dcc57a6848ca509b825b2177fb Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 13:32:47 +0200 Subject: [PATCH 09/14] chore: update crates keywords --- Cargo.toml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 00421b9..a12ae25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,7 @@ description = "A cute cat(1)" license = "MIT" repository = "https://github.com/guilhermeprokisch/see" readme = "README.md" -keywords = [ - "markdown", - "cat", - "terminal", - "renderer", - "syntax-highlighting", - "emoji", -] +keywords = ["markdown", "cat", "terminal", "viewer", "syntax-highlighting"] categories = ["command-line-utilities", "text-processing"] include = ["src/**/*", "docs/**/*", "Cargo.toml"] From c3c029506180178095f621e66bc6a4825314580a Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 18:28:22 +0200 Subject: [PATCH 10/14] docs: updated --- .github/workflows/release.yml | 2 +- Cargo.toml | 7 +-- README.md | 92 +++++++++++++++++++++++++---------- 3 files changed, 67 insertions(+), 34 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bace0f..a31254f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -280,7 +280,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - repository: "guilhermeprokisch/homebrew-smd" + repository: "guilhermeprokisch/homebrew-see" token: ${{ secrets.HOMEBREW_TAP_TOKEN }} # So we have access to the formula - name: Fetch homebrew formulae diff --git a/Cargo.toml b/Cargo.toml index a12ae25..69ddb9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,12 +58,7 @@ installers = ["shell", "homebrew"] # A GitHub repo to push Homebrew formulas to tap = "guilhermeprokisch/homebrew-see" # Target platforms to build apps for (Rust target-triple syntax) -targets = [ - "aarch64-apple-darwin", - "x86_64-apple-darwin", - "x86_64-unknown-linux-gnu", - "x86_64-pc-windows-msvc", -] +targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] # Path that installers should place binaries in install-path = "CARGO_HOME" # Publish jobs to run in CI diff --git a/README.md b/README.md index 7e46e2e..4b8f643 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,21 @@ > [!WARNING] > **DISCLAIMER: This project is currently in alpha stage. It may contain bugs, incomplete features, or undergo significant changes. Use with caution and please report any issues you encounter.** -see is a tool that functions as both a minimalistic Markdown renderer and a code viewer for the terminal. It provides syntax highlighting, emoji support, and image rendering capabilities, offering a visually appealing way to view both Markdown content and various code files directly in your console. +see is a powerful file visualization tool for the terminal, offering advanced code viewing capabilities, Markdown rendering, and more. It provides syntax highlighting, emoji support, and image rendering capabilities, offering a visually appealing way to view various file types directly in your console. -# Motivation +## Features + +- State-of-the-art code viewing capabilities with superior syntax highlighting for a wide range of programming languages, powered by tree-sitter +- More accurate, context-aware syntax highlighting +- Minimalistic rich Markdown rendering in the terminal +- Emoji support :smile: +- Image rendering (when possible) +- Clickable links (in supported terminals) +- Table formatting +- Blockquote styling +- And more coming soon! + +# Motivation/History The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browse:rs. This approach aims to: @@ -20,17 +32,56 @@ Make your CLI experience more visually appealing and informative As the project evolved from its initial focus on Markdown, support for viewing code files was added, expanding its utility in diverse development ecosystems. Now, see is your go-to tool for seeing everything that a cat can see! -## Features +## Markdown Capabilities -- Minimalistic rich markdown rendering in the terminal -- State-of-the-art code viewing capabilities with superior syntax highlighting for a wide range of programming languages, powered by tree-sitter -- More accurate, context-aware syntax highlighting -- Emoji support :smile: -- Image rendering (when possible) -- Clickable links (in supported terminals) -- Table formatting -- Blockquote styling -- And more adding soon! +While see has expanded its focus beyond just Markdown, it still offers robust Markdown rendering capabilities: + +- Rich text formatting (bold, italic, strikethrough) +- Headers and lists +- Code blocks with syntax highlighting +- Tables +- Blockquotes +- Images (when supported by the terminal) +- Clickable links + +## Usage + +### 1. Viewing Code Files + +see serves as a powerful code viewer for the terminal, providing an efficient way to review code directly in your console with advanced syntax highlighting: + +```bash +see path/to/your/code_file.py +see --line-numbers path/to/your/code_file.py # with line numbers +``` + +image + +### 2. Rendering Markdown Files + +To render a Markdown file, simply pass the path to the file as an argument: + +```bash +see path/to/your/markdown_file.md +``` + +### 3. Rendering Markdown from Piped Input + +see can also read Markdown content from standard input: + +```bash +echo "# Hello, *world*" | see +cat README.md | see # Render a file's content +curl -sL https://raw.githubusercontent.com/guilhermeprokisch/see/master/README.md | see # Render a remote Markdown file +``` + +### 4. Viewing see's Own Documentation + +You can view see's documentation directly in your terminal by running: + +```bash +see --help +``` ## Installation @@ -41,10 +92,10 @@ There are several ways to install see: The easiest and fastest way to install see is by using our shell script: ```sh -curl --proto '=https' --tlsv1.2 -LsSf https://github.com/guilhermeprokisch/see/releases/download/v0.2.10/see-installer.sh | sh +curl --proto '=https' --tlsv1.2 -LsSf https://github.com/guilhermeprokisch/see/releases/download/v0.1.0/see-installer.sh | sh ``` -**DISCLAIMER: The version number in the URL above (v0.2.10) may not be the latest version. Please check the [releases page](https://github.com/guilhermeprokisch/see/releases) for the most recent version and update the URL accordingly before running the command.** +**DISCLAIMER: The version number in the URL above (v0.1.0) may not be the latest version. Please check the [releases page](https://github.com/guilhermeprokisch/see/releases) for the most recent version and update the URL accordingly before running the command.** ### 2. Using prebuilt binaries from GitHub releases @@ -157,19 +208,6 @@ see --help This command will render see's main documentation file `/docs`, giving you a practical example of see in action and providing detailed information about its usage and features. -## see as a Code Viewer (Experimental) - -image - -In addition to rendering Markdown, see serves as a powerful code viewer for the terminal. It provides an efficient way to review code directly in your console with advanced syntax highlighting powered by [tree-sitter](https://github.com/tree-sitter/tree-sitter) which gives more accurate, context-aware syntax highlighting, - -Usage: - -```bash -see path/to/your/code_file.py -see --line-numbers path/to/your/code_file.py # with line numbers -``` - ## Configuration see supports user-defined configuration files. You can customize various aspects of the rendering process by creating a `config.toml` file in the following location: From d958442303f976e67968a28ef3478ac0299603bd Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 18:29:27 +0200 Subject: [PATCH 11/14] docs: updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b8f643..410ff4c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ see is a powerful file visualization tool for the terminal, offering advanced co - Blockquote styling - And more coming soon! -# Motivation/History +# Motivation and Context The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browse:rs. This approach aims to: From e69279cfd48de861a92a85ceff5de66ff7fdd8a1 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 18:31:26 +0200 Subject: [PATCH 12/14] docs: updated --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 410ff4c..507ce6d 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,7 @@ see is a powerful file visualization tool for the terminal, offering advanced co # Motivation and Context -The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browse:rs. This approach aims to: - -Provide a unified documentation and code viewing format accessible across different environments -Enable quick viewing and editing of CLI documentation and code files from anywhere -Make your CLI experience more visually appealing and informative +The primary goal of see is to create a unified tool for viewing both CLI documentation in Markdown and code files, renderable in both the terminal and web browse As the project evolved from its initial focus on Markdown, support for viewing code files was added, expanding its utility in diverse development ecosystems. Now, see is your go-to tool for seeing everything that a cat can see! From b8bd0c40c3a4e6859d1f0d4bd4fa4ac8e6446214 Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 18:43:57 +0200 Subject: [PATCH 13/14] docs: update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 507ce6d..4fdc703 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,11 @@ > cat you see!? Its a fancy cat! :cat: -image -image +image +image +image + + > [!WARNING] > **DISCLAIMER: This project is currently in alpha stage. It may contain bugs, incomplete features, or undergo significant changes. Use with caution and please report any issues you encounter.** From 1387a901388a6dd18c58163204ef32038b327e3e Mon Sep 17 00:00:00 2001 From: Guilherme Prokisch Date: Mon, 9 Sep 2024 18:45:49 +0200 Subject: [PATCH 14/14] docs: update README.md --- README.md | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/README.md b/README.md index 4fdc703..41c407c 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,6 @@ see path/to/your/code_file.py see --line-numbers path/to/your/code_file.py # with line numbers ``` -image - ### 2. Rendering Markdown Files To render a Markdown file, simply pass the path to the file as an argument: @@ -74,14 +72,6 @@ cat README.md | see # Render a file's content curl -sL https://raw.githubusercontent.com/guilhermeprokisch/see/master/README.md | see # Render a remote Markdown file ``` -### 4. Viewing see's Own Documentation - -You can view see's documentation directly in your terminal by running: - -```bash -see --help -``` - ## Installation There are several ways to install see: @@ -145,33 +135,6 @@ If you prefer to build from source or want to contribute to the project: This will compile the project and install the `see` binary in your Cargo bin directory, which should be in your PATH. -## Usage - -There are two main ways to use see: - -### 1. Rendering a Markdown file - -To render a Markdown file, simply pass the path to the file as an argument: - -```bash -see path/to/your/markdown_file.md -``` - -### 2. Rendering Markdown from piped input - -see can also read Markdown content from standard input, allowing you to pipe content directly into it: - -```bash -echo "# Hello, *world*" | see -``` - -This feature is particularly useful for integrating see with other commands or for quickly rendering Markdown snippets. For example: - -```bash -cat README.md | see # Render a file's content -curl -sL https://raw.githubusercontent.com/guilhermeprokisch/see/master/README.md | see # Render a remote Markdown file -``` - #### Integration with CLI Tools see can be easily integrated with CLI tools to replace traditional man pages with rich Markdown documentation. Here's an example of how you can use see with a custom CLI tool's --help flag: