Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: when exporting as markdown, have the current date in the file name
Browse files Browse the repository at this point in the history
sharunkumar committed Apr 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 73d3b14 commit 4c90b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src-tauri/src/scripts/export.js
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ async function init() {
}).join('');
const data = ExportMD.turndown(content);
const { id, filename } = getName();
await invoke('save_file', { name: `notes/${id}.md`, content: data });
await invoke('save_file', { name: `notes/${new Date().toISOString().slice(0, 10)}-${id}.md`, content: data });
await invoke('download_list', { pathname: 'chat.notes.json', filename, id, dir: 'notes' });
}

0 comments on commit 4c90b12

Please sign in to comment.