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

Feature: Customizable saving format #17

Open
minthemiddle opened this issue Apr 13, 2024 · 9 comments
Open

Feature: Customizable saving format #17

minthemiddle opened this issue Apr 13, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@minthemiddle
Copy link
Owner

To make the saving format customizable.

@minthemiddle minthemiddle added the enhancement New feature or request label Apr 13, 2024
@minthemiddle
Copy link
Owner Author

Right now, hard coded to have

**{{timestamp}}**
{{content}}

@minthemiddle
Copy link
Owner Author

I will change to a real headline format for now:

## {{timestamp}}
{{content}}

@minthemiddle
Copy link
Owner Author

The format is hard-coded in this line so far:

if let Err(e) = writeln!(file, "\n**{}**\n{}\n", timestamp, thought) {

@minthemiddle
Copy link
Owner Author

Decision to not add.
No space for this setting.
Would require to create a new setting overlay.
Potentially with path and save format.
Too complicated and no need right now.

@minthemiddle
Copy link
Owner Author

Becomes more important if #29 is implemented.

@minthemiddle
Copy link
Owner Author

minthemiddle commented Sep 19, 2024

Implement saving templates for daily and standalone mode:

  • Reach template mode via shortcut cmd.
  • When you hit the shortcut, the template loads in regular textarea
  • The template updates on change (as regular text in textarea) and also with cmdenter
  • Depending on which save mode you're in, the respective template is being shown
  • i.e. if you are in daily mode, the template for daily is shown
  • Template is persisted via LocalStorage

This is how the current implementations of text saving look like in templates:

Daily note

## {{timestamp}}
{{body}}

Standalone note

# {{timestamp}}
{{body}}

@minthemiddle
Copy link
Owner Author

Stick with one timestamp format for now.

@minthemiddle
Copy link
Owner Author

I don't know yet how to pass template info from LocalStorage to Rust backend.

@minthemiddle
Copy link
Owner Author

I don't know yet how to pass template info from LocalStorage to Rust backend.

I could experiment with defining some formats in the Rust backend and let the frontend just pick one of it.
This would be instead of defining it in the frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant