Skip to content

Commit

Permalink
feat: when exporting as markdown, have the current date in the file name
Browse files Browse the repository at this point in the history
  • Loading branch information
sharunkumar committed Apr 7, 2023
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
Expand Up @@ -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' });
}

Expand Down

0 comments on commit 4c90b12

Please sign in to comment.