Comments (6)
Hey @1ncontinentia , thank you, and glad to hear you're enjoying the plugin!
Sure, it's definitely possible to add new fields as long as they're exposed by Readwise's API. I double checked the API documents and see the new document_note
field that you mentioned, but I don't see any field named summary
. You can see all of the available fields exposed by the API here: https://readwise.io/api_deets.
If you're comfortable opening a pull request adding in the new field(s), I'd be happy to merge in the changes. Otherwise, I'll add it the roadmap but no ETA on when I'll actually have time to focus on this given other work commitments
from readwise-mirror.
Hey @jsonMartin, thanks so much for getting back to me! Happy to do that; I assume I just add the fields in the main.ts and it should be good to go? If so, mind adding me as a collaborator? I can't open a pull request at the moment apparently. Cheers!
from readwise-mirror.
Hi @1ncontinentia , you should be able to open a pull request. Have you forked the repository first? To create a pull request, you need to make the changes in your fork first, then submit a pull request from there.
And the changes will be a little more involved than just changing main.ts
; the field(s) have to be added both in readwiseApi.ts
for adding the new field types, then in main.ts
for displaying in the template.
So at a high level for example, if adding document_note
for example, that is a field on the Books response object. So, a new line could be added on line 44 in readwiseApi.ts
adding a type document_note: string
. Then, in main.ts
, the new field will be deconstructed from the books
response object (line 256) and added to the metadata variable so it's available for frontmatter.
Once that's working, then it can be added to the Frontmatter template. Ideally adjusting the headerTemplate
of DEFAULT_SETTINGS
to display the field (only when it exists, similar to the other fields)
Then, after all the changes are completed in your fork, build it and test the plugin with your Obsidian environment to make sure it all works as intended before submitting the pull request.
Happy to work with you to implement this change, but if it's too much no worries I'll put this on the roadmap for the future when I have spare time.
from readwise-mirror.
Ah gotcha! I think in that case it goes a bit above my head and I'd rather not mess things up. If you'd be happy to add to the roadmap that would be amazing! Thanks @jsonMartin
from readwise-mirror.
Sure, it's definitely possible to add new fields as long as they're exposed by Readwise's API. I double checked the API documents and see the new
document_note
field that you mentioned, but I don't see any field namedsummary
. You can see all of the available fields exposed by the API here: https://readwise.io/api_deets.
@jsonMartin, the summary
field is only present in the newer export
API endpoint. Wanting both in my Obsidian was a good incentive to write and propose #41.
from readwise-mirror.
@johannrichard ok, thank you for these pull requests! I will review soon ๐๐ผ
from readwise-mirror.
Related Issues (20)
- Add feature to sort highlights by page location, instead of timestamp HOT 1
- Templating engine
- Metadata sync HOT 1
- Ability to customize file name
- Edit already existed highlights HOT 1
- How does this compare to the readwise official now that it is out? HOT 1
- Filter out highlights that have been discarded in Readwise
- Modification request HOT 2
- Partial note sections HOT 2
- FR: Ability to slugify file names and remove emojis HOT 3
- Bug? Highlight Template does not export tags by default HOT 3
- Does Readwise Mirror support adding links to "View Highlight in Reader"? HOT 5
- Bug: Readwise Mirror generates a locationUrl even for non-books HOT 1
- Are these comments needed for the plugin to operate correctly? HOT 1
- Rate-limit requests when there are issues getting timeout length HOT 3
- Fix Filename Too Long Error
- Location HOT 2
- Google Play Books links point to Kindle app HOT 1
- Format for highlights is substantially different from the Readwise manual markdown export HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from readwise-mirror.