Add your description here
Project description
Bear Export CLI Tool
A command-line tool to export Bear blog CSV data to organized markdown files.
Installation
pip install -r requirements.txt
Usage
python main.py [OPTIONS]
Options
-c, --csv-file TEXT: Path to Bear blog CSV export file (default: post_export.csv)-o, --output-dir TEXT: Output directory name (default: Blog)--include-drafts: Include unpublished draft posts--organize-by [date|tags|none]: Organize files by date, tags, or no organization (default: none)--front-matter [yaml|toml|none]: Front matter format for static site generators (default: yaml)
Examples
Basic export (published posts only, flat structure):
python main.py
Include drafts and organize by date:
python main.py --include-drafts --organize-by date
Organize by tags with TOML front matter:
python main.py --organize-by tags --front-matter toml
Custom CSV file and output directory:
python main.py --csv-file my_export.csv --output-dir MyBlog
Output Structure
Flat Organization (default)
Blog/
├── post1.md
├── post2.md
├── post3.md
└── README.md
Date Organization
Blog/
├── 2023/
│ ├── 01/
│ │ ├── january-post.md
│ │ └── another-january-post.md
│ └── 12/
│ └── december-post.md
├── 2024/
│ └── 03/
│ └── march-post.md
└── README.md
Tags Organization
Blog/
├── personal/
│ ├── my-life.md
│ └── thoughts.md
├── coding/
│ ├── python-tips.md
│ └── vim-guide.md
├── uncategorized-post.md
└── README.md
Front Matter
The tool generates front matter compatible with static site generators like Hugo, Jekyll, and others.
YAML Front Matter (default)
---
title: My Blog Post
slug: my-blog-post
date: 2024-03-15T10:30:00
tags:
- personal
- coding
lang: en
published: true
type: post
uid: abc123
---
TOML Front Matter
+++
title = 'My Blog Post'
slug = 'my-blog-post'
date = '2024-03-15T10:30:00'
tags = ['personal', 'coding']
lang = 'en'
published = true
type = 'post'
uid = 'abc123'
+++
Features
- ✅ Parse Bear blog CSV exports with proper encoding
- ✅ Generate clean markdown files with front matter
- ✅ Support for YAML and TOML front matter formats
- ✅ Multiple organization strategies (flat, by date, by tags)
- ✅ Filter published/draft posts
- ✅ Generate index/README file with post listings
- ✅ Handle special characters and filenames safely
- ✅ Preserve post metadata (tags, dates, language, etc.)
Requirements
- Python 3.7+
- pandas
- click
- pyyaml
- python-dateutil
See requirements.txt for exact versions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bear_export-0.1.0.tar.gz.
File metadata
- Download URL: bear_export-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
581ad8a6eea5ac243a4c2debd7515b6531fdb95bb51edf0b5c3432780e6609aa
|
|
| MD5 |
51193d5a9b261756b1d81dde0a138831
|
|
| BLAKE2b-256 |
8305ee8a13e631346418674bfd1619b4932aa8a8ee6c59cdb18f42abcf15460c
|
File details
Details for the file bear_export-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bear_export-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9fb76802dce3366bf7fd8f002037444bfc88b676051bc2307dbb48d90077a2
|
|
| MD5 |
3ecc2283dec48cc82a3855a34bb2b831
|
|
| BLAKE2b-256 |
66d436fd0dc3668a8e316094efb076a9f26f4004ba240a0811f78caf4a2ed16b
|