Skip to content

Commit

Permalink
Modify script to pass project name in flask-starter-project
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince Roshan authored and Agent-Hellboy committed May 23, 2023
1 parent 429898d commit a7d77e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using
------

cd into the project directory, open the terminal and type
```flask-starter-project``` this will build a basic project with inbuilt auth for you
```flask-starter-project your-project-name``` this will build a basic project with inbuilt auth for you

just write core logic in libs and present your prototype

Expand Down
23 changes: 9 additions & 14 deletions script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@

import click

"""
#process_with_auth
need to copy extra files in templates and static
#process_without_auth
"""


@click.command()
def main():
@click.option("--name", help="Project name")
def main(name):
os.system("git init")
os.system("git clone https://github.com/princekrroshan01/flask-starter.git")
os.remove("flask-starter/script.py")
os.remove("flask-starter/setup.py")
os.remove("flask-starter/LICENSE")
os.remove("flask-starter/.gitignore")
os.remove("flask-starter/README.rst")
os.remove("flask-starter/requirements.txt")
shutil.rmtree('flask-starter/.github')
os.remove(f"{name}/script.py")
os.remove(f"{name}/setup.py")
os.remove(f"{name}/LICENSE")
os.remove(f"{name}/.gitignore")
os.remove(f"{name}/README.rst")
os.remove(f"{name}/requirements.txt")
shutil.rmtree(f"{name}/.github")


if __name__ == "__main__":
Expand Down

0 comments on commit a7d77e2

Please sign in to comment.