Skip to content

Instantly share code, notes, and snippets.

@shon
shon / noorm.py
Created November 25, 2019 11:14
NoORM | SQL Construction library
from dataclasses import dataclass
@dataclass
class Query:
db: object = None
def sql(self):
raise NotImplementedError
@shon
shon / TiptapY-oo.py
Last active January 16, 2020 12:09
TiptapY (Object Oriented) Approach
import json
from dataclasses import dataclass, field
from typing import List
from inspect import isclass
renderers = {}
@shon
shon / TiptapY.py
Created January 15, 2020 04:27
TiptapY - Simpler Approach
import json
def convert_any(node):
typ = node.get('type', '')
print('node type: ', typ)
if typ == 'doc':
out = convert_doc(node)
elif typ == 'paragraph':
out = convert_paragraph(node)
@shon
shon / data.json
Created January 15, 2020 06:55
For TiptapY testing
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Here is an example of simple formatted text"
}
@shon
shon / README.md
Last active September 21, 2025 08:45
Export Github / Markdown wiki to Outline (getoutline.com)

GitHub Wiki → Outline Exporter 🧠

This script migrates a local GitHub-style wiki folder (Markdown + images) into your Outline (getoutline.com) workspace using their internal API.

✨ Features

  • Uploads all .md files from a folder into Outline
  • Preserves relative image links (uploads them as attachments)
  • Rewrites internal links (e.g. [Intro](Start.md)) to new Outline URLs
  • Uses Home.md as the collection description