Skip to content
Menu
Billy Fisher
  • Home
  • Talks
  • About Me
  • Resume
Billy Fisher

Start a New Project & Get the Command Line Interface Arguments

Posted on November 1, 2020November 1, 2020 by Billy

Start a new project in your IDE.

Add a new build.py file.

First thing we’ll need to be able to do is to be able to parse some args:

def get_cli_args():
    parser = argparse.ArgumentParser(description="""
    Download wordpress, populate key.config with new salts,
    and generate an easily configurable ElasticBeanstalk package for managing 
    multiple WordPress installs using a single rds, efs, and multiple Beanstalk 
    environment configs.
    """)
    parser.add_argument('-s', '--site-name',
                        type=str,
                        help='The site name to include in the output package file name ' + \
                        '(e.g. wordpress-x.x_efs_rds_[site-name]__xx.zip',
                        required=True)

    args = parser.parse_args()

    return args

Then call that:

if __name__ == '__main__':
    args = get_cli_args()

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

16 − = 7

Categories

  • Building the Elasticbeanstalk Source Bundle
  • Cloud Computing
  • Coding
  • Computing
  • Going Serverless on Wordpress for AWS
  • Uncategorized

This Site Hosted On

Amazon Web Services: ElasticBeanstalk, RDS, and EFS. Really enjoying just focusing in on the content and having ElasticBeanstalk, and the package build process, perform all of the LAMP and Wordpress updates, automatically. Using aws blueprint: aws_blueprint_ebs_wordpress_efs_rds

My Github Projects

  • api-gateway-custom-authorizers
  • async-http-client-gradle-scala
  • async-http-client-sbt-scala
  • aws-serverless-express
  • aws_api_gateway_http_proxy_redirect_rewrite
  • aws_blueprint_ebs_wordpress_efs_rds
  • aws_lambda_scala_ec2_reports
  • aws_serverless_application_model_python
  • bike-distributor-refactor
  • CRUDUsers
  • digital-ocean-jenkins-dev-environment
  • java-functional-tests
  • java9-hello-modules
  • kind-argo
  • nbbo
©2023 Billy Fisher | Theme: Wordly by SuperbThemes