Stock note management tool
Project description
KLNote
股票笔记管理工具,为专注股票投资的人群设计。
背景
投资股票时,每次决策都需要记录:为什么买、为什么卖、当时想到了什么。这些记录是后续复盘的核心素材。但普通笔记软件太通用,无法围绕"股票"这个实体组织信息——查一只股票的笔记,要翻半天。
KLNote 的核心思路是:先有股票,再有笔记。每条笔记属于某只股票,每次查看都围绕股票展开。
核心概念
- 股票:用 code(代码)或 name(名称)标识,如
000001、平安银行 - 笔记:附属于某只股票,每条包含 summary(摘要) 和 content(内容)
- 标识符:支持三种方式定位股票 — UUID、股票代码、股票名称
安装
pip install klnote
使用
# 股票操作
klnote stk ls # 列出所有股票
klnote stk add 000001 -n 平安银行 # 添加股票
klnote stk get 000001 # 查看股票(支持 id/code/name)
klnote stk delete 000001 # 删除股票
# 笔记操作
klnote note add 000001 -s "摘要" -c "内容" # 添加笔记
klnote note ls 000001 # 列出笔记
klnote note delete 000001 0 # 删除第0条笔记
数据库
默认路径: ~/.KLNote/KLNote.db
可通过环境变量 KLNOTE_DB_PATH 自定义路径。
命令指南
全局命令
klnote --help
股票操作 (stk)
klnote stk ls # 列出所有股票
klnote stk add <code> [-n name] [-d desc] # 添加股票
klnote stk get <identifier> # 查看股票详情
klnote stk delete <identifier> # 删除股票
笔记操作 (note)
klnote note add <stock_identifier> [-s 摘要] [-c 内容] # 添加笔记
klnote note ls <stock_identifier> # 列出某只股票的所有笔记
klnote note delete <stock_identifier> <index> # 删除指定笔记
高级操作 (admin)
klnote admin match_and_read <value> <field> # 按字段匹配读取
klnote admin match_and_update <value> <field> <update_field> # 按字段匹配更新(危险)
标识符说明
所有 <identifier> 位置均支持三种写法:
| 格式 | 示例 | 解析方式 |
|---|---|---|
| UUID (32位十六进制) | a1b2c3d4e5f6... |
精确匹配 id |
| 纯数字 | 000001 |
匹配 code |
| 字母/中文混合 | 平安银行 |
先试 code,再试 name |
环境变量
| 变量 | 说明 | 默认值 |
|---|---|---|
KLNOTE_DB_PATH |
数据库文件路径 | ~/.KLNote/KLNote.db |
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
klnote-0.1.0.tar.gz
(11.3 kB
view details)
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
klnote-0.1.0-py3-none-any.whl
(11.6 kB
view details)
File details
Details for the file klnote-0.1.0.tar.gz.
File metadata
- Download URL: klnote-0.1.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1ae17fbb50344f25b814c302666f39ce7c67fc2ef6f2feb50ef459fb142af54
|
|
| MD5 |
b69a4ede58dd8c823e1450bb2dde1c3e
|
|
| BLAKE2b-256 |
d0cd8f69611c55b576a92b6002e046131466ec70beec15edfc2241e54ac19548
|
File details
Details for the file klnote-0.1.0-py3-none-any.whl.
File metadata
- Download URL: klnote-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd37bbe39bb987730461cc6003d528fd0cbd9294d9de5fbd9d01f3e844c2c8b5
|
|
| MD5 |
66ca7277966251eb507372d3b1d4318f
|
|
| BLAKE2b-256 |
bb0a4093f0ac55d4224bd4098077a19631b237afb3385395fef9afe7eb0cd500
|