SSS-rs (Skill, Slick, Style) is a library and CLI tool for creating stylish developer cards.
-
Configuration (
sss-core
)- Data structures for developer information
-
Themes (
render
, traitShade
or structureTheme
)- Customizable color schemes
- Built-in themes:
- Umbrella (default)
- Rosé Pine
- GrooveBox
- Dracula
-
Layouts (
render
, traitLayout
)- Tera-based templating system
- HTML and TailwindCSS* support
- Responsive design
use sss_core::Settings;
use sss_std::prelude::{Themes, HtmlLayouts};
// Create configuration
let settings = Settings::default();
// Choose theme and layout
let theme = Themes::Umbrella;
let layout = HtmlLayouts::Umbrella;
// Generate HTML
let html = layout.finalize(&settings, &theme.into())
.render()
.unwrap();
CLI tool for generating HTML/PNG/PDF using SSS-rs themes and layouts. Allows you to host generated pages with hot reload for themes and layouts.
- PNG/PDF
- chromium/chrome (headless_chrome mode)
- If you don't have it, these features won't work, but everything else will.
- chromium/chrome (headless_chrome mode)
sss_cli [OPTIONS] <COMMAND>
-c, --config <PATH>
- path to config file (default: config.toml)-t, --theme <THEME>
- theme selection [possible values: umbrella, rose-pine, groove-box, dracula]-l, --layout <LAYOUT>
- layout selection [possible values: umbrella, castle, github]-o, --out <FILE>
- output HTML filename (default: sss-rs.html)--tracing <TRACING>
- Log level [default: info] [possible values: info, trace, debug, error, warn]-h, --help
- print help-V, --version
- print version
sss_cli new [OPTIONS]
Options:
-t, --type <TYPE> Configuration format [default: toml]
[possible values: json, toml]
sss_cli run [OPTIONS]
Options:
-w, --watch Watch for config changes
-s, --serve Start web server
-a, --address <ADDRESS> Web server address [default: 0.0.0.0:8081]
--html launch html service [default]
--png launch png generator service
--pdf launch pdf generator service
--json launch json converter for settings service
--health launch healf checker service
--share launch base64 service
--api launch rapidoc api service
- Api doc
- Scalar API Page: /api
- Routes
- Main card (html) page: /
- Png card: /png
- Pdf card: /pdf
- Json settings of instance: /json
- Base64 toml config : /share
- Health check : /health
sss_cli gen [OPTIONS]
Options:
-t, --type <OUTPUT_TYPE> output type [default: html] [possible values: html, png, pdf]
-o, --out <OUTPUT_NAME> output name [default: sss-rs]
# Create new TOML configuration
sss_cli new
# or
# Create JSON configuration
sss_cli new --config-type json
# Start development server with auto-reload
sss_cli run --watch --serve
# or (html by default)
sss_cli run -w -s
# run with html, png, json and api routes
sss_cli run -w -s --html --png --json --api
# Additional options
# Generate HTML with custom output file
sss_cli -o portfolio.html gen
# Commands below disable hot reload for applied value
# Generate HTML with theme
sss_cli -t dracula gen
# Generate HTML with layout
sss_cli -l github gen
git clone https://github.com/TOwInOK/SSS-rs
cd SSS-rs
cargo build -r -p sss_rs
mv target/release/sss_cli sss-cli
./sss-cli
xattr -rd com.apple.quarantine name_of_file
./name_of_file
you need to install trunk, then run
cd sss-web-app
trunk serve --open
This command will start the server on port 3000 and open your default browser.
- SSS cli
- At the moment you can't use your own templates directly with cli. You can make an Issue for adding them.
- SSS-lib
- You can create and use your own templates with HtmlTeraRender or Create your own implementation with traits: Layout + Finalise
If you want to add a new theme or layout, create an Issue!