mirror of
https://github.com/shadowoption/Hunchly-obsidian-plugin.git
synced 2026-07-22 08:50:25 +00:00
parent
767d02d86f
commit
47170b199d
3 changed files with 6 additions and 9 deletions
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "hunchly",
|
||||
"name": "Hunchly",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Import notes and images from Hunchly.",
|
||||
"description": "This plugin converts Hunchly's notes and captioned images into obsidian notes. Also adds selectors from hunchly as obsidian tags.",
|
||||
"author": "sapperlabs",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "hunchly-obsidian-plugin",
|
||||
"version": "1.0.0",
|
||||
"description": "Import Hunchly notes and images into obsidian",
|
||||
"version": "1.0.1",
|
||||
"description": "This plugin converts Hunchly's notes and captioned images into obsidian notes. Also adds selectors from hunchly as obsidian tags.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
|
|
|
|||
|
|
@ -62,11 +62,8 @@ export class Hunchly{
|
|||
const tempDir = tmp.dirSync({ unsafeCleanup: true });
|
||||
const extractionPath = tempDir.name;
|
||||
|
||||
// Create a read stream for the zip file.
|
||||
const readStream = fs.createReadStream(zipFilePath);
|
||||
|
||||
// Pipe the read stream through unzipper to extract the contents.
|
||||
await readStream.pipe(unzipper.Extract({ path: extractionPath })).promise();
|
||||
// unzip the file
|
||||
await unzipper.Open.file(zipFilePath).then(d => d.extract({path: extractionPath, concurrency: 5}));
|
||||
|
||||
if (!await this.checkFileOrFolderExistence(extractionPath, "case_data")){
|
||||
new Notice("Not a valid hunchly case file. Use Export > Export Case in the hunchly dashboard.", 5000)
|
||||
|
|
|
|||
Loading…
Reference in a new issue