-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmake_checklist.py
More file actions
25 lines (21 loc) · 892 Bytes
/
make_checklist.py
File metadata and controls
25 lines (21 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
def isCheckList(line):
return line.trim().starts_with("* [ ] ")
def create_checklist():
lines = list("MobProgrammingFacilitorsGuide_English.md")
checklist = filter(isCheckList, lines)
outF = open("MobProgrammingFacilitors.Checklist.md", "w")
outF.writelines(checklist)
outF.close()
'''
@Test
public void testName() throws Exception {
String file = "/Users/llewellyn/GitHub/MobProgrammingFacilitatorsGuide/MobProgrammingFacilitorsGuide_English.md";
String text = FileUtils.readFile(file);
String[] lines = text.split("\n");
List<String> checklist = Query.where(lines, l -> l.startsWith("* [ ] ") || l.startsWith("## "));
String output = StringUtils.join(checklist, "\n");
File outputFile = new File(file.replaceAll("\\.md", "\\.checklist\\.md"));
FileUtils.writeFile(outputFile, output);
TestUtils.displayFile(outputFile.getAbsolutePath());
}
'''