{"id":34555174,"url":"https://github.com/samshad/clipboardtopdf","last_synced_at":"2026-04-24T17:04:48.616Z","repository":{"id":329512791,"uuid":"1119879066","full_name":"samshad/ClipboardToPDF","owner":"samshad","description":"A Python automation utility that instantly converts clipboard content (Markdown or Plain Text) into professionally styled PDFs. Features smart auto-naming, date-based archiving, and crash-proof error handling.","archived":false,"fork":false,"pushed_at":"2025-12-20T04:15:46.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-22T12:20:34.590Z","etag":null,"topics":["automation","clipboard-tool","markdown","pdf-generation","productivity","python","wkhtmltopdf","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samshad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-20T02:58:15.000Z","updated_at":"2025-12-20T04:15:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/samshad/ClipboardToPDF","commit_stats":null,"previous_names":["samshad/clipboardtopdf"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/samshad/ClipboardToPDF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samshad%2FClipboardToPDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samshad%2FClipboardToPDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samshad%2FClipboardToPDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samshad%2FClipboardToPDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samshad","download_url":"https://codeload.github.com/samshad/ClipboardToPDF/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samshad%2FClipboardToPDF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32232661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","clipboard-tool","markdown","pdf-generation","productivity","python","wkhtmltopdf","workflow"],"created_at":"2025-12-24T08:28:13.152Z","updated_at":"2026-04-24T17:04:48.611Z","avatar_url":"https://github.com/samshad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📋 ClipboardToPDF\n\n**ClipboardToPDF** is a lightweight Python automation tool that instantly converts your clipboard content into professionally styled PDF documents.\n\nUnlike standard \"Save as PDF\" workflows, this tool automates the entire metadata process: it intelligently parses your text to generate a filename, detects dates for organization, and archives files into a structured timeline folder system.\n\n## 🚀 Key Features\n\n* **Universal Input:** Works with **Markdown** (headers, tables, code blocks) or **Plain Text**.\n* **Smart Auto-Naming:**\n* Detects Markdown headers (`# Title`) to name the file.\n* Falls back to the first line of text for generic notes.\n\n\n* **Automatic Filing:** Creates a timeline directory structure (`Documents/Clipboard_Archives/2025/12_December/`) so you never have to organize files manually.\n* **Professional Styling:** Applies a clean, minimal CSS theme suitable for printing (A4/Letter margins).\n* **Crash-Proof:** Includes robust error handling for empty clipboards and text encoding issues.\n\n## 🛠️ Prerequisites\n\n### 1. System Dependency (Critical)\n\nThis tool requires the **wkhtmltopdf** rendering engine.\n\n* **Windows:** Download the [wkhtmltopdf installer](https://wkhtmltopdf.org/downloads.html) (64-bit).\n* **Default Path:** The script expects it at `C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe`.\n\n### 2. Python Environment\n\n* Python 3.8+ recommended.\n\n## 📦 Installation\n\n1. **Clone or Download** this repository.\n2. **Create a Virtual Environment** (Recommended):\n```bash\npython -m venv venv\n.\\venv\\Scripts\\activate\n\n```\n\n\n3. **Install Dependencies**:\nCreate a `requirements.txt` file with the following content:\n```text\npdfkit\u003e=1.0.0\npyperclip\u003e=1.8.2\nmarkdown\u003e=3.4.1\n\n```\n\n\nThen run:\n```bash\npip install -r requirements.txt\n\n```\n\n\n\n## 🖥️ Usage\n\n1. **Copy Text:** Highlight text from anywhere (AI Chat, Notepad, Browser) and press `Ctrl+C`.\n2. **Run Script:**\n```bash\npython clipboard_to_pdf.py\n\n```\n\n\n3. **Done:** The script will print the saved location and automatically open the folder containing your new PDF.\n\n### Example Inputs \u0026 Outputs\n\n| Input Type | Extracted Filename | Filing Path |\n| --- | --- | --- |\n| **Markdown Report** | `# Shift Log Dec 19` | `.../2025/12_December/Shift Log Dec 19.pdf` |\n| **Grocery List** | `Milk, Eggs, Bread...` | `.../2025/12_December/Milk_Eggs_Bread.pdf` |\n| **Code Snippet** | `# Python Script` | `.../2025/12_December/Python Script.pdf` |\n\n## ⚙️ Configuration\n\nYou can customize the script by editing the constants at the top of `clipboard_to_pdf.py`:\n\n```python\n# Change where files are saved\nBASE_SAVE_DIR = Path.home() / \"Documents\" / \"Clipboard_Archives\"\n\n# Update if you installed wkhtmltopdf in a custom location\nWKHTMLTOPDF_PATH = Path(r'C:\\Custom\\Path\\wkhtmltopdf.exe')\n\n```\n\n## 🔧 Troubleshooting\n\n**Error: \"wkhtmltopdf not found\"**\n\n* Ensure you have installed the software (not just the Python library).\n* Verify `WKHTMLTOPDF_PATH` matches your installation path.\n\n**Error: \"Clipboard is empty\"**\n\n* Copy your text *before* running the script.\n* Some remote desktop apps do not share the clipboard with the host machine.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n**Author:** Md Samshad Rahman","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamshad%2Fclipboardtopdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamshad%2Fclipboardtopdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamshad%2Fclipboardtopdf/lists"}