| Crates.io | scrollcast |
| lib.rs | scrollcast |
| version | 0.1.0 |
| created_at | 2025-10-29 16:10:40.706981+00 |
| updated_at | 2025-10-29 16:10:40.706981+00 |
| description | A fast Rust CLI tool for converting Git repositories to beautifully formatted documents |
| homepage | |
| repository | https://github.com/0xheartcode/scrollcast |
| max_upload_size | |
| id | 1906886 |
| size | 257,931 |
A Rust CLI tool and library for converting Git repositories into formatted documents (PDF, EPUB, HTML, Markdown) with syntax highlighting.
.gitignore supportgit clone https://github.com/0xheartcode/scrollcast
cd scrollcast
cargo install --path .
Add to your Cargo.toml:
[dependencies]
scrollcast = "0.0.1"
# Convert to PDF
scrollcast /path/to/repo -o output.pdf
# Convert to HTML with different theme
scrollcast /path/to/repo -o output.html -f html -t zenburn
# Process all files (ignore .gitignore)
scrollcast /path/to/repo -o output.pdf --no-gitignore
# Exclude specific directories
scrollcast /path/to/repo -o output.pdf --ignore target --ignore node_modules
use scrollcast::{FileProcessor, MarkdownGenerator, OutputFormat, create_renderer, DocumentMetadata};
use std::path::Path;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let input_path = Path::new("./my-repo");
let output_path = Path::new("./output.pdf");
let mut processor = FileProcessor::new(input_path, true, Vec::new())?;
let files = processor.discover_files().await?;
let generator = MarkdownGenerator::new();
let markdown = generator.generate_markdown(&files, input_path, false).await?;
let metadata = DocumentMetadata {
title: "Repository Export".to_string(),
author: "Scrollcast".to_string(),
created_at: chrono::Utc::now(),
};
let mut renderer = create_renderer(OutputFormat::Pdf, "kate".to_string())?;
renderer.render(&markdown, output_path, &metadata).await?;
Ok(())
}
Usage: scrollcast [OPTIONS] [input]
Arguments:
[input] Input directory (git repository or regular folder)
Options:
-o, --output <output> Output file path
-f, --format <format> Output format [default: pdf] [possible values: pdf, epub, html, markdown]
-t, --theme <theme> Syntax highlighting theme [default: kate]
--no-gitignore Ignore .gitignore files and process all files
--no-toc Don't include table of contents
--list-themes List available syntax highlighting themes
--list-languages List supported programming languages
-y, --yes Skip confirmation prompts
--ignore <DIR> Ignore specific directories (can be used multiple times)
-v, --verbose Enable verbose logging
--chunk-size <chunk-size> Process files in chunks [default: 20]
--memory-limit <memory-limit> Maximum memory usage in MB
--max-file-size <max-file-size> Maximum file size to process in MB [default: 50]
-h, --help Print help
-V, --version Print version
printpdfepub-builderScrollcast uses Syntect for syntax highlighting with support for common programming languages including Rust, JavaScript, Python, Go, Java, C/C++, and many others.
Available themes:
Use --list-themes and --list-languages to see all available options.
The tool automatically excludes:
.git, .svn)target, dist, build)node_modules, vendor).vscode, .idea).gitignore by default--no-gitignore to process all filesFor large repositories, Scrollcast provides several options:
--chunk-size: Process files in smaller batches--memory-limit: Limit memory usage--max-file-size: Skip very large filesThe library uses these main dependencies:
syntect - Syntax highlightingprintpdf - PDF generationepub-builder - EPUB creationpulldown-cmark - Markdown processinggit2 - Git integrationMIT
Contributions are welcome. Please ensure code follows Rust conventions and includes appropriate tests. 🦀 0xheartcode