Skip to content

Commit

Permalink
Fixes append to active file renaming the note (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikodin authored Dec 27, 2024
1 parent c0fb4c2 commit 4be20ae
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 37 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "scribe",
"name": "Scribe",
"version": "1.0.3",
"version": "1.0.4",
"minAppVersion": "0.15.0",
"description": "Record voice notes, Fill in lost thoughts, Transcribe the audio, Summarize & Visualize the text - All in one clip",
"author": "Mike Alicea",
Expand Down
68 changes: 34 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{
"name": "obsidian-scribe-plugin",
"version": "1.0.0",
"description": "An Obsidian plugin for recording voice notes, transcribing the audio, and summarizing the text - All in one",
"main": "build/main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build:prod": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json"
},
"keywords": [],
"author": "Mike Alicea",
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^16.11.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"builtin-modules": "3.3.0",
"dotenv": "^16.4.5",
"esbuild": "0.17.3",
"obsidian": "latest",
"tslib": "2.4.0",
"typescript": "4.7.4"
},
"dependencies": {
"@langchain/core": "^0.3.14",
"@langchain/openai": "^0.3.11",
"assemblyai": "^4.8.0",
"langchain": "^0.3.3",
"openai": "^4.68.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "^3.23.8"
}
"name": "obsidian-scribe-plugin",
"version": "1.0.4",
"description": "An Obsidian plugin for recording voice notes, transcribing the audio, and summarizing the text - All in one",
"main": "build/main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build:prod": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json"
},
"keywords": [],
"author": "Mike Alicea",
"license": "MIT",
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^16.11.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"builtin-modules": "3.3.0",
"dotenv": "^16.4.5",
"esbuild": "0.17.3",
"obsidian": "latest",
"tslib": "2.4.0",
"typescript": "4.7.4"
},
"dependencies": {
"@langchain/core": "^0.3.14",
"@langchain/openai": "^0.3.11",
"assemblyai": "^4.8.0",
"langchain": "^0.3.3",
"openai": "^4.68.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "^3.23.8"
}
}
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,11 @@ export default class ScribePlugin extends Plugin {
const llmSummary = await this.handleTranscriptSummary(transcript);
await addSummaryToNote(this, note, llmSummary);

const llmFileName = `scribe-${moment().format('YYYY-MM-DD')}-${normalizePath(llmSummary.title)}`;
await renameFile(this, note, llmFileName);
const shouldRenameNote = !isAppendToActiveFile;
if (shouldRenameNote) {
const llmFileName = `scribe-${moment().format('YYYY-MM-DD')}-${normalizePath(llmSummary.title)}`;
await renameFile(this, note, llmFileName);
}
}

async handleTranscription(audioBuffer: ArrayBuffer) {
Expand Down

0 comments on commit 4be20ae

Please sign in to comment.