diff --git a/lookup b/lookup index 3c7b7a6..b17792b 100755 --- a/lookup +++ b/lookup @@ -12,13 +12,12 @@ if [[ $1 == "-h" || $1 == "--help" ]]; then # Lookup a user. elif [[ $1 == "user" ]]; then - firefox https://github.com/$2 + firefox "https://github.com/search?q=$2&type=users" # Lookup a repo. elif [[ $1 == "repo" ]]; then - # TODO need to implement. - firefox https://github.com/$2 + firefox "https://github.com/search?q=$2&type=repositories" # Catch any invalid input. else diff --git a/newproject b/newproject index 2f3ea74..8ebebbe 100755 --- a/newproject +++ b/newproject @@ -8,7 +8,7 @@ # quaxlyqueen/scripts/ginit # Supported languages. -TYPES=("c", "c-sharp", "java", "js", "go") +TYPES=("c", "c-sharp", "java", "js", "python", "go") # Catch case where there are too many arguments. if [[ $# -gt 3 ]]; then @@ -84,7 +84,6 @@ else fi fi - # Create a new C project. if [[ $LANG == "c" ]]; then cp -r ~/templates/c ./$NAME # Copy the template C file. @@ -114,12 +113,22 @@ elif [[ $LANG == "html" ]]; then cd public_html; mark; # Bookmark new project. +# Create a new JavaScript project. elif [[ $LANG == "js" ]]; then mkdir $NAME; cd $NAME; touch main.js; mark; # Bookmark new project. + +# Create a new Python project. +elif [[ $LANG == "python" ]]; then + mkdir $NAME; + cd $NAME; + + touch main.py; + echo "print(\"hello world!\")" >> main.py; + mark; fi # If the user indicated the project will be a Git project, then run the ginit script. diff --git a/run b/run index 8d1a634..1976855 100755 --- a/run +++ b/run @@ -1,7 +1,7 @@ #!/bin/zsh # Supported languages. -TYPES=("c", "cs", "java", "js", "go") +TYPES=("c", "cs", "java", "js", "python", "go") # Catch case where there are too many arguments. if [[ $# -gt 1 ]]; then @@ -119,6 +119,12 @@ elif [[ $TYPE == "js" ]]; then echo "Output..." node $NAME.js +# Run Python app. +elif [[ $TYPE == "py" ]]; then + clear + echo "Running..." + python $FILE.py + # Run Golang app. elif [[ $TYPE == "go" ]]; then clear