Skip to content

Commit

Permalink
update from mac, 14.5
Browse files Browse the repository at this point in the history
  • Loading branch information
27rabbitlt committed May 14, 2024
1 parent 2e9ee46 commit ae717c1
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/posts/ALGO/Competitive_Contest/.order
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Connectivity - Strongly Connected Component.md
KMP.md
Minimize_The_Number_of_Swaps_to_Sort_List.md
Sieve of Euler.md
Sieve of Euler.md
Strongly Connected Component.md
3 changes: 2 additions & 1 deletion docs/posts/MATH/.order
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Linear_Algebra
AMC.md
AdvancedFormalLanguageTheory.md
TDA.md
AbstractAlgebra.md
AbstractAlgebra.md
Complexity
1 change: 1 addition & 0 deletions docs/posts/MATH/Complexity/.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ladner Theorem.md
10 changes: 3 additions & 7 deletions help_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@
def pjoin(*path_list):
return "/".join(path_list)

# get md files under this position, position has to be a Path
# get md files name under this position, position has to be a Path
def get_mdfiles(position):
files = position.glob('*.md')
files = [item.name for item in files]
return files
return [item.name for item in position.glob('*.md')]

# get directories under this position, postition has to be a Path
# ignore some names
dir_ignore = ["assets"]
def get_dirs(position):
dirs = [item for item in position.iterdir() if item.is_dir()]
dirs = [item.name for item in dirs if item.name not in dir_ignore]
return dirs
return [item.name for item in position.iterdir() if item.is_dir() and item.name not in dir_ignore]

# recursively list the file and generate mkdocs.yml
# you can set the order when order = 1
Expand Down
31 changes: 31 additions & 0 deletions helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import os
import yaml # pyyaml
from pathlib import Path
import sys
import typer

app = typer.Typer()

# A node corresponds to a folder or a file
class Node():
def __init__(self, name):
self.name = name
self.ismdfile = None
self.childs = []
self.order = None
self.visible = True

@app.callback(invoke_without_command=True)
def update():
print("Haha callback works")

@app.command()
def reorder(node_name: str):
print(node_name)

if __name__ == '__main__':
app()




6 changes: 4 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ nav:
- ALGO: posts/ALGO/index.md
- MST_survey: posts/ALGO/MST_survey.md
- Competitive_Contest:
- Connectivity - Strongly Connected Component: posts/ALGO/Competitive_Contest/Connectivity
- Strongly Connected Component.md
- KMP: posts/ALGO/Competitive_Contest/KMP.md
- Minimize_The_Number_of_Swaps_to_Sort_List: posts/ALGO/Competitive_Contest/Minimize_The_Number_of_Swaps_to_Sort_List.md
- Sieve of Euler: posts/ALGO/Competitive_Contest/Sieve of Euler.md
- Strongly Connected Component: posts/ALGO/Competitive_Contest/Strongly Connected
Component.md
- RandomizedIncrementalAlgo: posts/ALGO/RandomizedIncrementalAlgo.md
- CPP:
- CPP: posts/CPP/index.md
Expand All @@ -92,6 +92,8 @@ nav:
- AdvancedFormalLanguageTheory: posts/MATH/AdvancedFormalLanguageTheory.md
- TDA: posts/MATH/TDA.md
- AbstractAlgebra: posts/MATH/AbstractAlgebra.md
- Complexity:
- Ladner Theorem: posts/MATH/Complexity/Ladner Theorem.md
- MISC:
- working_setting: posts/MISC/working_setting.md
- latex_tips: posts/MISC/latex_tips.md
Expand Down

0 comments on commit ae717c1

Please sign in to comment.