mirror of
https://github.com/hangeol-chang/obsidian-csv-allinone.git
synced 2026-07-22 05:37:25 +00:00
[INIT]
This commit is contained in:
parent
a0d5b069ae
commit
7753a75f35
6 changed files with 2453 additions and 19 deletions
37
copy_to_obsidian.py
Normal file
37
copy_to_obsidian.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
# 경로 설정
|
||||
SOURCE_FILES = [
|
||||
'manifest.json',
|
||||
'main.js'
|
||||
]
|
||||
OBSIDIAN_DIR = os.path.abspath('../obsidian/.obsidian')
|
||||
TARGET_DIR = os.path.join(OBSIDIAN_DIR, 'plugins', 'csv-allinone')
|
||||
|
||||
def copy_files():
|
||||
# Obsidian 폴더 확인
|
||||
if not os.path.exists(OBSIDIAN_DIR):
|
||||
print(f"Error: Obsidian directory not found at {OBSIDIAN_DIR}")
|
||||
return
|
||||
|
||||
# csv-allinone 폴더가 없으면 생성
|
||||
if not os.path.exists(TARGET_DIR):
|
||||
print(f"Creating target directory: {TARGET_DIR}")
|
||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||
|
||||
# 파일 복사
|
||||
for file_name in SOURCE_FILES:
|
||||
source_path = os.path.abspath(file_name)
|
||||
target_path = os.path.join(TARGET_DIR, file_name)
|
||||
|
||||
if os.path.exists(source_path):
|
||||
shutil.copy2(source_path, target_path)
|
||||
print(f"Copied {file_name} to {target_path}")
|
||||
else:
|
||||
print(f"Warning: Source file {source_path} not found.")
|
||||
|
||||
print("All files copied successfully!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
copy_files()
|
||||
17
main.ts
17
main.ts
|
|
@ -2,16 +2,16 @@ import { App, Editor, MarkdownView, Modal, Notice, Plugin, PluginSettingTab, Set
|
|||
|
||||
// Remember to rename these classes and interfaces!
|
||||
|
||||
interface MyPluginSettings {
|
||||
interface CsvPluginSettings {
|
||||
mySetting: string;
|
||||
}
|
||||
|
||||
const DEFAULT_SETTINGS: MyPluginSettings = {
|
||||
const DEFAULT_SETTINGS: CsvPluginSettings = {
|
||||
mySetting: 'default'
|
||||
}
|
||||
|
||||
export default class MyPlugin extends Plugin {
|
||||
settings: MyPluginSettings;
|
||||
export default class CsvPlugin extends Plugin {
|
||||
settings: CsvPluginSettings;
|
||||
|
||||
async onload() {
|
||||
await this.loadSettings();
|
||||
|
|
@ -45,6 +45,7 @@ export default class MyPlugin extends Plugin {
|
|||
editor.replaceSelection('Sample Editor Command');
|
||||
}
|
||||
});
|
||||
|
||||
// This adds a complex command that can check whether the current state of the app allows execution of the command
|
||||
this.addCommand({
|
||||
id: 'open-sample-modal-complex',
|
||||
|
|
@ -66,7 +67,7 @@ export default class MyPlugin extends Plugin {
|
|||
});
|
||||
|
||||
// This adds a settings tab so the user can configure various aspects of the plugin
|
||||
this.addSettingTab(new SampleSettingTab(this.app, this));
|
||||
this.addSettingTab(new CsvSettingTab(this.app, this));
|
||||
|
||||
// If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin)
|
||||
// Using this function will automatically remove the event listener when this plugin is disabled.
|
||||
|
|
@ -107,10 +108,10 @@ class SampleModal extends Modal {
|
|||
}
|
||||
}
|
||||
|
||||
class SampleSettingTab extends PluginSettingTab {
|
||||
plugin: MyPlugin;
|
||||
class CsvSettingTab extends PluginSettingTab {
|
||||
plugin: CsvPlugin;
|
||||
|
||||
constructor(app: App, plugin: MyPlugin) {
|
||||
constructor(app: App, plugin: CsvPlugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"id": "sample-plugin",
|
||||
"name": "Sample Plugin",
|
||||
"version": "1.0.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Demonstrates some of the capabilities of the Obsidian API.",
|
||||
"author": "Obsidian",
|
||||
"authorUrl": "https://obsidian.md",
|
||||
"fundingUrl": "https://obsidian.md/pricing",
|
||||
"id": "csv-allinone",
|
||||
"name": "CSV All-in-One",
|
||||
"version": "0.1.0",
|
||||
"minAppVersion": "1.7.7",
|
||||
"description": "all about csv.",
|
||||
"author": "hihangeol",
|
||||
"authorUrl": "https://github.com/Hangeol-Chang/obsidian-csv-allinone",
|
||||
"fundingUrl": "https://github.com/Hangeol-Chang/obsidian-csv-allinone",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
|
|||
2397
package-lock.json
generated
Normal file
2397
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -18,7 +18,6 @@
|
|||
"builtin-modules": "3.3.0",
|
||||
"esbuild": "0.17.3",
|
||||
"obsidian": "latest",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.4"
|
||||
"tslib": "2.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@
|
|||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
]
|
||||
, "main.ts" ]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue