Skip to content
Projects

nil0x42/singlefile2trilium

View on GitHub

nil0x42/singlefile2trilium has 112 GitHub stars and 10 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-15 15:57 UTC. Last push 2022-05-26.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Save faithful copy of a web page in Trilium notes with SingleFile web extension :electric_plug:

Productivity

README.md

Original

singlefile2trilium

Save faithful copy of a web page as a Trilium note with SingleFile web extension.

twitter follow

How it Works

SingleFile web extension saves a faithful copy of the web page being rendered by your browser as a single HTML file. It's default location is ~/Downloads.

singlefile2trilium is composed of two scripts:

  1. singlefile2trilium-sender.py script continuously watches ~/Downloads directory for new html pages saved by SingleFile and sends them to trilium.
  2. singlefile2trilium-handler.js is a trilium custom request handler. It handles and converts data sent by singlefile2trilium-sender.py.

The handler wraps the html content into an html iframe, which is itself rendered by a render note.

Installation

Dependencies:

A) Configure singlefile2trilium-handler.js

  1. add the file to trilium as a JS Backend code note:
  2. set customRequestHandler label to singlefile2trilium:

B) Configure singlefile2trilium-sender.py

  1. copy the script somewhere on your computer.
  2. change BASEDIR & TRILIUM_URL vars in script according to your needs.
  3. configure your system to run the script at startup (as a daemon):
    user@desktop $ ./singlefile2trilium-sender.py
    

Usage

  1. Use SingleFile add-on in your browser to save a web page
  2. You have now a new Trilium note rendering faithfully the web page in your day note

Throubleshotting

  • Ensure trilium installed version is > 0.38
  • Here is a screenshot of my own singlefile config, may help if default options don't work: