Skip to content

Instantly share code, notes, and snippets.

View Lucas-C's full-sized avatar

Lucas Cimon Lucas-C

View GitHub Profile
# LibreOffice macro script
import uno
def changeFontsWithin(object_list, to_font, to_weight=None):
for i in range(object_list.getCount()):
shape = object_list.getByIndex(i)
the_type = shape.getShapeType()
assert(shape.supportsService(the_type))
if shape.supportsService('com.sun.star.drawing.TextProperties'):
if to_font:
@Lucas-C
Lucas-C / parse_ghost_backup.py
Last active March 22, 2019 18:34 — forked from lazypower/parse_ghost_backup.py
A quick and dirty data munger/parser for migrating from ghost to raw markdown - Tested with Ghost v0.11.8
#!/usr/bin/env python
import json
import os
import sys
import datetime
with open("old.json", "r") as f:
raw = f.read()