Skip to content

Instantly share code, notes, and snippets.

@oetiker
oetiker / 00 readme.md
Last active November 27, 2025 09:25
libreoffice as an external renderer for gitea

LibreOffice as an external renderer for gitea

NOTE that libreoffice is a huge software package and thus highly vulnerable. I would certainly not recommend this setup for a public gitea instance where arbitrary users can upload documents!

Gitea can use external renderers to transform any file into html and then display this html. This aproach is nice, but it tends to get into trouble when the file you want to display has graphically complex content.

Libreoffice can convert quite a lot of filetypes to html, but the results are not all that convincing when it comes to graphical content.

So we use a different aproach. Use libreoffice to convert the file to pdf and then use pdftocairo to turn the files to svg and combine the svgs into a html file for gitea to display.

@JunhongXu
JunhongXu / download.py
Last active May 12, 2024 15:24
A Python script downloading all ICLR and NIPS papers from openreview.net
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import requests
import os
def download_all_papers(base_url, save_dir, driver_path):
driver = webdriver.Chrome(driver_path)
@wildmichael
wildmichael / README.md
Created March 1, 2013 11:24
superscript test

This is some superscript text.