diff --git a/utils.hy b/utils.hy new file mode 100644 index 0000000..2b248f9 --- /dev/null +++ b/utils.hy @@ -0,0 +1,23 @@ +#!/usr/bin/env hy +(import requests) + +(import sys) +(import os) +(import json) +(import getopt) +(import re) +(import random) +(import datetime [datetime]) + + +(defn get-post-files [] + (setv markdown-files []) + + (for [[root dirs files] (os.walk "source") + -file files] + (let [file (os.path.join root -file)] + (when (and (in "posts" file) (file.endswith ".md")) + (markdown-files.append file)))) + (print markdown-files)) + +(get-post-files)