mirror of
https://github.com/hangeol-chang/obsidian-csv-allinone.git
synced 2026-07-22 05:37:25 +00:00
[DOCS] README.kr 작성중
This commit is contained in:
parent
a4b9173fd1
commit
1e29ed881f
4 changed files with 94 additions and 4 deletions
|
|
@ -20,4 +20,5 @@
|
|||
|
||||
## Contributing
|
||||
|
||||
## -
|
||||
## -
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Obsidian CSV All-in-One
|
||||
|
||||
.csv 파일을 생성하고, 내부의 데이터를 수정하고 저장하는 등 csv 관련된 작업을 처리하기 위한 플러그인입니다.
|
||||
|
||||
----
|
||||
## Other Language Docs
|
||||
-[english](../README.md)
|
||||
-maybe add later...
|
||||
|
|
@ -10,15 +10,104 @@
|
|||
> 이 플러그인은 dataviewjs를 사용하는 것을 전제로 만들어졌습니다.
|
||||
> csv 파일을 만들고 데이터를 추가하는것을 주 목적으로 제작되었습니다.
|
||||
|
||||
----
|
||||
## Examples
|
||||
### with obsidian command
|
||||
#### Creating CSV File
|
||||
|
||||
- Ctrl + P -> 'Create CSV Table' 검색
|
||||
아래처럼 필요한 데이터를 입력 후 Submit
|
||||

|
||||
|
||||
#### Search CSV Files
|
||||
- UI 수정 예정
|
||||
- Ctrl + P -> 'Open CSV Explorer' 검색
|
||||
- csv 파일의 위치 이동, 삭제가 가능.
|
||||
|
||||
-- 사진 추가 예정 --
|
||||
|
||||
|
||||
### with dataviewjs
|
||||
|
||||
#### - view as table
|
||||
- 소스코드
|
||||
```dataviewjs
|
||||
const csvPlugin = app.plugins.plugins['csv-allinone'];
|
||||
const fileName = "HouseKeeping/t/2025-01.csv";
|
||||
|
||||
csvPlugin.readCSV(app, fileName).then(res => {
|
||||
const headers = res.headers.map(item => item[0]);
|
||||
dv.table(headers, res.rows);
|
||||
})
|
||||
```
|
||||
- 결과물
|
||||

|
||||
|
||||
|
||||
#### - add new data (row)
|
||||
> buttons 플러그인을 사용합니다.
|
||||
- 소스코드
|
||||
```dataviewjs
|
||||
const csvPlugin = app.plugins.plugins['csv-allinone'];
|
||||
const { createButton } = app.plugins.plugins["buttons"];
|
||||
|
||||
const fileName = "HouseKeeping/t/2025-01.csv";
|
||||
|
||||
const openCsvModal = async(app, headers, f) => {
|
||||
csvPlugin.openCsvInputModal(app, headers, f)
|
||||
}
|
||||
|
||||
csvPlugin.readCSV(app, fileName).then(res => {
|
||||
const headers = res.headers.map(item => item[0]);
|
||||
dv.span(
|
||||
createButton({
|
||||
app, el: this.container,
|
||||
args: { name: "open row input Modal", class: "" },
|
||||
clickOverride: {
|
||||
click: openCsvModal, params: [app, res.headers, fileName]
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
```
|
||||
- 결과물
|
||||
-- 추가 예정 --
|
||||
|
||||
#### - add new column
|
||||
#### - delete exist column
|
||||
|
||||
|
||||
### with templater
|
||||
- 제가 템플레이터를 안써서 잘 모르겠습니다. 머쓱.
|
||||
|
||||
----
|
||||
## Usage/Features
|
||||
|
||||
## Contributing
|
||||
----
|
||||
## APIs
|
||||
### Handle file
|
||||
- readCSV
|
||||
- parameters (app: App, fileName: string)
|
||||
- return Promise<CSVTable | null>
|
||||
> filename을 입력받아서 CSVTable을 반환해줍니다.
|
||||
|
||||
## -
|
||||
|
||||
- saveCSV
|
||||
|
||||
### CSVTable (class)1
|
||||
-- class에서 할 수 있는 함수들 작성해둘 것.
|
||||
|
||||
|
||||
## How it work
|
||||
이 플러그인을 이용하여 csv 파일을 생성하면, .csv, .csv.meta의 두 파일을 생성하게 됩니다.
|
||||
원래 존재하던 csv파일을 불러오는 경우에는 임의로 .csv.meta 파일을 생성합니다.
|
||||
|
||||
csv에는 기본적인 테이블 정보들이, meta 파일에는 csv의 각 column 속성에 대한 정보가 담깁니다.
|
||||
현재(v0.1.0)는 .meta파일에 각 column의 type여부만 저장하지만, 후에는 data/select값 등이 추가되거나, 유효치 지정 등이 들어갈 예정입니다.
|
||||
|
||||
## Contributing
|
||||
아무렇게나 기여해 주셔도 감사합니다.
|
||||
|
||||
|
||||
## license
|
||||
- MIT
|
||||
BIN
docs/images/create_csv_table.gif
Normal file
BIN
docs/images/create_csv_table.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 633 KiB |
BIN
docs/images/view_csv_table.png
Normal file
BIN
docs/images/view_csv_table.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Loading…
Reference in a new issue