brotherton-erpnext/erpnext/docs/temp.py
2015-12-04 16:00:38 +05:30

11 lines
290 B
Python

import os, re
for basepath, folders, files in os.walk("."):
for f in files:
if f.endswith(".html") or f.endswith(".md"):
with open(os.path.join(basepath, f), "r") as c:
content = c.read()
for path in re.findall("""{{.?docs_base_url.?}}([^'"\)]*)""", content):
print path