mirror of
https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge.git
synced 2026-08-30 00:50:32 +08:00
Add language parameter for multi-language support
This commit is contained in:
@@ -34,6 +34,8 @@ def main():
|
|||||||
parser.add_argument("-i", "--include", nargs="+", help="Include file patterns (e.g. '*.py' '*.js'). Defaults to common code files if not specified.")
|
parser.add_argument("-i", "--include", nargs="+", help="Include file patterns (e.g. '*.py' '*.js'). Defaults to common code files if not specified.")
|
||||||
parser.add_argument("-e", "--exclude", nargs="+", help="Exclude file patterns (e.g. 'tests/*' 'docs/*'). Defaults to test/build directories if not specified.")
|
parser.add_argument("-e", "--exclude", nargs="+", help="Exclude file patterns (e.g. 'tests/*' 'docs/*'). Defaults to test/build directories if not specified.")
|
||||||
parser.add_argument("-s", "--max-size", type=int, default=100000, help="Maximum file size in bytes (default: 100000, about 100KB).")
|
parser.add_argument("-s", "--max-size", type=int, default=100000, help="Maximum file size in bytes (default: 100000, about 100KB).")
|
||||||
|
# Add language parameter for multi-language support
|
||||||
|
parser.add_argument("--language", default="english", help="Language for the generated tutorial (default: english)")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -57,6 +59,9 @@ def main():
|
|||||||
"exclude_patterns": set(args.exclude) if args.exclude else DEFAULT_EXCLUDE_PATTERNS,
|
"exclude_patterns": set(args.exclude) if args.exclude else DEFAULT_EXCLUDE_PATTERNS,
|
||||||
"max_file_size": args.max_size,
|
"max_file_size": args.max_size,
|
||||||
|
|
||||||
|
# Add language for multi-language support
|
||||||
|
"language": args.language,
|
||||||
|
|
||||||
# Outputs will be populated by the nodes
|
# Outputs will be populated by the nodes
|
||||||
"files": [],
|
"files": [],
|
||||||
"abstractions": [],
|
"abstractions": [],
|
||||||
@@ -66,7 +71,8 @@ def main():
|
|||||||
"final_output_dir": None
|
"final_output_dir": None
|
||||||
}
|
}
|
||||||
|
|
||||||
print(f"Starting tutorial generation for: {args.repo or args.dir}")
|
# Display starting message with repository/directory and language
|
||||||
|
print(f"Starting tutorial generation for: {args.repo or args.dir} in {args.language.capitalize()} language")
|
||||||
|
|
||||||
# Create the flow instance
|
# Create the flow instance
|
||||||
tutorial_flow = create_tutorial_flow()
|
tutorial_flow = create_tutorial_flow()
|
||||||
|
|||||||
Reference in New Issue
Block a user