Last active 1627804090

flask app for easier windows setup scoop.alyssasmith.id.au

scoophelper.py Raw
1#!/usr/bin/env python3
2from flask import *
3
4app = Flask(__name__)
5
6@app.route("/")
7def index():
8 buckets = "\n".join(f"scoop bucket add {bucket}" for bucket in request.args.get("buckets","").split(",")) if "buckets" in request.args else ""
9 packages = "\n".join(f"scoop install {package}" for package in request.args.get("pkgs","").split(",")) if "pkgs" in request.args else ""
10 return f"""Set-ExecutionPolicy RemoteSigned -scope CurrentUser
11iwr -useb get.scoop.sh | iex
12scoop install git
13scoop update
14{buckets}
15{packages}
16"""