Skip to content

Commit 24215ed

Browse files
committed
Generator
1 parent 04c66b6 commit 24215ed

File tree

6 files changed

+3626
-3565
lines changed

6 files changed

+3626
-3565
lines changed

chapters/_sidebar.MD

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
- [Home Page](/)
2+
- [01 introduction](/01-introduction.md)
3+
- [01 start project](/01-start-project.md)
4+
- [02 github fundamentals](/02-github-fundamentals.md)
5+
- [03 build github project](/03-build-github-project.md)
6+
- [04 commit message](/04-commit-message.md)
7+
- [05 create project documents](/05-create-project-documents.md)
8+
- [06 refactor project](/06-refactor-project.md)
9+
- [07 tdd with autotest](/07-tdd-with-autotest.md)
10+
- [08 github marketing](/08-github-marketing.md)
11+
- [09 maintain project](/09-maintain-project.md)
12+
- [10 git tools](/10-git-tools.md)
13+
- [11 analytics](/11-analytics.md)
14+
- [12 find github project](/12-find-github-project.md)
15+
- [13 read code](/13-read-code.md)
16+
- [14 streak your github](/14-streak-your-github.md)
17+
- [15 milestone](/15-milestone.md)
18+
- [16 find in github](/16-find-in-github.md)
19+
- [18 get star](/18-get-star.md)
20+
- [19 joke](/19-joke.md)
21+
- [999 faq](/999-faq.md)

chapters/generate.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#This file is for generating the _sidebar.MD
2+
import os
3+
4+
# Get the current directory
5+
current_dir = os.getcwd()
6+
7+
# List all files in the current directory
8+
files = os.listdir(current_dir)
9+
10+
# Filter out only the markdown files
11+
md_files = [file for file in files if file.endswith('.md')]
12+
13+
# Write the names of the markdown files
14+
with open('_sidebar.md', 'w') as sidebar_file:
15+
sidebar_file.write("- [Home Page](/)\n")
16+
for md_file in md_files:
17+
if md_file != "readme.md" and md_file != '_sidebar.md':
18+
sidebar_file.write("- [" + md_file.replace('-', ' ').replace('.md', '') + "](/" + md_file +")\n")
File renamed without changes.

0 commit comments

Comments
 (0)