Skip to content

Instantly share code, notes, and snippets.

View wooandy's full-sized avatar

Andy Woo wooandy

View GitHub Profile
@tomvon
tomvon / python-create-jekyll-post.py
Last active February 21, 2021 03:15
Create a default post for a Jekyll instance using Python, save it and open it in BBEdit.
import os
from datetime import datetime
import time
import slugify
#Generate timestamps for post id and date.
ts = time.time()
timeid = datetime.fromtimestamp(ts).strftime('%Y-%m-%d')
timestamp = datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')