mirror of
https://github.com/liubinfighter/csv-lite.git
synced 2026-07-22 05:43:52 +00:00
docs: 更新中英文 README,添加故障排除部分并修正描述以提高清晰度 #33
This commit is contained in:
parent
5cf0f85a02
commit
b60ba7a62a
2 changed files with 45 additions and 69 deletions
21
README.md
21
README.md
|
|
@ -11,8 +11,6 @@ Simple enough for csv, no more fancy function you need to learn and think!
|
|||
|
||||

|
||||
|
||||
> if you encounter any problems, download `test/test-sample.csv` to see what's different from the test csv file. Issue with an screenshot will help us fix it faster.
|
||||
|
||||
## Introduction
|
||||
|
||||
Keep your mind on track! Don't waste time creating fancy tables.
|
||||
|
|
@ -22,7 +20,7 @@ A plugin designed to view and edit `CSV files` directly within Obsidian.
|
|||
- **View** CSV files in a clean, readable table.
|
||||
- **Search** the entire file to quickly find data (`esc` to clean).
|
||||
- **Navigate** easily with numbered rows and columns.
|
||||
- **Pin** the first column so it's always visible.
|
||||
- **Pin** the selected column so it's always visible.
|
||||
- **Toggle** between the table view and raw source-mode.
|
||||
- **Edit** cells directly by clicking and typing.
|
||||
- **Manage** rows and columns (add, delete, move) with a simple right-click on the header.
|
||||
|
|
@ -40,8 +38,8 @@ Because it is designed to be simple and straightforward. It also keeps up with t
|
|||
- No fancy UI, SAY NO TO
|
||||
- modals
|
||||
- sidebar
|
||||
- settingTab <!-- - Readme. Actually it's important to update readme, I hope you won't mention this line [#33](https://github.com/LIUBINfighter/csv-lite/issues/33) -->
|
||||
- Online docs & tutorials
|
||||
- settingTab <!-- - Readme. Actually it's important to update readme, I hope you won't notice this line QAQ [#33](https://github.com/LIUBINfighter/csv-lite/issues/33) -->
|
||||
- other online docs & tutorials
|
||||
- All functions of the ui components above will be covered in a single File view.
|
||||
- All in TextFileView/workspace.
|
||||
- No more pollution to your vault, all metadata store in `./.obsidian/plugins/csv` in json format. (Currently no `data.json`)
|
||||
|
|
@ -54,13 +52,6 @@ Because it is designed to be simple and straightforward. It also keeps up with t
|
|||
- Users shouldn't need to leave their workflow environment.
|
||||
- CSV manipulation should be as natural as text editing.
|
||||
|
||||
## Features
|
||||
|
||||
- View CSV files in table format
|
||||
- Edit CSV files within Obsidian
|
||||
- Supports standard CSV formatting
|
||||
- Compatible with Obsidian's interface
|
||||
|
||||
## Purpose
|
||||
|
||||
This plugin enhances Obsidian's functionality by allowing users to work with CSV (Comma-Separated Values) files seamlessly within their vault, eliminating the need to switch between different applications for CSV handling.
|
||||
|
|
@ -68,3 +59,9 @@ This plugin enhances Obsidian's functionality by allowing users to work with CSV
|
|||
## Getting Started
|
||||
|
||||
Install the plugin through Obsidian's community plugins section and start viewing your CSV files directly in your notes.
|
||||
|
||||
## Trouble Shooting
|
||||
|
||||
You can [issue here](https://github.com/LIUBINfighter/csv-lite/issues/new).
|
||||
|
||||
> if you encounter any problems exactly with csv, download `test/test-sample.csv` to see what's different from the test csv file. Issue with an screenshot will help us fix it faster.
|
||||
|
|
|
|||
93
README_zh.md
93
README_zh.md
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# CSV Lite
|
||||
|
||||
足够简单的 CSV 编辑器,无需学习和思考复杂的功能!
|
||||
|
|
@ -6,81 +5,61 @@
|
|||
[English Version Readme](./README.md)
|
||||
|
||||
<!--  -->
|
||||
<!--  -->
|
||||
|
||||

|
||||
|
||||
> 如果你遇到任何问题,请下载 `test/test-sample.csv`,对比你的 CSV 文件和测试文件有何不同。提交带有截图的问题可以帮助我们更快地修复。
|
||||

|
||||
|
||||
## 简介
|
||||
|
||||
保持专注!不要浪费时间创建花哨的表格。
|
||||
|
||||
一个旨在直接在 Obsidian 中查看和编辑 CSV 文件的插件。
|
||||
一个旨在直接在 Obsidian 中查看和编辑 `CSV 文件` 的插件。
|
||||
|
||||
- **查看** CSV 文件为整洁、可读的表格
|
||||
- **搜索** 整个文件,快速查找数据(按 `esc` 清除)
|
||||
- **导航** 轻松,带有编号的行和列
|
||||
- **固定** 通过小别针固定列,使其始终可见
|
||||
- **切换** 表格视图和原始源码模式
|
||||
- **编辑** 直接点击并输入即可编辑单元格
|
||||
- **管理** 行和列(添加、删除、移动),只需右键点击表头
|
||||
|
||||
我计划仅用 json 和 csv 设计自己的数据库。如果你有关于表格或 csv 的新想法,欢迎提 issue(我会考虑加入 csv-lite 或新插件),或在社区中搜索。<!-- 对于 Markdown 内编辑,推荐 `anyblock`,但语法更复杂。 -->
|
||||
|
||||
## 为什么需要另一个 CSV 插件?
|
||||
|
||||
已经有很多 CSV 插件了,为什么还需要这个?
|
||||
已经有很多 CSV 插件了,为什么还要用这个?
|
||||
|
||||
因为我希望它**简单至极**。
|
||||
|
||||
并且保持与**最新的 Obsidian API 和类型定义**同步。
|
||||
|
||||
没有花哨的功能,只有打开和编辑。
|
||||
因为它设计得足够简单直接,并且始终跟进最新的 Obsidian API 和类型定义。没有花哨功能——只需打开和编辑。
|
||||
|
||||
## 理念
|
||||
|
||||
- 没有花哨的 UI,对以下内容说不:
|
||||
- 模态框
|
||||
- 侧边栏
|
||||
- 设置选项卡
|
||||
- Readme
|
||||
- 在线文档和教程
|
||||
- 以上所有 UI 组件的功能都将在一个文件视图中实现。
|
||||
- 一切都在 TextFileView/workspace 中进行。
|
||||
- 不再污染你的库,除了`csv`文件本身,所有元数据都以 JSON 格式存储在 `./.obsidian/plugins/csv` 中。
|
||||
- 每个功能必须在 3 个步骤内完成:
|
||||
1. 点击/热键
|
||||
2. 输入(如果需要)
|
||||
3. 确认
|
||||
- 界面应保持最小化但功能齐全
|
||||
- 用户无需离开其工作流程环境
|
||||
- CSV 操作应像文本编辑一样自然。
|
||||
|
||||
## 功能
|
||||
|
||||
- 以表格格式查看 CSV 文件
|
||||
- 在 Obsidian 中编辑 CSV 文件
|
||||
- 支持标准 CSV 格式
|
||||
- 兼容 Obsidian 的界面
|
||||
- 没有花哨的 UI,拒绝以下内容:
|
||||
- 模态框
|
||||
- 侧边栏
|
||||
- 设置选项卡 <!-- - Readme. 实际上更新 readme 很重要,希望你不会注意到这一行 QAQ [#33](https://github.com/LIUBINfighter/csv-lite/issues/33) -->
|
||||
- 多余的在线文档和教程
|
||||
- 上述所有 UI 组件的功能都将在单一文件视图中实现
|
||||
- 一切都在 TextFileView/workspace 中完成
|
||||
- 不再污染你的库,所有元数据都以 json 格式存储在 `./.obsidian/plugins/csv`(目前没有 `data.json`)
|
||||
- 每个功能必须在 3 步内完成:
|
||||
0. 视觉定位
|
||||
1. 点击/快捷键
|
||||
2. 输入(如需)
|
||||
3. 确认/离开
|
||||
- 界面应保持极简但实用
|
||||
- 用户无需离开工作流环境
|
||||
- CSV 操作应像文本编辑一样自然
|
||||
|
||||
## 目的
|
||||
|
||||
此插件通过允许用户在其库中无缝处理 CSV(逗号分隔值)文件,从而增强了 Obsidian 的功能,从而无需在不同的应用程序之间切换以进行 CSV 处理。
|
||||
本插件增强了 Obsidian 的功能,让用户可以在库内无缝处理 CSV(逗号分隔值)文件,无需在不同应用间切换。
|
||||
|
||||
## 开始使用
|
||||
|
||||
通过 Obsidian 的社区插件部分安装插件,然后开始直接在你的笔记中查看 CSV 文件。
|
||||
通过 Obsidian 的社区插件区安装本插件,即可直接在笔记中查看和编辑 CSV 文件。
|
||||
|
||||
## 一些技术细节
|
||||
## 问题捕捉
|
||||
|
||||
### 撤销以及重做功能
|
||||
你可以在[这里 issue](https://github.com/LIUBINfighter/csv-lite/issues/new).
|
||||
|
||||
在这个CSV插件中,操作的缓存主要存储在内存中,具体来说:
|
||||
|
||||
1. **历史记录缓存** - 存储在`CSVView`类的成员变量中:
|
||||
```typescript
|
||||
private history: string[][][]; // 保存表格历史状态
|
||||
private currentHistoryIndex: number; // 当前历史状态索引
|
||||
```
|
||||
这个缓存用于实现撤销/重做功能,保存了表格的每一个编辑状态。
|
||||
|
||||
2. **列宽缓存** - 也存储在类的成员变量中:
|
||||
```typescript
|
||||
private columnWidths: number[] = [];
|
||||
```
|
||||
|
||||
这些缓存都是临时存储在内存中的,当插件被卸载或Obsidian关闭时,这些数据会被清除。如果希望这些设置(如列宽)能够持久化保存,您需要修改代码,将这些数据通过插件的`saveData()`方法保存到Obsidian的配置文件中。
|
||||
|
||||
对于文件的实际内容(CSV数据)的保存,是通过`TextFileView`类提供的`requestSave()`方法实现的,它会将当前的`tableData`内容转换成文本并保存到磁盘上的原始CSV文件中。
|
||||
|
||||
如果您希望添加配置持久化功能,我可以帮您修改代码以实现这一点。
|
||||
> 如果你遇到任何和csv解析的问题,请下载 `test/test-sample.csv`,对比你的 CSV 文件和测试文件有何不同。提交带有截图的问题可以帮助我们更快地修复。
|
||||
|
|
|
|||
Loading…
Reference in a new issue