一个沉浸式的命令行小说写作工具 (A text-immersive CLI novel writing tool)
Project description
Momo Writer 🍑
Momo Writer 是一个沉浸式的命令行小说写作工具,专为希望在终端中专注于文字创作的作者设计。
Momo Writer is an immersive CLI novel writing tool designed for authors who want to focus on text creation in the terminal.
✨ 特性 Features
- 沉浸式写作:纯净的命令行界面,支持逐行写作与自动保存。
- 项目管理:自动管理小说章节、字数统计、目录浏览。
- 多小说支持:自动记录并切换多本小说项目。
- 交互式操作:通过方向键选择菜单,无需记忆复杂指令。
- 原生体验:支持在文件管理器中一键打开目录 (
/folder)。 - 纯文本存储:章节内容以 Markdown 格式存储,自由掌控数据。
📦 安装 Installation
直接通过 pip 安装:
pip install momo-writer
或者从源码安装(开发模式):
git clone https://github.com/yourusername/momo-writer.git
cd momo-writer
pip install -e .
🚀 快速开始 Quick Start
安装完成后,在终端直接输入:
momo
如果是首次使用,momo 会引导您创建一个新的小说项目:
- 快速创建:在默认目录(
~/momo_novels)下自动创建。 - 当前目录:在当前文件夹初始化项目。
- 自定义路径:指定任意路径。
📖 命令列表 Commands
在 momo shell (momo>) 中,支持以下命令(支持 Tab 自动补全):
常用命令
/new <标题>:新建章节并直接开始写作。/catlog(或/catalog):浏览目录,使用 ↑ ↓ 选择章节,Enter 打开。/latest:直接打开最新一章。/stats:查看全书字数统计。/folder:在文件管理器中打开当前小说目录。/help:查看所有可用命令。/exit(或/q):退出程序。
章节操作
/open <编号>:通过序号打开章节。/rename <编号> <新标题>:重命名章节。/del <编号>:删除章节(需确认)。/find <关键词>:全文搜索关键词。
写作模式
进入章节后 (chapter: title>):
/w:进入专注写作模式。此时输入的一行即为一个段落,回车自动保存。输入exit退出写作。/show [行数]:预览当前章节内容的最后 N 行(默认 5 行)。/back:返回主菜单。
📂 目录结构 Directory Structure
momo 创建的小说项目结构如下:
MyNovel/
├── .momo/
│ ├── novel.json # 小说元数据与索引
│ └── chapters/ # 存放实际章节文件
│ ├── 0001_第一章.md
│ ├── 0002_第二章.md
│ └── ...
章节内容以纯 Markdown 文本存储,您可以随时使用其他编辑器(如 VS Code, Typora)打开修改,momo 会自动同步。
🛠️ 开发 Development
欢迎提交 Issue 和 PR!
# 安装构建依赖
pip install build twine
# 构建发布包
python -m build
# 发布到 PyPI
twine upload dist/*
License
MIT License
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 momo_writer-0.1.1.tar.gz.
File metadata
- Download URL: momo_writer-0.1.1.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a7b54208c88e7a866113c566deacb1d9da9a89c6be27e1d47d3df6c37de4f6
|
|
| MD5 |
b58b0543e64f15826df370d122256025
|
|
| BLAKE2b-256 |
db36942daa3ca990f31bba6950681e687781ce9cc55bf285763420c1fcc2690a
|
File details
Details for the file momo_writer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: momo_writer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14a1a0b5ebf8c4d8bfbc45e8cccb0d7bca26b3116ad8b787ef6dcf750d3feb52
|
|
| MD5 |
b7f51fce823e2d7d11f0763231a98be8
|
|
| BLAKE2b-256 |
6b268513fa52f892d3c64f8bfe488ceb174d8d3fbac0e18fce796e240fd47670
|