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.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..69ddb9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,22 @@ [package] -name = "smd" -version = "0.3.1" +name = "see-cat" +version = "0.1.0" edition = "2021" authors = ["Guilherme Prokisch "] -homepage = "https://github.com/guilhermeprokisch/smd" -description = "A minimalistic Markdown renderer for the terminal with syntax highlighting, emoji support, and image rendering" +homepage = "https://github.com/guilhermeprokisch/see" +description = "A cute cat(1)" license = "MIT" -repository = "https://github.com/guilhermeprokisch/smd" +repository = "https://github.com/guilhermeprokisch/see" readme = "README.md" -keywords = ["markdown", "terminal", "renderer", "syntax-highlighting", "emoji"] +keywords = ["markdown", "cat", "terminal", "viewer", "syntax-highlighting"] 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" @@ -52,14 +56,9 @@ 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", - "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 e74807a..41c407c 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,118 @@ -# smd (Simple Markdown Viewer and Code Viewer) +# see - See a cute cat. -image -image +> cat you see!? Its a fancy cat! :cat: -> [!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.** +image +image +image -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. -## 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: - -1. Provide a unified documentation format accessible across different environments -2. Enable quick viewing end editing of cli documentations from anywhere +> [!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.** -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. +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. ## Features -- Rich text rendering in the terminal -- Syntax highlighting for code blocks and standalone code files +- 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 -- Task list rendering -- Nested list support - Blockquote styling -- And more adding soon! +- And more coming soon! + +# 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 + +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! + +## Markdown Capabilities + +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 +``` + +### 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 +``` ## 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.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/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.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 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 +123,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 +133,21 @@ 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. - -## Usage - -There are two main ways to use smd: - -### 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 -``` - -### 2. Rendering Markdown from piped input - -smd can also read Markdown content from standard input, allowing you to pipe content directly into it: - -```bash -echo "# Hello, *world*" | smd -``` - -This feature is particularly useful for integrating smd 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 -``` +This will compile the project and install the `see` binary in your Cargo bin directory, which should be in your PATH. #### 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 +160,27 @@ 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. - -## smd 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, - -Usage: - -```bash -smd path/to/your/code_file.py -smd --line-numbers path/to/your/code_file.py # with line numbers -``` +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. ## 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" => {