jsonmartin / readwise-mirror Goto Github PK
View Code? Open in Web Editor NEWThis project forked from obsidianmd/obsidian-sample-plugin
License: MIT License
This project forked from obsidianmd/obsidian-sample-plugin
License: MIT License
Thank you for this powerful and helpful tool, which enables a workflow I missed from my late Notion system.
I just wondered if adding a md SyncLog into the SyncFolder might help to get better information about articles or books that have been updated recently.
With some 100+-Kindle-books it is cumbersome to remember which books I have dealt with lately.
Thank you for considering my suggestion.
I just started with this plugin, which I like quite a bit better than the official one. I noticed there are comments in the default template, like so:
%%
ID: 33167075
Updated: 2023-10-15
%%
Are these needed for the proper functioning of the plugin, or can they be removed from the template?
Is there a way to get the location of a highlight when it imports
Error Snippet:
app.js:1 Uncaught (in promise) Error: ENAMETOOLONG: name too long, open '/Users/json/SecondBrain/Readwise/Articles/(2) Jason Miller 🦊⚛ on X- Please Dont Import SVGs as JSX. Its the Most Expensive Form of Sprite Sheet- Costs a Minimum of 3x More Than Other Techniques, and Hurts Both Runtime (Rendering) Performance and Memory Usage. This Bundle From a Popular Site Is Almost 50% SVG Icons (250kb), and Most Are Unused. https-t.coG1IgOjTeIT X.md'
Proposed Solution:
main.ts
sets the variable locationUrl as follows:
const locationUrl = "https://readwise.io/to_kindle?action=open&asin=${book['asin']}&location=${location}";
This is fine if the highlight corresponds to a book, but meaningless otherwise. IIRC in that case the URL looks like this:
const locationUrl = "https://readwise.io/to_kindle?action=open&asin=null&location=${location}";
For non-valid locationUrls (i.e. if book
or book['asin']
are null
), set locationUrl to null.
(Note that I can't make a pull request for this, because I don't know how to write the corresponding TypeScript code.)
If this fix was implemented, one could also optionally adjust the highlight template in the readme from this:
{%- if category == 'books' %} ([{{ location }}]({{ location_url }})){%- endif %}
To this:
{%- if location_url} ([{{ location }}]({{ location_url }})){%- endif %}
The second version looks a bit simpler to me.
Though there's also value in having at least one example in the readme of how to check whether a field has a specific non-empty value (as in if category == 'books'
).
Hi, relatively small request—is it possible to include variables in the export template to handle {{document_note}} and {{summary}} as per the official plugin? This is awesome by the way, thank you so much for putting it together!
First, I love the concept of this plugin. I think treating Readwise as the authoritative source is the right answer to keep everything sanely managed.
I do have a feature request: to add document tags to the generated files. Particularly if I can't/shouldn't add tags to the generated files, then pulling in the tags from Readwise seems like the next best thing. I know at least for my use case, there's no need to drill into individual highlight tags, but the book ones could be useful inside the About section.
Readwise allows for discarding highlights (instead of hard deletion). Add Obsidian support for this feature.
If a highlight has been discarded, the is_discard
field should be set to true
.
Add a configuration toggle option in settings to filter discarded highlights. If this toggle setting is enabled, then filter out all highlights (inside filterHighlights
method) where the is_discard
field is set to true
.
Hi
Could you please consider adding the following abilities?
I.E.
Something is 💙💛 not correct 💚
becomes something-is-not-correct
Thanks
If I updated the metadata of the book inside readwise it not mirrored to obsidian
I'm not sure why this is happening, but rate-limiting isn't working properly for me.
API Rate Limited, waiting to retry for NaN
Looking at the headers in the requests that come back, I see valid Retry-Header
values (e.g. 45
or 56
), which is surprising to me. Having looked at the code, I expected the issue to be a missing header.
I think the expected behavior here is a more robust failure mode.
For some reason if I edit highlights in the readwise this change is not syncing.
Only when new highlights added the sync is updating the note
Is it possible to update the note when the edit for already created highlights happend?
Thanks for this Obsidian plugin, I've just installed it but found it very useful so far.
One problem I've noticed: In highlights for books imported from Google Play Books, there are embedded links that point to that location in the book on the GPB web interface, which is very handy for jumping into the book to see the context for that highlight. Once a GPB book is imported to Readwise, these links are correctly preserved in their web interface. However, when that book metadata and its highlights have been mirrored in Obsidian by this plugin, these GPB links for each highlight location appear as broken links to the Kindle app. Instead they should be preserved as-is and passed through to Obsidian.
Here's an example of one of the aforementioned links (login required): Page 7
Here's a file on Google Drive (for another book) that shows the links in the highlights file that gets imported to Readwise: Why We Sleep
Add Templating engine to customize output of Readwise export files
There's customization for tons of options. But the ability to customize name appears to be missing :(
Thanks for making an amazing plugin! I really wished for an ability to sync-export updated highlights, and this plugin does that whereas the official one does not.
Problem: If you define a highlight-specific tag (not a document tag) in Readwise, then Readwise Mirror's default Highlight Template does not export them.
Suggested solution: Adjust the default Highlight Template (including in the documentation here, plus in the suggested Blockquote filter) by appending a block similar to the "if note
" block, i.e. as follows:
{{ text }}{%- if category == 'books' %} ([{{ location }}]({{ location_url }})){%- endif %}{%- if color %} %% Color: {{ color }} %%{%- endif %} ^{{id}}{%- if note %}
Note: {{ note }}
{%- endif %}
---
{{ text }}{%- if category == 'books' %} ([{{ location }}]({{ location_url }})){%- endif %}{%- if color %} %% Color: {{ color }} %%{%- endif %} ^{{id}}{%- if note %}
Note: {{ note }}
{%- endif %}{%- if tags %}
Tags: {{ tags }}
{%- endif %}
---
Hi,
great plugin there, thank you!
I have only one minor problem using it: I cannot query meta data fields (in the #About section) with the Dataview plugin in Obsidian, since you do not use the double colon format after the meta data field names (only a single colon).
Any chance to update/modify this or provide an option for using meta data field names with that syntax (or to provide an option to use a custom import template file)?
Thank you and keep up the good work, your plugin rocks.
Cheers,
Szabolcs
I just realized that the markdown this plugin exports is substantially different from the Readwise export.
In particular:
For example, here is a snippet of the export I get from Readwise:
Here is the start of the snippet I get from this plugin:
INTRODUCTION (102) %% Color: yellow %% ^203951410
Note: .h1
PART I WHAT IS POSITIVE INTELLIGENCE AND PQ? (128) %% Color: yellow %% ^203951411
Note: .h1
CHAPTER 1 POSITIVE INTELLIGENCE AND PQ (130) %% Color: yellow %% ^203951412
Note: .h2
“What do we need to do so that within three years we can say this current crisis was the best thing that could have happened to our company?” (2191) %% Color: yellow %% ^203951413
PQ stands for Positive Intelligence Quotient. Your PQ is your Positive Intelligence score, expressed as a percentage, ranging from 0 to 100. In effect, your PQ is the percentage of time your mind is acting as your friend rather than as your enemy; or, in other words, it is the percentage of time your mind is serving you versus sabotaging you. (161) %% Color: yellow %% ^203951415
Hi Jason,
Wondering if you would be open to making some paid changes to this plugin? Specifically, want to make each highlight it's own note etc.
Best,
Irshaad
Would it be possible to have a note with "partial sections"? For example, the plugin would update everything except a list of specified sections, as:
---
id: {{ id }}
updated: {{ updated }}
title: {{ title }}
author: {{ author }}
---
# Summary
This section would not be updated by the plugin.
# Key Insights
This section would not be updated by the plugin.
# Highlights
For highlights made in Readwise Reader, the official Readwise-Obsidian plugin appends a link to the Reader highlight, like so: ([View Highlight](https://read.readwise.io/read/some_string))
I find this functionality very useful, and would like to implement it in Readwise Mirror. Is this a) not possible in the plugin (e.g. because Readwise doesn’t expose the corresponding API), b) conceptually possible but not implemented in the plugin, or c) actually already possible?
Here's a snippet with 4 extracted notes:
Both the Judge’s view and the Sage’s view are self-fulfilling prophecies. Each of us is a mixed bag, both divine and wretched. Whether you are in Sage or Saboteur mode determines which version of you gets manifested. (798) %% Color: yellow %% ^204391114
The second way the Judge sabotages us is by judging others. The Judge plays a central role in team, professional, and personal conflicts. (802) %% Color: yellow %% ^204391115
With Positive Intelligence you can both measure and significantly improve the percentage of time that your mind is serving you rather than sabotaging you. (117) %% Color: yellow %% ^204881490
Using the principles of Positive Intelligence, we devised a core question to reframe and redirect the team’s perspective and redirect its efforts: “What do we need to do so that within three years we can say this current crisis was the best thing that could have happened to our company?” (139) %% Color: yellow %% ^204881491
Note that the location on the last two is before the location on the first two.
In this particular case, I think that it's sorting by the timestamp of when I highlighted, not of where they appear in the book.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.