-
Notifications
You must be signed in to change notification settings - Fork 9
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
"Extract" Button stays red and unclickable #362
Comments
+1, in my vault and in Sandbox: My Vault
Sandbox (same behavior):
|
+1 i have the same issue on windows 11 and Macos :/ |
Same, I've even tried opening a backup copy of the sqlite database that's on my laptop. |
Please try to fix this!!!! I really enjoy this plugin |
I fixed the main.js file. Change this: this.inputFileEl.addEventListener("change", (ev) => {
const file = ev.target.files[0];
if (!file) {
console.error("No file selected");
return;
}
// Convert File to ArrayBuffer
const reader = new FileReader();
reader.onload = () => {
this.fileBuffer = reader.result; // Store the ArrayBuffer
this.goButtonEl.disabled = false;
this.goButtonEl.setAttr("style", "background-color: green; color: black");
new import_obsidian2.Notice("Ready to extract!");
};
reader.onerror = (error) => {
console.error("FileReader error:", error);
new import_obsidian2.Notice("Error reading file");
};
reader.readAsArrayBuffer(file);
}); And: fetchHighlights() {
return __async(this, null, function* () {
if (!this.fileBuffer) {
throw new Error("No file buffer available...");
}
const SQLEngine = yield (0, import_sql.default)({
wasmBinary: binary
});
// Use the buffer directly instead of reading from file
const db = new SQLEngine.Database(new Uint8Array(this.fileBuffer));
const service = new HighlightService(
new Repository(db)
);
// Rest of the function remains the same...
});
} |
Thanks @FrnklyN but would you mind to share a main.js file with the changes included? Thanks! |
i found a workaround with koreader https://koreader.rocks/ I install this on my Kobo, and now I can export my note in Markdown 🎉 |
I am also unable to extract. Whether its the .sqlite file on the device or offloaded into my desktop, the extraction button doesn't change and remains locked. Unfortunately I am not code Savvy and have no idea what needs to be replaced in the Main.js file via @FrnklyN's find/fix |
This worked like a charm! Thanks, @FrnklyN!
|
Please! Can you copy/paste here he complete code of the main.js file so I can replicate on mine??? |
I have the same issue on Obsidian 1.7.7 AppImage version for Linux. The issue persist in the Sandbox Vault, so it isn't a plugin conflict issue. |
@FrnklyN fix works, but on the output markdown files I get a lot of unnecessary commented text surrounding each extracted quote (see below for an example). Haven't used the plugin before, so I can't say if this is quirk was already present in it or if it is introduced by the fix.
|
@danicotillas I'm not coding-literate either, but I managed to copy-paste the code fix successfully by opening and editing the main.js file with VS Code. Hope this helps! |
Hi! Me neither and I copy/paste the code and I didn't succeed. Can you share with me the main.js file please? |
@danicotillas I'm not sure how I can share a .js file through here, this file type isn't supported to be added as an attachment. What's exactly your issue during copy-pasting? Are you able to find the lines of code you need to change by using the search function of VS Code (ctrl+F)? Searching You then need to copy-paste the provided code so that it looks exactly like in the images I attach (the highlighted text is exactly what I copy-pasted). Use the code lines just before and after as a reference point, they should remain the same after you make the changes. Pay special attention to the indentation of all the code lines, make sure they're as shown. Save the file and you should be good to go. Hope this helps! |
At last!!! Thank you!!! I don't know what I was copying/pasting wrongly, maybe something about the indentation. Thanks again |
You're welcome, glad it worked! I'm guessing the issue could be that in your previous copy-paste you also included the last 3-4 lines with extra brackets from the second code fix:
I think those were added by FrnklyN just for convention and reference, but aren't meant to be copy-pasted as the rest of the code because they will mess up the syntax of the function. |
Hi there,
When I click "choose file" and select "koboreader.sqlite", the "extract" button remains red and I can't click it. Is there something in the settings I need to adjust first?
Thanks!
The text was updated successfully, but these errors were encountered: