Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (13 sloc) 0.514 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import re

# this could probably be hacked together from grep and sed, but as we're using python for other things
# we can assume that we have a python installation available.

# (additionally we could generate markers to inject changes made on the Wiki back into the source file)

re_comment = re.compile(r"\s*//\?\s?(.*)")

f = open("gcode_process.c", "rt")
doc = open("gcode_doc.txt", "wt")
for line in f.readlines():
    m = re_comment.match(line)
    if m:
doc.write(m.group(1) + "\n")
f.close()
doc.close()
Something went wrong with that request. Please try again.