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

YAML and other meta data - Is this mic on? #47

Open
writtenfool opened this issue Sep 17, 2023 · 9 comments
Open

YAML and other meta data - Is this mic on? #47

writtenfool opened this issue Sep 17, 2023 · 9 comments

Comments

@writtenfool
Copy link

  • I'm on the fence with the Readwise Reader. Much has changed in both Readwise Reader and Obsidian in the last two years.

  • I cannot add and status Obsidian yaml fields to readwise notes; they are deleted on the next refresh.

  • And if I add a tag (doc or highlight) in Reader, it does not trigger an update.

  • Given the standardization of yaml (properties) in Obsidian, are you folks going to address this area of this interface?

  • I really DO NOT want to maintain metadata in two places.

  • That said, I imagine you folks are up to your ears in keeping up with the flood of new folks into this space and fully realize not too many folks use this integration past the "out of the box" template.

  • My quandary - " I really like Reader! ".

@Amparose
Copy link

Amparose commented Sep 24, 2023

They really need to give us proper, full template instead of the piecemeal segments. Customising where the h1 tag goes, for instance, would fix the infernal extra line-break after the h1.

It's frustratingly close to perfect but far enough that I am hesitant to fully integrate it into my system.

Actually, I don't understand your points:

  • Given the standardization of yaml (properties) in Obsidian, are you folks going to address this area of this interface?
  • I really DO NOT want to maintain metadata in two places.

With "Use Custom Formatting" on, there's a "YAML front matter" section that you can move things from the confusingly named "Page metadata". Just make sure you format it correctly for front-matter like:

Author: {% if author %}{{author}}{% endif %}
Title: {{full_title}}
{% if url -%}
url: {{url}}
{% endif -%}

This might solve these two issues you have?

@Amparose
Copy link

After fiddling with this a bit, there are definitely issues that need to be resolved to avoid generating invalid front-matter:

  • Multiple authors create line-breaks without proper formatting as a list or just single-line comma separation.
  • Titles don't strip colons.
  • {{category}} breaks it.
  • {{tags}} need to be formatted as a YAML list.

So yeah, you're right, this plugin isn't great past the "out of the box" template, which is now out of date.

@writtenfool
Copy link
Author

Regarding YAML, if you create a property in a readwise generated note in Obsidian, the readwise plugin isn't aware of it. So, if you delete the readwise file to refresh it on the next running of the plugin, that yaml element is destroyed. This means you can't do anything with a readwise file on the Obsidian side except refer to it with links in another note.

In the Readwise and Obsidian discord, several folks provided jinja code that parses multiple authors.

I know it's possible to navigate the obsidian headers programmatically in an Obsidian note, Dataview does this quite well with file.lists .

Cheers!

@tyler-dot-earth
Copy link
Contributor

While frustrating for some use-cases, I think these are compelling reasons to treat readwise exports as read-only given how the plugin works right now. You may also find value in my readwise to obsidian template configurations — I've solved a few of the issues you have talked mentioned.

That said, I share many of these frustrations - particularly the lack of more template variables across all export sections.

@writtenfool
Copy link
Author

Is it possible for the plugin to check if a incoming note exists in Obsidian, and, if so, preserve whatever is in the yaml (properties) and replace the rest of the note with the incoming content? Just add an option in the plugin for how to handle this conflict.

Or, maybe I don't understand where the work is done in this plugin. Are the markdown files created on the Readwise digs and then simply inserted as new notes in Obsidian?

Thanks, btw, appreciate you folks looking into this interface and adding functionality!

Cheers!

@tyler-dot-earth
Copy link
Contributor

@writtenfool

Is it possible for the plugin to check if a incoming note exists in Obsidian, and, if so, preserve whatever is in the yaml (properties) and replace the rest of the note with the incoming content? Just add an option in the plugin for how to handle this conflict.

Or, maybe I don't understand where the work is done in this plugin. Are the markdown files created on the Readwise digs and then simply inserted as new notes in Obsidian?

For the specific pain of not clobbering existing properties, that may be able to be fixed in the plugin.

A quick look into the code and here's what I'm seeing:

It's also worth noting that none of the code in the links above handle frontmatter specifically.

So tl;dr yes, I think the plugin could be modified to avoid clobbering the YAML - it would just be additional logic.

I don't work for Readwise, but I will consider working on this if I get some time. Other contributors should feel free to work on it as well.

I'm currently working on improving the reliability of sync functionality - see this comment if you're curious.

Thanks, btw, appreciate you folks looking into this interface and adding functionality!

🫶

@writtenfool
Copy link
Author

@tyler-dot-earth - you are a SAINT !

We should probably start using properties instead of yaml and frontmatter. Yaml is the markdown name for this top section in a note and frontmatter is the obsidian api name for the same thing, but properties is the feature in Obsidian that folks know to assign meta data to notes.

Bummer about the archive, if only the plugin could iterate it locally, note by note.

Are you a Obsidian user? Reason I bring this up, most folks won't see this discussion. There's only six of us that are watching. If we want more feedback, we might consider mentioning these conversations on the Obsidian Discord.

And, btw, tl;dr is ok with me; happy to help.

I'd come back as a subscriber to Reader and Readwise in a heartbeat if some of this stuff could happen in the interface. Reader is freaking awesome.

@tyler-dot-earth
Copy link
Contributor

@tyler-dot-earth - you are a SAINT !

👼

@writtenfool: We should probably start using properties instead of yaml and frontmatter. Yaml is the markdown name for this top section in a note and frontmatter is the obsidian api name for the same thing, but properties is the feature in Obsidian that folks know to assign meta data to notes.

Note quite. Frontmatter is metadata at the beginning of the file - typically YAML at the beginning of a markdown file (as in Obsidian's case). Properties are Obsidian's branding for the markdown's frontmatter - it's just a friendly interface on top of the YAML. Open any of your notes with properties - they're just YAML frontmatter.

Bummer about the archive, if only the plugin could iterate it locally, note by note.

It can. That's exactly what's going on here:

const entries = await zipReader.getEntries();
this.notice("Saving files...", false, 30);
if (entries.length) {
for (const entry of entries) {

Are you a Obsidian user? Reason I bring this up, most folks won't see this discussion. There's only six of us that are watching. If we want more feedback, we might consider mentioning these conversations on the Obsidian Discord.

I am an Obsidian user. The Obsidian discord, Readwise discord, Readwise subreddit are good places to rally for your cause. You might also consider just submitting a feature request in the app so it can end up on their feature tracking board.

I'd come back as a subscriber to Reader and Readwise in a heartbeat if some of this stuff could happen in the interface. Reader is freaking awesome.

Great info for the Readwise team, though worth noting that I'm just a random contributor :)

@writtenfool
Copy link
Author

Lemme think on this, I don't have time and you don't either. If I reach out to Obsidian discord or subreddit folks, they would get excited and up for it, but no body available to do the work; letdown ain't healthy.

I am not a current readwise subscriber so their feature tracking isn't available.

My interest is that there is value in keeping this plugin updated routinely and, from my vantive the Readwise folks have dumped us :(

They were such hard chargers when they announced this on the Obsidian discord three years ago. But not a peep since.

Well, if nothing else, we've left a small kindle here, maybe somebody will notice this Obsidian SOS.

Cheers!

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

3 participants