Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
from ruamel import yaml
import sys
import os
import os.path
def valid(element_name):
return os.path.exists(f"elements/{element_name}")
/*
* compile with:
* valac -C poextract.vala
* gcc -shared `pkg-config --cflags --libs glib-2.0` -o libpoextract.so poextract.c
* and run with:
* LD_PRELOAD=./libpoextract.so:/usr/lib/preloadable_libintl.so <application>
*/
/* These functions are from preloadable_libintl.so */