Giter Club home page Giter Club logo

readwise-mirror's People

Contributors

adienox avatar clemens-e avatar gitmurf avatar johannrichard avatar jsonmartin avatar kostapc avatar lishid avatar shabegom avatar taurelas avatar tdnzr avatar thomasvs avatar tokuhirom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

readwise-mirror's Issues

Feature request: SyncLog as md.file

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.

Are these comments needed for the plugin to operate correctly?

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?

Location

Is there a way to get the location of a highlight when it imports

Fix Filename Too Long Error

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:

  • Cut filenames to be no longer than 256 chars

Bug: Readwise Mirror generates a locationUrl even for non-books

Problem

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}";

Solution

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.)

Side Benefit

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').

Ability to include document notes and summaries in export

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!

Feature Request: Include Document Tags

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.

Filter out highlights that have been discarded in Readwise

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.

FR: Ability to slugify file names and remove emojis

Hi

Could you please consider adding the following abilities?

  1. Slugifying a file name
  2. Removing all emojis when creating a file

I.E.

Something is 💙💛 not correct 💚 becomes something-is-not-correct

Thanks

Metadata sync

If I updated the metadata of the book inside readwise it not mirrored to obsidian

Rate-limit requests when there are issues getting timeout length

I'm not sure why this is happening, but rate-limiting isn't working properly for me.

  • I initiated a fetch, having not run one for several months. So there's a lot of data to pull.
  • After a few books are successfully scanned, I start seeing requests happening in a tight loop, with the message API Rate Limited, waiting to retry for NaN

Screenshot 2023-10-23 at 3 19 15 PM

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.

Edit already existed highlights

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?

Google Play Books links point to Kindle app

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

Templating engine

Add Templating engine to customize output of Readwise export files

Bug? Highlight Template does not export tags by default

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:

Current Highlight Template syntax

{{ text }}{%- if category == 'books' %} ([{{ location }}]({{ location_url }})){%- endif %}{%- if color %} %% Color: {{ color }} %%{%- endif %} ^{{id}}{%- if note %}

Note: {{ note }}
{%- endif %}

---

Suggested Highlight Template syntax

{{ text }}{%- if category == 'books' %} ([{{ location }}]({{ location_url }})){%- endif %}{%- if color %} %% Color: {{ color }} %%{%- endif %} ^{{id}}{%- if note %}

Note: {{ note }}
{%- endif %}{%- if tags %}

Tags: {{ tags }}
{%- endif %}

---

"Author::" instead of "Author:"

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

Format for highlights is substantially different from the Readwise manual markdown export

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:

Highlights

  • INTRODUCTION

  • With Positive Intelligence you can both measure and significantly improve the percentage of time that your mind is serving you rather than sabotaging you. (Location 117)
  • PART I WHAT IS POSITIVE INTELLIGENCE AND PQ?

  • CHAPTER 1 POSITIVE INTELLIGENCE AND PQ

  • 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?” (Location 139)
  • When I checked in with Frank recently, he reported that he valued his increased sense of peace and happiness even more highly than his impressive professional and financial gains. (Location 150)

Here is the start of the snippet I get from this plugin:

Highlights

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


Modification request

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

Partial note sections

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

Does Readwise Mirror support adding links to "View Highlight in Reader"?

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?

Add feature to sort highlights by page location, instead of timestamp

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.