This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Thino風 つぶやき → Markdown ロガー</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <style> | |
| :root { | |
| font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", | |
| sans-serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from pdf2image import convert_from_path | |
| from PIL import Image | |
| def pdf_to_single_image(pdf_path, output_path, dpi=150): | |
| pages = convert_from_path(pdf_path, dpi=dpi) | |
| # 最初のページのサイズを取得 | |
| width, height = pages[0].size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker container run -it --name tmp-name --mount type=bind,source="$(pwd)"/data/,target=/mnt --rm python:3.10.8-slim-bullseye bash |