This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,634 changed files
with
773 additions
and
634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,69 +2,58 @@ | |
name = "mdcat" | ||
description = "cat for markdown: Show markdown documents in terminals" | ||
readme = "README.md" | ||
homepage = "https://github.com/swsnr/mdcat" | ||
repository = "https://github.com/swsnr/mdcat" | ||
documentation = "https://docs.rs/mdcat" | ||
keywords = ["markdown", "less", "cat"] | ||
version = "1.1.1" | ||
categories = ["command-line-utilities", "text-processing"] | ||
license = "MPL-2.0" | ||
authors = ["Sebastian Wiesner <[email protected]>"] | ||
edition = "2021" | ||
rust-version = "1.67" | ||
homepage.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
categories.workspace = true | ||
license.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
|
||
[features] | ||
default = ["native-tls"] | ||
native-tls = ["reqwest/native-tls"] | ||
# For static builds use rustls to avoid cross-building openssl, but use the | ||
# native certificate roots for maximum compatibility | ||
static = ["reqwest/rustls-tls-native-roots"] | ||
default = ["pulldown-cmark-mdcat/native-tls"] | ||
static = ["pulldown-cmark-mdcat/static"] | ||
|
||
[dependencies] | ||
anstyle = { version = "0.3.5", default-features = false } | ||
anyhow = { version = "1.0.70", default-features = false, features = ["std"] } | ||
base64 = { version = "0.21.0", default-features = false } | ||
clap = { version = "4.2.1", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] } | ||
concolor-query = { version = "0.3.3", default-features = false } | ||
gethostname = "0.4.1" | ||
image = "0.24.6" | ||
mime = { version = "0.3.17", default-features = false } | ||
mime_guess = { version = "2.0.4", default-features = false } | ||
once_cell = { version = "1.17.1", default-features = false } | ||
pulldown-cmark = { version = "0.9.2", default-features = false, features = ['simd'] } | ||
reqwest = { version = "0.11.16", default-features = false, features = ["gzip", "brotli", "blocking"]} | ||
resvg = { version = "0.31.0", default-features = false, features = ["text", "system-fonts", "memmap-fonts"] } | ||
shell-words = { version = "1.1.0", default-features = false, features = ["std"] } | ||
syntect = { version = "5.0.0", default-features = false, features = ["parsing", "regex-fancy", "default-syntaxes"] } | ||
system_proxy = { version = "0.3.2", default-features = false } | ||
textwrap = { version = "0.16.0", default-features = false, features = ["unicode-linebreak", "unicode-width"] } | ||
pulldown-cmark = { version = "0.9.2", default-features = false, features = ['simd'] } | ||
pulldown-cmark-mdcat = { version = "1.1.1", path = "pulldown-cmark-mdcat", default-features = false } | ||
syntect = { version = "5.0.0", default-features = false, features = ["regex-fancy", "default-syntaxes"] } | ||
tracing = { version = "0.1.37", default-features = false, features = ["attributes"] } | ||
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["env-filter", "std", "fmt", "ansi"] } | ||
url = "2.3.1" | ||
|
||
[target.'cfg(unix)'.dependencies] | ||
libc = "0.2.141" | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
terminal_size = "0.2.6" | ||
|
||
[dev-dependencies] | ||
glob = "0.3.1" | ||
hyper = { version="0.14.25", default-features = false, features = ["server", "http1", "runtime"] } | ||
pretty_assertions = "1.3.0" | ||
tokio = { version = "1.27", default-features = false, features = ["time"] } | ||
|
||
[build-dependencies] | ||
# To generate completions during build | ||
clap = { version = "4.2.1", features = ["derive"] } | ||
clap_complete = "4.2.0" | ||
syntect = { version = "5.0.0", default-features = false, features = ["plist-load", "dump-create"] } | ||
|
||
[profile.release] | ||
# Enable LTO for release builds; makes the binary a lot smaller | ||
lto = true | ||
|
||
[package.metadata.release] | ||
[workspace] | ||
members = ["pulldown-cmark-mdcat"] | ||
|
||
[workspace.package] | ||
homepage = "https://github.com/swsnr/mdcat" | ||
repository = "https://github.com/swsnr/mdcat" | ||
version = "1.1.1" | ||
categories = ["command-line-utilities", "text-processing"] | ||
license = "MPL-2.0 AND Apache-2.0" | ||
authors = ["Sebastian Wiesner <[email protected]>"] | ||
edition = "2021" | ||
rust-version = "1.67" | ||
|
||
[workspace.metadata.release] | ||
allow-branch = ["main"] | ||
pre-release-commit-message = "Release {{version}}" | ||
tag-prefix = "mdcat-" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[package] | ||
name = "pulldown-cmark-mdcat" | ||
description = "Render pulldown-cmark events to TTY" | ||
readme = "README.md" | ||
documentation = "https://docs.rs/pulldown-cmark" | ||
keywords = ["markdown", "less", "cat", "cmark"] | ||
homepage.workspace = true | ||
repository.workspace = true | ||
version.workspace = true | ||
categories.workspace = true | ||
license.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
|
||
[features] | ||
default = ["native-tls"] | ||
native-tls = ["reqwest/native-tls"] | ||
# For static builds use rustls to avoid cross-building openssl, but use the | ||
# native certificate roots for maximum compatibility | ||
static = ["reqwest/rustls-tls-native-roots"] | ||
|
||
[dependencies] | ||
anyhow = { version = "1.0.70", default-features = false, features = ["std"] } | ||
base64 = { version = "0.21.0", default-features = false } | ||
anstyle = { version = "0.3.5", default-features = false } | ||
gethostname = "0.4.1" | ||
image = "0.24.6" | ||
mime = { version = "0.3.17", default-features = false } | ||
mime_guess = { version = "2.0.4", default-features = false } | ||
once_cell = { version = "1.17.1", default-features = false } | ||
pulldown-cmark = { version = "0.9.2", default-features = false, features = ['simd'] } | ||
reqwest = { version = "0.11.16", default-features = false, features = ["gzip", "brotli", "blocking"]} | ||
resvg = { version = "0.31.0", default-features = false, features = ["text", "system-fonts", "memmap-fonts"] } | ||
syntect = { version = "5.0.0", default-features = false, features = ["parsing"] } | ||
system_proxy = { version = "0.3.2", default-features = false } | ||
textwrap = { version = "0.16.0", default-features = false, features = ["unicode-linebreak", "unicode-width"] } | ||
tracing = { version = "0.1.37", default-features = false, features = ["attributes"] } | ||
tracing-subscriber = { version = "0.3.16", default-features = false, features = ["env-filter", "std", "fmt", "ansi"] } | ||
url = "2.3.1" | ||
|
||
[dev-dependencies] | ||
glob = "0.3.1" | ||
hyper = { version="0.14.25", default-features = false, features = ["server", "http1", "runtime"] } | ||
pretty_assertions = "1.3.0" | ||
syntect = { version = "5.0.0", default-features = false, features = ["regex-fancy", "default-syntaxes"] } | ||
tokio = { version = "1.27", default-features = false, features = ["time"] } | ||
|
||
[build-dependencies] | ||
syntect = { version = "5.0.0", default-features = false, features = ["plist-load", "dump-create"] } | ||
|
||
[target.'cfg(unix)'.dependencies] | ||
libc = "0.2.141" | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
terminal_size = "0.2.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# pulldown-cmark-mdcat | ||
|
||
Render [pulldown-cmark] events to a TTY. | ||
|
||
This library backs the [mdcat] tool, and makes its rendering available to other crates. | ||
|
||
It supports: | ||
|
||
- All common mark syntax. | ||
- Standard ANSI formatting with OCS-8 hyperlinks. | ||
- Inline images on terminal emulators with either the iTerm2 or the Kitty protocol, as well as on Terminology. | ||
- Jump marks in iTerm2. | ||
|
||
It does not support commonmark table and footnote extension syntax. | ||
|
||
[mdcat]: https://github.com/swsnr/mdcat | ||
[pulldown-cmark]: https://github.com/raphlinus/pulldown-cmark | ||
|
||
## License | ||
|
||
Copyright Sebastian Wiesner <[email protected]> | ||
|
||
Binaries are subject to the terms of the Mozilla Public | ||
License, v. 2.0, see [LICENSE](LICENSE). | ||
|
||
Most of the source is subject to the terms of the Mozilla Public | ||
License, v. 2.0, see [LICENSE](LICENSE), unless otherwise noted; | ||
some files are subject to the terms of the Apache 2.0 license, | ||
see <http://www.apache.org/licenses/LICENSE-2.0> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2020 Sebastian Wiesner <[email protected]> | ||
|
||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
use std::path::Path; | ||
|
||
use syntect::highlighting::ThemeSet; | ||
|
||
fn generate_theme_dump<P: AsRef<Path>>(out_dir: P) { | ||
let source_file = "src/render/Solarized (dark).tmTheme"; | ||
println!("cargo:rerun-if-changed={source_file}"); | ||
let theme = ThemeSet::get_theme(source_file).unwrap(); | ||
syntect::dumps::dump_to_file(&theme, out_dir.as_ref().join("theme.dump")).unwrap(); | ||
} | ||
|
||
fn main() { | ||
let out_dir = std::env::var_os("OUT_DIR").expect("OUT_DIR not set"); | ||
generate_theme_dump(&out_dir); | ||
} |
Oops, something went wrong.