zadam / trilium-web-clipper Goto Github PK
View Code? Open in Web Editor NEWSave web clippings to Trilium Notes.
License: GNU General Public License v3.0
Save web clippings to Trilium Notes.
License: GNU General Public License v3.0
Hi
Is it possible to make it so that it also works on mobile FF?
I can installed it on Android FF but trying to save a web page throws Calling browser runtime failed.R efreshing might help
I am using latest zadam/trilium
docker image and web-clipper version 0.3.1.
I tried steps in #41 but still not able to login to server.
docker logs:
200 GET /api/health-check with 15 bytes took 1ms
POST /api/login/token returned 401 with response "Incorrect password"
Slow 401 POST /api/login/token with 18 bytes took 303ms
POST /api/login/token returned 401 with response "Incorrect password"
Slow 401 POST /api/login/token with 18 bytes took 131ms
Browser: Firefox 105.0.1 (64-bit) Windows 10
Web clipper version: 0.3.1
trilium server version: Latest image from dockerhub.
I forked the repo to make a few changes (e.g. adding keyboard shortcuts) and ran into some teething problems while getting a local build up and running. I got there in the end, but wanted to share my experiences and suggest adding a short development section to the readme to help others get started.
browser-polyfill.js
with its npm package; previously the compiled library was included. I assumed this was unintentional and just dropped in the updated library.sponge
, jq
, and the GNU date
utility (the iso-8601 option is not supported on MacOS). Of course, not an issue for anyone other than the project owner anyway... just including for the sake of completeness Thanks for all your hard work on Trilium and this extension! I have keyboard shortcuts working (shockingly simple to implement) and am planning to submit a PR if that's OK, though the default shortcuts need testing to make sure they're valid for other platforms.
I am using Trilium with docker instance. It means that I download Trilium from dockerhub and launch it with docker. It works. When I was using the "setup" page to set the password, it did not ask me to select a username. And I do not find the username in the "options" menu. So I think Trilium does not require a password.
I also want to use trilium-web-clipper with the Trilium instance. But I can not even log in to the system. trilium-web-clipper requires a username and password. But I only have the password.
How can I work it out? Is there any default username for Trilium, or Trilium does not need the username anymore?
If you are logged in to Mozilla sync the settings for the server from the clipper are synced. This isn't good as I use different settings on my win10 PC than I do on my Linux server where the trilium server is running.
I would like to use web-clipper savings in another folder (actually it saves in Journal folder). Is there a possibility to save it in another folder ( for example Inbox ) .
Eg. when trying to save this page. Code blocks are properly placed in <pre>
so it should work.
Hello,
first and foremost, I am absolutely astonished by the depth and feature richness Trilium offers. Incredible work, thank you!
For my use case I'd like to request the ability to pin links onto an image file. Eg if I have a world map, I'd like to put a pin (idealy with a customizable icon) onto country X, City Y or River Z. I can then click on said link and be lead to the appropriate entry. If this is already possible, I'm sorry, I seem to have missed that. If not this would be incredibly useful for a great many use-cases.
Cheers
Sir Motte
my server is running on port 8080. i can get to the login page on the browser. I enter the port in option and hit save. close options. click on the toolbar icon and click check and get "not found".
Just downloaded the server beta and the latest firefox extension. linux ubuntu desktop.
Does web clipper copy a web page verbatim? ie If clipping a web page that includes harmful javascript code, or ads, cookies, etc... and you view the clipped content through the trilium frontend, would you be at risk of any potential information leakage, or potentially executing harmful javascript code?
I see that when you import webpages to trilium you cannot edit them.
Whenever I try saving pages with the clipper on firefox I keep getting this error. I was able to save one page successfully, but now keep getting errors.
21:30:43.928 INFO POST /api/clipper/notes
21:30:43.931 INFO ERROR: Error executing transaction, executing rollback. Inner stack: Error: Note title must not be empty
at Object.createNewNote (/home/solidity/Programs/trilium-linux-x64-server/src/services/notes.js:105:15)
at async createNote (/home/solidity/Programs/trilium-linux-x64-server/src/routes/api/clipper.js:74:20)
at async /home/solidity/Programs/trilium-linux-x64-server/src/routes/routes.js:92:32
at async /home/solidity/Programs/trilium-linux-x64-server/src/services/sql.js:220:19
Outside stack: Error
at Object.transactional (/home/solidity/Programs/trilium-linux-x64-server/src/services/sql.js:211:23)
at /home/solidity/Programs/trilium-linux-x64-server/src/routes/routes.js:91:38
at /home/solidity/Programs/trilium-linux-x64-server/node_modules/cls-hooked/context.js:118:13
at Namespace.run (/home/solidity/Programs/trilium-linux-x64-server/node_modules/cls-hooked/context.js:97:5)
at Namespace.runAndReturn (/home/solidity/Programs/trilium-linux-x64-server/node_modules/cls-hooked/context.js:117:8)
at Object.init (/home/solidity/Programs/trilium-linux-x64-server/src/services/cls.js:5:28)
at /home/solidity/Programs/trilium-linux-x64-server/src/routes/routes.js:85:38
at Layer.handle [as handle_request] (/home/solidity/Programs/trilium-linux-x64-server/node_modules/express/lib/router/layer.js:95:5)
at next (/home/solidity/Programs/trilium-linux-x64-server/node_modules/express/lib/router/route.js:137:13)
at checkToken (/home/solidity/Programs/trilium-linux-x64-server/src/services/auth.js:67:9)
21:30:43.931 INFO Creating clipped note from https://www.cs.swarthmore.edu/~newhall/unixhelp/C_arrays.html
21:30:43.931 INFO ERROR: post /api/clipper/notes threw exception: Error: Note title must not be empty
at Object.createNewNote (/home/solidity/Programs/trilium-linux-x64-server/src/services/notes.js:105:15)
at async createNote (/home/solidity/Programs/trilium-linux-x64-server/src/routes/api/clipper.js:74:20)
at async /home/solidity/Programs/trilium-linux-x64-server/src/routes/routes.js:92:32
at async /home/solidity/Programs/trilium-linux-x64-server/src/services/sql.js:220:19
21:30:45.970 INFO POST /api/recent-notes
21:31:27.156 INFO GET /api/clipper/handshake
21:31:27.159 INFO GET /api/clipper/handshake rejected with 401 Not authorized
21:31:27.215 INFO GET /api/clipper/handshake
Recently, I set up the web clipper to work with the Trilium server instance. It seems the Link "Open Note in Trilium" from the "Save Selection to Trilium" is not working. The link in fact opens the Trilium web interface, but it does not navigate to the newly created note.
According to
trilium-web-clipper/background.js
Line 403 in 711e4f8
triliumServerUrl + '/#' + request.noteId
. However, the latter part with the noteId is apparently ignored by the web application.The web-clipper helps me a lot. I use it every day. However, the lack of support on Safari(macOS and iOS) has been bothering me, especially when I want to save web pages to Trilium on my iPad. Now, I have to transfer to Chrome from Safari on my MacBook.
Today, I found the 'safari-web-extension-converter' tool, which is developed by Apple officially, can convert the trilium-web-clipper(Chrome version) to a Safari extension with just several clicks, and it seems to work well on Safari (MacBook, Big Sur 11.2.1).
Also, Apple promises the support of safari extensions on iOS15 at recent WWDC. The converted extension may also work well on iOS. This can bring the excellent feature to the iOS platform, since we know Chrome does not support extensions on any mobile devices.
So it would be much appreciated if you could provide the Safari support, and perhaps, the converter may help.
The introduction of the tool can be found at https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari
An example
https://bartsolutions.github.io/2020/11/20/safari-extension/
There's already a way to save a link's url, so I think this feature should be pretty easy to add.
Get weird result in save whole page
with this link.
https://blog.csdn.net/YOULANSHENGMENG/article/details/124929480
(It's an article about kalman filter.)
Trilium does not show the content of the page, and keeps display another note I opened. Then the panel seem to be freezed. The content does not change even if I open some other normal note.
Also, The toc on the right side shows an image in it.
Currently we have the option to screenshot an area (great!). OneNote has an additional option to screenshot entire page - this makes a single .png screenshot of the entire page regardless of how long it is. This would be a lovely feature in Trilium.
When opening the main menu, it will be useful to see if the current page was already captured (with clippings or notes) in trilium.
--
Add a link in the main menu if there's a note (under the Inbox or under the special clipperInbox
note) that has a label pageUrl
with the same url as the current page. In that case show a link to view it on trilium.
I already worked on a PR for this, will link it asap
Trilium's Web Clipper works flawless, when it comes to clipping articles from the internet. Same goes for local html files.
However, when trying to clip a local html file with images (also stored locally) in it, nothing gets clipped, and this error turns up: Calling browser runtime failed. Refreshing page might help.
Page refresh in the browser makes no difference.
Changing the image source from relative to absolute path (starting with file:///F:/
etc.) does not solve the problem. Nor does removal of inline styles like style="width:16pt;height:16pt;"
from the image tags.
Images from pages on the internet get transferred like a charm. It would really be a step forward, if the same were the case for locally stored images.
Setup:
Windows 10 with local Trilium (no server).
Trilium 0.38.2.
Web Clipper: trilium_web_clipper-0.1.1-an+fx.xpi on Firefox.
Hello,
I've just recently setup a Trilium container on a random port 32768. I'm trying to set it up on the extension but it's coming up with:
Unknown error: Failed to fetch on docker instance
With or without port being specified it generates the same error. It's like it's not even reaching the server.
Don't know if it's intentional, but latest release misses built .xpi / .zip files
Only save screenshot (Ctrl+Shift+E) is working. All the rest are being intercepted by Firefox.
This would be a powerful bookmarking feature.
And awesome job with the clipper. I'm living in trilium these days and this can easily make me ditch Pocket for reading list!
If your server is listening on HTTPS, it doesn't look like you can connect to it as the web clipper attempts to connect to http://...
For example, attempting to clip zadam/trilium#257 results in:
Support for custom fonts · Issue #257 · zadam/trilium
Attach files to your comment Attach files by dragging & dropping, selecting or pasting them.
<octocat-spinner-32.gif>
Uploading your files… We don’t support that file type. with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. Attaching documents requires write permission to this repository. with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. We don’t support that file type. with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP. Yowza, that’s a big file with a file smaller than 10MB. This file is empty. with a file that’s not empty. This file is hidden. with another file. Something went really wrong, and we can’t process that file.
Saving a selection from the page via. the context menu works fine.
If you begin a clip by screenshot, you cannot cancel it. A non drag click will still make a note with no screenshot.
Improvements:
For some cases, I just want to save selected text to trillum, like ctrl+c , then ctrl+shift+v to paste the text to trilium.
When using the Save Link with a Note
i want to add some custom text while keeping the page title.
When adding some text to the textarea in Save Link with a Note
the page title is lost, the first line of the textarea is used as the note title, the rest as note content.
If the textarea is left empty, the note will have the page title as note title and an empty body.
Keep the behavior as is, but add a checkbox under the textarea to keep the page title as note title. In this way all the text in the textarea will be used as the note contet
I already worked on a PR for this, will link it asap
It would be nice to have an option in settings that when enabled, it would prompt()
in javascript for an attribute to add to the note each time you saved a note. I usually want to categorize my clippings and opening in trilium each time to add a single attribute makes it a bit more inefficient. Example using javascript's default prompt
var attr = prompt("Please enter the attribute you want to add to the note.");
If you try to save pages like Recipe the ingredient list gets fully ignored because the Readability probably decides that the length of it is too small to even consider to be valid content.
It would be nice if there was some kind override/option to add value to a specific class/word and all its children so they do get included in the save page macro.
Right now the only way to do it seems to add the class name to the positive
REGEXPS list by recompiling the whole plugin
trilium-web-clipper/trilium_server_facade.js
Lines 179 to 185 in a952c1b
Any exception is catched, and returns this message about "failing to contact trilium instance".
So any bug or issue is mistaken by the user as a network error.
A consequence of this is loosing potential people posting issues here, and making debug more difficult.
An easy way to access e
error should be easily viewable, in order to ease debugging and posting of issues.
I personally just has this kind of issue, and not being very aware of how javascript works, i'm not even capable of finding where the output of 'console.log()' is.
(i was trying to send a page to trilium from a specific site and it doesn't work, while still working on other sites)
The extension's popup inherits the font CSS from the current webpage. Maybe it should have its own CSS rules if that makes more sense. Often if the site's font is black or grey this makes the popup unreadable
I have web-clipper server defined. the server is behind a site with basic HTTP auth enabled. When I configure the server the first time it asks for the auth login/password. also a browser tab is open from the same site, but not trilium. when I click the check button I get not found. i open trilium in the browser, go to options, delete current set up, and re-enter. says already configured but accepts. click check and still not found
I've been asked to add Trilium Web Clipper to a Firefox add-on package set that I maintain. To do so I need to mark which license the package is under. Would you mind clarifying which license(s) applies to this repo?
Hi
I am using Firefox version of the extension with the desktop version Windows.'
(Firefox 110, Windows 11)
Saving the whole page seems to work so this is not a login or some other weird issue, it seems like it is not able to grab the selection.
The web clipper does not detect google docs' content properly. Would be nice if it did.
The ability to customize the shortcut keys would be very useful.
I just recently discovered the Firefox extension and I am very impressed! Great work!
Currently snips are saved to a Calendar node:
It would be nice to be able to configure a different destination for clips. My idea was to be able to specify a node like 'Inbox' where i could save clips and then file them away to different nodes at a later time.
I have xpi extension installed on Firefox and clicking 'Save Whole Page'. I get a pop-up dialog at the bottom of the screen. When I click the link and go to Trillium, I only get a small portion of text from the page. Am I doing something wrong?
For example, say I do a google search for 'nothing'. All I get is the top of the page.
The option to save selected text is only available in the right click menu, which can even be interrupted by sites. The shortcut is not working #35 . It would be best if it showed up as an option button while clicking extension button.
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.