Skip to content

RazorBackRoar/Papyrus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

374 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Papyrus

CI Ruff Version License: MIT Apple Silicon PySide6

Papyrus is a macOS Qt app for converting HTML or plain text into PDF with a browser-backed render step.


Current Behavior

  • Accepts HTML and plain text input.
  • Recognizes raw URL strings, but the current export flow does not fetch remote pages yet.
  • Uses readability-lxml plus local cleanup before PDF generation.
  • Opens browser preview from the current editor content.
  • Supports a Snapchat-import path that converts supported HTML exports into transcript and Finder views.
  • Exports PDFs in US Letter format with a light/dark theme choice.

Installation

  1. Download the latest Papyrus.dmg from

    Releases

  2. Drag Papyrus.app to /Applications

  3. First Launch (if prompted with "App is damaged"):

   sudo xattr -cr /Applications/Papyrus.app

Usage

  1. Paste or Drop – HTML, plain text, or a supported local HTML export
  2. Preview – Open the current content in your browser if you want a quick check
  3. Export – Save the PDF to the location you choose

Development

  • Python 3.13+
  • macOS 10.13+

Setup

git clone https://github.com/RazorBackRoar/Papyrus.git
cd Papyrus

# Create a local Python 3.13 environment
uv venv --python 3.13

# Install dependencies from pyproject/lock
uv sync

# Install shared workspace library
uv add --editable ../.razorcore

## Install Playwright browser (for advanced rendering)
uv run playwright install chromium

## Run the app
uv run python -m papyrus.main

Runtime Notes

  • Playwright Chromium is required for PDF rendering.
  • Preview writes a temporary HTML file and opens it via the system browser.
  • I did not find a confirmed persistent history store in the current code path.

Dependencies

Package Purpose
PySide6 Qt6 GUI framework
playwright Chromium-backed PDF generation engine
readability-lxml Readable-content extraction for HTML inputs
beautifulsoup4 HTML parsing

Build

## Using razorbuild tools
razorbuild Papyrus

## Creates: build/dist/Papyrus.dmg

Project Structure

Papyrus/
├── src/papyrus/
│   ├── core/
│   │   ├── app.py          # Main pipeline orchestrator
│   │   ├── renderer.py     # Playwright Chromium PDF generation
│   │   ├── parser.py       # Readability content extraction
│   │   └── html_cleaner.py # HTML pre-processing utilities
│   ├── ui/
│   │   ├── editor.py       # Input editor widget
│   │   └── highlighter.py  # Syntax highlighter (Dracula theme)
│   ├── utils/              # Utility helpers
│   └── main.py             # Entry point
├── assets/
│   └── icons/              # App icons (Papyrus.icns)
├── tests/
├── Papyrus.spec            # PyInstaller config
└── pyproject.toml          # Version SSOT

Export Flow

User pastes or drops content
↓
Clicks "Export PDF"
↓
System detects content type:
↓
┌──────────────────────────────────────────┐
│ URL? (starts with http/https)            │──→ Recognized, but export currently stops with a notice
├──────────────────────────────────────────┤
│ HTML? (contains <tags>)                  │──→ Clean → Readable extract → Inject print CSS → PDF
├──────────────────────────────────────────┤
│ Plain text?                              │──→ Wrap in HTML → Clean → Inject print CSS → PDF
└──────────────────────────────────────────┘

📜 License

MIT License - see LICENSE for details.

Copyright © 2026 RazorBackRoar