···159159# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160#.idea/
161161162162-picalc/162162+# Server
163163+picalc/
164164+ver.txt
+3-1
src/server/app.py
···4040 except:
4141 piresult = "picalc/pi.txt wasn't found on this web server. Sorry!"
4242 if request.method == 'GET':
4343- return render_template('index.html', pi=piresult, name=name, email=email)
4343+ ver = open("ver.txt", "r")
4444+ version = ver.read()
4545+ return render_template('index.html', pi=piresult, name=name, email=email, version=version)
4446 else:
4547 return "Please use GET to access this page."
4648
+4-1
src/server/setup.py
···2222 print("Picalc not found, creating")
2323with open("picalc/pi.txt", "w") as pifile:
2424 pifile.write("No clients have connected yet. Become one of the first!")
2525- print("Created picalc/pi.txt successfully. Do NOT edit this file!")2525+ print("Created picalc/pi.txt successfully. Do NOT edit this file!")
2626+with open("ver.txt", "w") as versionfile:
2727+ versionfile.write("1.1")
2828+ print("Created version file. Server will not work without this!!!")
+1-1
src/server/templates/index.html
···2222 <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
2323</head>
2424<body>
2525- <h1>Pistrubuted 1.0</h1>
2525+ <h1>Pistrubuted {{ version }}</h1>
2626 <p>Pistrubuted is an open-source server & client to calculate Pi with distrubuted machines. Get started by downloading the client and connecting to this server.</p>
2727 <p>{{ pi }}</p>
2828 <hr>