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

Can the data in markdown syntax be used to create a table view and sort my email notes by date? #26

Closed
Dricc123 opened this issue Apr 20, 2024 · 10 comments

Comments

@Dricc123
Copy link

Dricc123 commented Apr 20, 2024

It's more of a question than an issue and please mark it as closed when done.
Your add-on is great! I especially like that email metadata gets transfered to the body of the note in a customized way either as text or as table. Now I'm wondering: can this data be used to display notes in a certain way? Let me explain: Obsidian has a Dataview plugin that uses the notes' YAML Frontmatter data to create views of multiples notes, typically a list view or a table view. For example with email notes, I can think of a table view of my email notes with the date of the email in column 1 and the title of the note in column 2. I would also be able to sort the dates chronologically.
Joplin doesn't have such a plug-in at this time. But what if I open my email notes in Obsidian? Will Obsidian take it as YAML Frontmatter metadata and be able to create views of notes?

@marph91
Copy link
Owner

marph91 commented Apr 21, 2024

For example with email notes, I can think of a table view of my email notes with the date of the email in column 1 and the title of the note in column 2.

You could take a look at the "Note overview" plugin. You can create a summary note from a set of filtered notes. I will check if it's possible to set the created time from the Thunderbird plugin. Then you could use the "Note overview" plugin to display a list with date and title. You could probably do this already, but the date will be the date of import, not the date when the mail was sent/received.

But what if I open my email notes in Obsidian? Will Obsidian take it as YAML Frontmatter metadata and be able to create views of notes?

If it's correctly formatted, Obsidian should be able to create the view as you want. Not sure though, since I don't use Obsidian.

@Dricc123
Copy link
Author

I will check if it's possible to set the created time from the Thunderbird plugin. Then you could use the "Note overview" plugin to display a list with date and title.

Not sure what you mean. We would need the date of the email, if I'm not mistaken.

But you fully understood what I wanted to achieve and the Note overview plug-in looks good! from the link you sent I understand the syntax would need to start with <!-- note-overview-plugin so the plugin knows where to take the data.

So nice of you to check this for me. Thank you.

@marph91
Copy link
Owner

marph91 commented Apr 21, 2024

I will check if it's possible to set the created time from the Thunderbird plugin. Then you could use the "Note overview" plugin to display a list with date and title.

Not sure what you mean. We would need the date of the email, if I'm not mistaken.

Sorry, that were implementation details. There are two relevant timestamps for this use case in Joplin's metadata:

  • created_time: This is the time when the note was created in Joplin.
  • user_created_time: This is currently unused, but could be set by the Thunderbird plugin. (Not yet implemented.)

AFAIK you can use both of the timestamps in the note overview plugin. (Untested) example to show all notes with the email tag chronologically:

<!-- note-overview-plugin
search: tag:email
fields: user_created_time, title
sort: user_created_time DESC
-->

So nice of you to check this for me. Thank you.

You are welcome. I'm using this plugin myself, so it's not much effort :)

@Dricc123
Copy link
Author

Dricc123 commented Apr 21, 2024

Understood. Very clear.
I'll be back end of next week as I'm off for a couple of days. just in case you'd wonder why I'm silent.

@Dricc123
Copy link
Author

  • user_created_time: This is currently unused, but could be set by the Thunderbird plugin. (Not yet implemented.)

So you checked and confirm it's feasible?

@marph91
Copy link
Owner

marph91 commented Apr 28, 2024

Yes, it's feasible. In fact, I just submitted a new version of the add-on for review at Mozilla. After the review is done, you could download the new version and check if it works for your use case.

@Dricc123
Copy link
Author

Dricc123 commented May 5, 2024

It's working great! My notes are sorted by the Email Date in my note generated by Note Overview plugin. Just what I needed. thank you!

@Dricc123
Copy link
Author

Dricc123 commented May 5, 2024

Oh sorry, I was too fast. I don't understand why but my note-overview note displays the updated time in the first column although I set it up to display the created time (I copy-pasted your above code)...
Edit: updated time and created time are correct in the note metadata (created time = date and time of the email)
Edit2: I found a better way without using the plugin! Joplin for Desktop version 3 (currently in Beta) has 'Note list style' under the drop down menu in 'View' that allows to add columns for different metadata fields including created Time. And there, it actually takes the created time, not the updated time.

@marph91
Copy link
Owner

marph91 commented May 6, 2024

I adapted the example to use user_created_time. It should work now.

@Dricc123
Copy link
Author

Dricc123 commented May 6, 2024

Works perfectly with the Overview Plugin now. Thank you very much!

@marph91 marph91 closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants