codesnap/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! CodeSnap is a tool to generate beautiful snapshots of your code snippets. It's a pure Rust library
//! that provides a simple API to create snapshots of code snippets with syntax highlighting, line
//! numbers, code theme and more.
//!
//! ## Quick start
//!
//! ```rust
//! CodeSnap::default()
//!     .code(
//!         CodeBuilder::default()
//!             .language("haskell")
//!             .content(r#"print "Hello, CodeSnap!""#)
//!             .build()?,
//!     )
//!     .watermark(WatermarkBuilder::default().content("YYM").build()?)
//!     .build()?
//!     .create_snapshot()?
//!     .raw_data()?
//!     .copy()?;
//! ```
//!
//! Now try to paste the code snapshot to your friends! (Don't forget tell him that this was generated by CodeSnap! ^ ^)

pub mod ansi;
mod components;
pub mod config;
pub mod edges;
pub mod preset_background;
pub mod snapshot;
pub mod utils;