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

All annotations in the same note #9

Closed
javiavid opened this issue Jan 25, 2022 · 26 comments
Closed

All annotations in the same note #9

javiavid opened this issue Jan 25, 2022 · 26 comments

Comments

@javiavid
Copy link

@javiavid javiavid commented Jan 25, 2022

An option to create all annotations together in the same note, so it is easier to manage when you have many annotations in a book.

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 25, 2022

Not very "zettelkasteny" way to do.
How do you imagine it to works?
With a template (as requested in #8 ) used to generate the text of the single note and then append it to the big note?
I have to find a way to identify which notes are already there and which need to be imported and I can't think of an easy way to do it. Maybe I'll check the kindle sync plugin for inspiration.

@Edo78 Edo78 self-assigned this Jan 25, 2022
@javiavid
Copy link
Author

@javiavid javiavid commented Jan 25, 2022

Yes, it is a good reference.
Actually the plugin that tells you from Hyptothesis is inspired by Kindle's.

I know it's not very Zettelkasten and although it seems a great method, there are many people who prefer not to have so many notes. This would allow it to be for a broader public.

Also with the new card options in the minimal theme, it would be very good to have the cover of the book and under the annotations.

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 25, 2022

there are many people who prefer not to have so many notes

I had the opposit impression, to me people likes to have a lot fo notes because this let a structure emerge spontaneusly (but it may just be a false impression because my social bubble has a strong preference to Zettelkasten).

I surely can look at it but it's not a top priority.

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 25, 2022

Maybe it's because of lack of experience, how do you currently see all the annotations of a book together in obsidian?

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 25, 2022

Actually I don't even have that needs. They are just linked and more links emerges as I edit them.

BTW I was thinking to add more info in the frontmatter section (eg. title, chapter, author, etc) so dataview can be used to query all the notes and show them as you like.

This can even be an alternative to this request but I first have to add them.

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 25, 2022

I just create #10
With such a feature you can use dataview to see all the annotations of a book, all the annotations about an author, all the annotations about a chapter of a book and a lot more without me having to modify the plugin itself.

@Edo78 Edo78 added this to the 0.2.0 milestone Jan 25, 2022
@Edo78 Edo78 removed this from the 0.2.0 milestone Jan 25, 2022
@Edo78 Edo78 added this to the 0.3.0 milestone Jan 25, 2022
@javiavid
Copy link
Author

@javiavid javiavid commented Jan 26, 2022

Great, it's a big improvement.
I'm trying to create a table with dataview, but I can't use the frontmatter metadata as the plugin generates (indent).
If I remove the indentation it works correctly.

How do you use dataview with an indent frontmatter?

Thanks

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 26, 2022

Just wait for #16 😉

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 26, 2022

BTW you shouldn't mess with the indentation, just use a dot to connect the names
eg.

list KOREADERKEY.data.title

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 26, 2022

😄 Thank you very much

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 26, 2022

You are welcome but I just noticed a bug ... the first piesce shouldn't be KOREADERKEY but koreader-sync

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 26, 2022

Just released 0.1.1 sorry (I have to write some test to avoid those things)

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 26, 2022

I'm on fire 🔥
Just released 0.1.2 with an example right for this use case.

Let me know if this can achieve the result you are looking for

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 27, 2022

TL;DR to do this in the right way I have to refactor and change some things that I hoped to not have to change

Right now this issue looks more complex than before.
I've added support for custom template #8 so I can easily create a basic template for the body but having added frontmatter now requires a rethinking about how to keep all the existing features or at least a minimal subset.

I have to restructure the frontmatter section to have an array of data, metadata and custom_metadata for each note and this just to gave the user the same power to query and to avoid duplication of notes.

Then I'll have to have multipe way to check if a note is already imported.

On the bright side I'm thinking on a way to group notes per book, chapter, author, etc ... but you shouldn't really hold your breath.

@Edo78 Edo78 removed this from the 0.3.0 milestone Jan 27, 2022
@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

Thank you very much for trying

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

This is how I use the hypothesis plugin, something similar is my idea for this suggestion but adding the book cover. Maybe it's better to have the highlights separated for filtering and connecting ideas, but it's easier to see them grouped together.
I'm sure there are some advanced users who prefer to have it separate.

image

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 27, 2022

@javiavid just asking to better understand your use case.
How often do you edit the notes in such a large file? Never, rarely, sometimes, often or always?

  • If you prefer a similar grouping just to read them comfortably then I'm pretty sure you can get a similar view with dataview as well.
  • If you prefer it mainly to read but sometimes you need to make changes you could still use dateview by adding a link to the specific note and, once in a while to make a change, make an extra click.
  • If, on the other hand, you make a lot of changes to that type of file then the best way to go is to meet your request and find a way to implement it natively without resorting to dateview.

@Edo78 Edo78 added this to the 0.4.0 milestone Jan 27, 2022
@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

Edo, to be honest I'm just starting to use Hypothesis and Koreader with Obsidian very recently.

Maybe my idea of having everything together in one file is because of the habit of other old programs and because it seems neater to me to have 1 file than possibly more than 30 files for each book.
I think it's easier to read several ideas of the same topic in the same document, than having to open 30 documents, although transclusion and filtering with dataview could be a solution.

The biggest problem I see with this new option is the metadata you can add to a standalone file with respect to a text block. Could this be solved somehow with tags in the same way they are used in the tasks?

Regarding your question, in hypothesis for example, I don't usually modify the notes very much. If I visit a page and make highlights or notes, I don't usually visit the page and add more highlights, although the plugin allows it and it works fine to create new highlights and update them in obsidian. But in obsidian I do open those notes and add comments or extract ideas.

But the case of KOReader maybe is different, because although you could make the synchronization at the end of the book, some books remain unread completely or take longer to read so it would be interesting to be able to update the annotations several times.

I guess that creating the 2 options (single notes and a single note) is more complicated to program, if you get it would be great, but it's worth it if you have the time and desire to do it haha.

For me to have your plugin is already a great improvement, because having a Kobo reader, there are not as many options as for Kindle.

Obsidian gives so many possibilities that it's hard to find the best one.

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

In case you find it useful, I send you a screenshot of how I use hypothesis.

image

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 27, 2022

I don't want to tell you how you should or shouldn't use obsidian. For my use case, having multiple notes instead of one per book is better for my reason and my workflow.
If you like to see all the notes of a book in one place, I would like to help you (in a reasonable way 😉 ). You saw how fast my previous versions were, but this one is tough and, to do it well it will require an amount of time and energy that, right now, I honestly doesn't have.

I experimented with dataview and a custom template and I achieved something that can be a compromise with a few steps

  • enable create a folder for each book
  • enable custom template
  • create a template with
## Page: <%= it.page %>

**==<%= it.highlight %>==**

<%= it.text %>
  • enable Javascript queries in dateview
  • copy this query (change the row beginnin with '"koreader/(book) with the path for the note of the book you want)
```dataviewjs
dv.pages(
'"koreader/(book) How to Take Smart Notes_... {book suffix}-Sönke Ahrens"'
).where(n => n['koreader-sync']).sort(p => p['koreader-sync'].data.page).forEach(p => dv.paragraph(dv.fileLink(p.file.name, true)))
```

Then you should see a list (sorted by page) of notes for that book (there's even a link icon to directly open a specific note if you need).

The only problem is that it seems there's a bug or some problem in Obsidian and sometime the view change to a simple list of names ... if that happen try close/open the note or obsidian itself.

If this can be enought I can make a release with a setting to automatically create such query for each book or working around this issue in some way.

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

Thank you very much, this could be a good solution.
It's true that there is a bug sometimes, but maybe it's dataview or obsidian and it will be fixed.

The idea of creating a file for each book is also very good.

Just one last thing, to make it cleaner, would it be possible to hide the file name and change it to a link icon?
for example: 🔗

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 27, 2022

The ideal would be to be able to click on the highlight, but I think this will be more difficult, no?

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 28, 2022

The ideal would be to be able to click on the highlight, but I think this will be more difficult, no?

Not (yet) a dataview poweruser but I think that playing with css should do the trick
try adding this

---
cssclass: koreader-sync
---

to the very top of the note with the dataviewjs query
and (if you know how to change the style in the developer console) create this style

.koreader-sync .markdown-embed-title {
    display: none;
}

The result will hide the title leaving the chain icon
image

If you think this can be ok I can made a release with the right adjustment to produce the needed components.

@javiavid
Copy link
Author

@javiavid javiavid commented Jan 28, 2022

It works fine, thank you!

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 28, 2022

It works fine, thank you!

man, I received your coffees ... thank you 👍

@Edo78
Copy link
Owner

@Edo78 Edo78 commented Jan 28, 2022

With the release 0.3.0 I'd close this issue at the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants