mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 16:48:44 +08:00
upgrade version to v1.5.0
This commit is contained in:
parent
6fd21b7c97
commit
3525b1b402
@ -49,4 +49,5 @@ esbuild.build({
|
|||||||
sourcemap: prod ? false : 'inline',
|
sourcemap: prod ? false : 'inline',
|
||||||
treeShaking: true,
|
treeShaking: true,
|
||||||
outfile: 'main.js',
|
outfile: 'main.js',
|
||||||
|
minify: true
|
||||||
}).catch(() => process.exit(1));
|
}).catch(() => process.exit(1));
|
||||||
|
|||||||
3
main.ts
3
main.ts
@ -19,7 +19,6 @@ export default class DoubanPlugin extends Plugin {
|
|||||||
log.warn(i18nHelper.getMessage('140101'));
|
log.warn(i18nHelper.getMessage('140101'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log.trace(`you choose item load data success: ${JSON.stringify(extract)}`);
|
|
||||||
let content:string = this.doubanEtractHandler.parseText(extract, this.settings)
|
let content:string = this.doubanEtractHandler.parseText(extract, this.settings)
|
||||||
if(content) {
|
if(content) {
|
||||||
editor.replaceSelection(content);
|
editor.replaceSelection(content);
|
||||||
@ -28,9 +27,7 @@ export default class DoubanPlugin extends Plugin {
|
|||||||
|
|
||||||
|
|
||||||
async search(searchTerm:string, editor: Editor) {
|
async search(searchTerm:string, editor: Editor) {
|
||||||
log.trace("[main] start search:" + searchTerm);
|
|
||||||
const resultList = await Searcher.search(searchTerm, this.settings);
|
const resultList = await Searcher.search(searchTerm, this.settings);
|
||||||
log.trace("[main] complete search:" + searchTerm + ",\n result list:" + JSON.stringify(resultList));
|
|
||||||
new DoubanFuzzySuggester(this, editor).showSearchList(resultList);
|
new DoubanFuzzySuggester(this, editor).showSearchList(resultList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-douban-plugin",
|
"id": "obsidian-douban-plugin",
|
||||||
"name": "Douban",
|
"name": "Douban",
|
||||||
"version": "v1.4.3",
|
"version": "v1.5.0",
|
||||||
"minAppVersion": "0.12.0",
|
"minAppVersion": "0.12.0",
|
||||||
"description": "This is a plugin that can import movies, books or musics info data from Douban for Obsidian .",
|
"description": "This is a plugin that can import movies/books/musics/notes/games info data from Douban for Obsidian .",
|
||||||
"author": "Wanxp",
|
"author": "Wanxp",
|
||||||
"authorUrl": "https://obsidian-douban.wanxuping.com",
|
"authorUrl": "https://obsidian-douban.wanxuping.com",
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
|
|||||||
@ -50,7 +50,6 @@ export default abstract class DoubanAbstractLoadHandler<T extends DoubanSubject>
|
|||||||
throw: true
|
throw: true
|
||||||
};
|
};
|
||||||
request(requestUrlParam)
|
request(requestUrlParam)
|
||||||
.then(e => {log.trace(e.toString());return e;})
|
|
||||||
.then(load)
|
.then(load)
|
||||||
.then(this.parseSubjectFromHtml)
|
.then(this.parseSubjectFromHtml)
|
||||||
.then(content => this.toEditor(editor, content))
|
.then(content => this.toEditor(editor, content))
|
||||||
|
|||||||
@ -67,7 +67,6 @@ export default class DoubanGameLoadHandler extends DoubanAbstractLoadHandler<Dou
|
|||||||
}else{
|
}else{
|
||||||
value = html(info.next.next).text().trim();
|
value = html(info.next.next).text().trim();
|
||||||
}
|
}
|
||||||
log.trace(key + ":" + value);
|
|
||||||
valueMap.set(GameKeyValueMap.get(key), value);
|
valueMap.set(GameKeyValueMap.get(key), value);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,6 @@ class DoubanFuzzySuggester extends FuzzySuggestModal<DoubanSearchResultSubject>
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChooseItem(item: DoubanSearchResultSubject, evt: MouseEvent | KeyboardEvent): void {
|
onChooseItem(item: DoubanSearchResultSubject, evt: MouseEvent | KeyboardEvent): void {
|
||||||
log.trace(`you chosen : ${JSON.stringify(item)}`)
|
|
||||||
this.plugin.doubanEtractHandler.handle(item, this.editor);
|
this.plugin.doubanEtractHandler.handle(item, this.editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,6 @@ export default class Searcher {
|
|||||||
throw: true
|
throw: true
|
||||||
};
|
};
|
||||||
return request(requestUrlParam)
|
return request(requestUrlParam)
|
||||||
.then(a => {log.trace(a.toString()); return a;})
|
|
||||||
.then(load)
|
.then(load)
|
||||||
.then(SearchParserHandler.parseSearch)
|
.then(SearchParserHandler.parseSearch)
|
||||||
.catch(e => log.error(i18nHelper.getMessage('130101')))
|
.catch(e => log.error(i18nHelper.getMessage('130101')))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user