mirror of
https://github.com/flancian/garden.git
synced 2026-08-07 15:06:19 +00:00
trololol
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# Charles Stanhop
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Charles Stanhope
|
||||||
|
|
||||||
|
- A [[person]] on [[mastodon]]: https://social.coop/web/statuses/104959656532080052
|
||||||
|
|
||||||
|
|
||||||
|
[//begin]: # "Autogenerated link references for markdown compatibility"
|
||||||
|
[person]: person "person"
|
||||||
|
[//end]: # "Autogenerated link references"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Indieweb
|
||||||
|
|
||||||
|
- https://social.coop/web/statuses/104959656532080052
|
||||||
|
- https://indieweb.org/
|
||||||
|
- [[Offline Twitter]]: tweet about this.
|
||||||
|
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
import pathlib
|
||||||
|
import titlecase
|
||||||
|
|
||||||
|
for filename in pathlib.Path('.').glob('**/*.md'):
|
||||||
|
f = open(filename)
|
||||||
|
print('file: %s' % filename)
|
||||||
|
lines = f.readlines()
|
||||||
|
if lines:
|
||||||
|
if lines[0].startswith('#'):
|
||||||
|
print(filename, 'has a header')
|
||||||
|
else:
|
||||||
|
sanitized_filename = str(filename).replace('-', ' ')
|
||||||
|
sanitized_filename = sanitized_filename.replace('.md', '')
|
||||||
|
sanitized_filename = sanitized_filename.replace('journal/', '')
|
||||||
|
header = '# ' + titlecase.titlecase(sanitized_filename)
|
||||||
|
print('would add header:', header)
|
||||||
Reference in New Issue
Block a user