Skip to content

Commit

Permalink
버전 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
kmsk99 committed Sep 20, 2023
1 parent 1a71d21 commit 7ed0c26
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 63 deletions.
Binary file removed kr-book-info-plugin-1.3.2.zip
Binary file not shown.
Binary file added kr-book-info-plugin-1.3.3.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -222,45 +222,58 @@ var DEFAULT_SETTINGS = {
toggleIndex: false
};
var KrBookInfo = class extends import_obsidian3.Plugin {
addBookInfoToActiveFile() {
return __async(this, null, function* () {
const file = this.app.workspace.getActiveFile();
if (file.extension !== "md") {
new import_obsidian3.Notice("This file is not md file, Please open md file");
return;
}
if (!file) {
new import_obsidian3.Notice("There's no active file, Please open new file");
return;
}
new import_obsidian3.Notice("Loading...");
const {
ok,
book: { title, main },
error
} = yield getBook({
bookname: file.basename,
defaultTag: this.settings.defaultTag,
status: this.settings.statusSetting,
myRate: this.settings.myRateSetting,
bookNote: this.settings.bookNoteSetting,
toggleTitle: this.settings.toggleTitle,
toggleIntroduction: this.settings.toggleIntroduction,
toggleIndex: this.settings.toggleIndex
});
if (!ok) {
new import_obsidian3.Notice(error);
return;
}
const text = yield this.app.vault.read(file);
this.app.vault.modify(file, main + "\n\n" + text);
const regExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-+<>@\#$%&\\\=\(\'\"]/gi;
const fileName = title.replace(regExp, "");
this.app.fileManager.renameFile(this.app.vault.getAbstractFileByPath(file.path), file.parent.path + "/" + fileName + ".md");
new import_obsidian3.Notice(`Success!`);
return;
});
}
onload() {
return __async(this, null, function* () {
yield this.loadSettings();
this.addCommand({
id: "add-book-info",
name: "Add Book Info",
icon: "lines-of-text",
callback: () => __async(this, null, function* () {
yield this.addBookInfoToActiveFile();
})
});
this.addRibbonIcon("lines-of-text", "Add Book Info", (evt) => __async(this, null, function* () {
const file = this.app.workspace.getActiveFile();
if (file.extension !== "md") {
new import_obsidian3.Notice("This file is not md file, Please open md file");
return;
}
if (!file) {
new import_obsidian3.Notice("There's no active file, Please open new file");
return;
}
new import_obsidian3.Notice("Loading...");
const {
ok,
book: { title, main },
error
} = yield getBook({
bookname: file.basename,
defaultTag: this.settings.defaultTag,
status: this.settings.statusSetting,
myRate: this.settings.myRateSetting,
bookNote: this.settings.bookNoteSetting,
toggleTitle: this.settings.toggleTitle,
toggleIntroduction: this.settings.toggleIntroduction,
toggleIndex: this.settings.toggleIndex
});
if (!ok) {
new import_obsidian3.Notice(error);
return;
}
const text = yield this.app.vault.read(file);
this.app.vault.modify(file, main + "\n\n" + text);
const regExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-+<>@\#$%&\\\=\(\'\"]/gi;
const fileName = title.replace(regExp, "");
this.app.fileManager.renameFile(this.app.vault.getAbstractFileByPath(file.path), file.parent.path + "/" + fileName + ".md");
new import_obsidian3.Notice(`Success!`);
return;
yield this.addBookInfoToActiveFile();
}));
this.addSettingTab(new KrBookInfoSettingTab(this.app, this));
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "kr-book-info-plugin",
"name": "KoreanBook Info Plugin",
"version": "1.3.2",
"minAppVersion": "0.15.0",
"description": "A plugin that crawls Yes24 to get book information.",
"author": "kmsk99",
"authorUrl": "github.com/kmsk99",
"isDesktopOnly": false
}
{
"id": "kr-book-info-plugin",
"name": "KoreanBook Info Plugin",
"version": "1.3.3",
"minAppVersion": "0.15.0",
"description": "A plugin that crawls Yes24 to get book information.",
"author": "kmsk99",
"authorUrl": "github.com/kmsk99",
"isDesktopOnly": false
}
1 change: 0 additions & 1 deletion main.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "kr-book-info-plugin",
"name": "KoreanBook Info Plugin",
"version": "1.3.2",
"minAppVersion": "0.15.0",
"description": "A plugin that crawls Yes24 to get book information.",
"author": "kmsk99",
"authorUrl": "github.com/kmsk99",
"isDesktopOnly": false
}
{
"id": "kr-book-info-plugin",
"name": "KoreanBook Info Plugin",
"version": "1.3.3",
"minAppVersion": "0.15.0",
"description": "A plugin that crawls Yes24 to get book information.",
"author": "kmsk99",
"authorUrl": "github.com/kmsk99",
"isDesktopOnly": false
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kr-book-info-plugin",
"version": "1.3.2",
"version": "1.3.3",
"description": "Yes24를 크롤링하여 도서 정보를 가져오는 플러그인입니다.",
"main": "main.js",
"scripts": {
Expand Down
9 changes: 5 additions & 4 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.0.0": "0.9.7",
"1.0.1": "0.12.0"
}
{
"1.0.0": "0.9.7",
"1.0.1": "0.12.0",
"1.3.3": "0.15.0"
}

0 comments on commit 7ed0c26

Please sign in to comment.