Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes append to active file renaming the note #3

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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