Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,17 @@
|
|
1 |
import os
|
2 |
from flask import Flask, send_from_directory
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
app = Flask(__name__)
|
9 |
|
@@ -13,4 +21,4 @@ def index():
|
|
13 |
return send_from_directory('.', 'index.html')
|
14 |
|
15 |
if __name__ == '__main__':
|
16 |
-
app.run(debug=True
|
|
|
1 |
import os
|
2 |
from flask import Flask, send_from_directory
|
3 |
|
4 |
+
# リポジトリのクローンを行う
|
5 |
+
def clone_repo():
|
6 |
+
# 現在のディレクトリに`index.html`が存在しない場合のみクローンする
|
7 |
+
if not os.path.exists('index.html'):
|
8 |
+
print("Cloning the repository...")
|
9 |
+
os.system("git clone https://github.com/ozh/cookieclicker.git .")
|
10 |
+
else:
|
11 |
+
print("Repository already cloned.")
|
12 |
+
|
13 |
+
# クローンを実行
|
14 |
+
clone_repo()
|
15 |
|
16 |
app = Flask(__name__)
|
17 |
|
|
|
21 |
return send_from_directory('.', 'index.html')
|
22 |
|
23 |
if __name__ == '__main__':
|
24 |
+
app.run(debug=True)
|