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

Feature request: The option to include highlights that cannot be displayed in the parsed results. #3

Closed
sitogi opened this issue Nov 29, 2022 · 2 comments · Fixed by #4
Labels
Type: Feature New Feature

Comments

@sitogi
Copy link

sitogi commented Nov 29, 2022

Description

I would like the option to include highlights that cannot be displayed in the analysis results.

Background

I believe the main use case for this tool is to transcribe Kindle highlights to a personal notes tool or similar so that they can be easily referenced from there.
With the current behavior of skipping highlights that cannot be displayed, I could not track which highlights were skipped, and ended up having to go to the "Notes and Highlights" page.

Even if we don't know the contents of the highlights, we would like to have an option to not skip content that cannot be displayed, because if we know the location, etc., we will be able to follow it from the transcribed memo tool.

@azu
Copy link
Owner

azu commented Nov 29, 2022

fixed in #4

I've supported empty highlight and added defaultHighlightMessage option to toMarkdown
It show "**CAN NOT SHOW THE HIGHLIGHT**" instead of empty string by default.

image

image

const { parsePage, toMarkdown } = await import('https://cdn.skypack.dev/kindle-highlight-to-markdown@1.2.0');
const result = parsePage(window); // JSON Object
const markdown = toMarkdown(result, { defaultHighlightMessage: "your message" }); // Markdown
copy(markdown);

@sitogi
Copy link
Author

sitogi commented Nov 29, 2022

Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants