mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +00:00
20 lines
388 B
Python
Executable File
20 lines
388 B
Python
Executable File
#!/usr/bin/env python
|
|
"""
|
|
Extract and print level 1 and 2 titles from workshop slides.
|
|
"""
|
|
|
|
separators = [
|
|
"---",
|
|
"--"
|
|
]
|
|
|
|
slide_count = 1
|
|
for line in open("index.html"):
|
|
line = line.strip()
|
|
if line in separators:
|
|
slide_count += 1
|
|
if line.startswith('# '):
|
|
print slide_count, '# #', line
|
|
elif line.startswith('# '):
|
|
print slide_count, line
|