Markdown to Blogger
마크다운 파일을 HTML로 변환하여 Blogger에 게시하는 Python CLI 도구입니다.
Google Blogger API와 다양한 이미지 업로드 서비스를 지원합니다.
설치 방법
Python 3.8 이상이 필요합니다.
1. 저장소 클론
git clone [YOUR_REPO_URL]
cd markdown_to_blog
2. 의존성 설치
uv 사용 시 (권장)
# uv가 없다면 먼저 설치 (Windows)
pip install uv
# 또는 macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# 프로젝트 디렉토리에서 의존성 설치 및 실행
uv sync # 런타임/개발 의존성 자동 관리 (pyproject.toml 기반)
uv sync --dev # 개발 의존성 그룹 포함 설치
# 가상환경 자동 활성화(uv가 자동 관리). 명령 실행 예시:
uv run mdb --help
uv run mdb publish -t "제목" post.md
pip로 직접 설치
pip install -e .
Docker 실행
docker compose up --build
사용법
모든 명령어는 mdb로 시작합니다.
| 명령어 | 설명 |
|---|---|
| set_blogid | 블로그 ID를 설정합니다. |
| get_blogid | 현재 설정된 블로그 ID를 확인합니다. |
| set_client_secret | Google API 클라이언트 시크릿 파일을 설정합니다. |
| refresh_auth | Google API 인증 정보를 갱신합니다. |
| convert | 마크다운 파일을 HTML로 변환합니다. |
| publish | 마크다운 파일을 블로거에 발행합니다. |
| publish_html | HTML 파일을 블로거에 직접 발행합니다. |
| upload_image | 이미지를 선택한 서비스에 업로드합니다. |
| upload_images | 마크다운 파일 내의 모든 이미지를 업로드합니다. |
| publish_folder | 폴더 내의 모든 마크다운 파일을 순차적으로 발행합니다. |
| list_my_blogs | 내 계정의 블로그 id와 url(도메인)을 출력합니다. |
주요 명령어 예시
-
블로그 ID 설정:
mdb set_blogid [블로그ID] -
현재 블로그 ID 확인:
mdb get_blogid -
Google API 클라이언트 시크릿 파일 설정:
mdb set_client_secret [client_secret.json 경로] -
인증 정보 갱신:
mdb refresh_auth -
마크다운 → HTML 변환:
mdb convert --input [마크다운파일.md] --output [저장할.html] -
마크다운 파일을 블로거에 발행:
mdb publish [옵션] [마크다운파일.md] -
HTML 파일을 블로거에 발행:
mdb publish_html --title "[제목]" [HTML파일명] -
이미지 업로드:
mdb upload_image [이미지파일] --service [서비스명] -
마크다운 내 모든 이미지 업로드:
mdb upload_images --input [마크다운파일] --service [서비스명] --tui -
폴더 내 모든 마크다운 파일 발행:
mdb publish_folder [폴더경로] --interval [시간] --service [이미지서비스] --tui -
내 블로그 목록(id, url) 확인:
mdb list_my_blogs
이미지 업로드 지원 서비스
- anhmoe, beeimg, fastpic, imagebin, pixhost, sxcu 등
(자세한 목록은mdb upload_image --help참고)
개발 및 기여
- PR, 이슈 환영합니다!
- 코드 스타일: black, isort, autopep8 등 지원
라이선스
MIT
Metadata
Release files for markdown-to-blog 0.4.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| markdown_to_blog-0.4.13.tar.gz | 80.1 kB | Without provenance | Details for markdown_to_blog-0.4.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| markdown_to_blog-0.4.13-py3-none-any.whl | Python 3 | none | any | Details for markdown_to_blog-0.4.13-py3-none-any.whl |
Total release size: 134.6 kB
Release files / markdown_to_blog-0.4.13.tar.gz
| Download URL | markdown_to_blog-0.4.13.tar.gz |
|---|---|
| Size | 80.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c23591a42df9013b90991f26eec2cc96a8be2fe632e15c59f04617ae9f8a33f4
|
|
BLAKE2b-256 checksum How to use checksums |
88f323c884e4f695c634607bd02ea111c5e81896d7dfa49a117379fe3988ae0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / markdown_to_blog-0.4.13-py3-none-any.whl
| Download URL | markdown_to_blog-0.4.13-py3-none-any.whl |
|---|---|
| Size | 54.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdfe363b3c2867410489829448a3dc144b1cf775c6c1bbb7912bb98d734d3a3a
|
|
BLAKE2b-256 checksum How to use checksums |
e319d9460f679e2aa163a6872b7b2dad6d88b8ebe90ac8c1481f16e6600386d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Security for markdown-to-blog 0.4.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.