Updated readme and first time running
This commit is contained in:
parent
e372018a2c
commit
ba2138a1af
@ -23,6 +23,7 @@ A web application for organizing and tracking LEGO sets, parts, and minifigures.
|
||||
```bash
|
||||
git clone https://gitea.baerentsen.space/FrederikBaerentsen/LEGOOrganizer.git
|
||||
cd LEGOOrganizer
|
||||
mkdir static/{sets,instructions,parts}
|
||||
```
|
||||
|
||||
2. Create a `.env` file with your configuration:
|
||||
@ -31,6 +32,8 @@ REBRICKABLE_API_KEY=your_api_key_here
|
||||
DOMAIN_NAME=https://your.domain.com
|
||||
```
|
||||
|
||||
If using locally, set `DOMAIN_NAME` to `http://localhost:3333`.
|
||||
|
||||
3. Deploy with Docker Compose:
|
||||
```bash
|
||||
docker compose up -d
|
||||
|
10
app.py
10
app.py
@ -508,7 +508,15 @@ def generate_unique_set_unique():
|
||||
@app.route('/',methods=['GET','POST'])
|
||||
def index():
|
||||
set_list = []
|
||||
theme_file = np.loadtxt("themes.csv",delimiter=",",dtype="str")
|
||||
try:
|
||||
theme_file = np.loadtxt("themes.csv",delimiter=",",dtype="str")
|
||||
except: #First time running, no csvs.
|
||||
initialize_database()
|
||||
urls = ["themes","sets","colors"]
|
||||
for i in urls:
|
||||
download_and_unzip("https://cdn.rebrickable.com/media/downloads/"+i+".csv.gz")
|
||||
get_nil_images()
|
||||
return redirect('/create')
|
||||
|
||||
if request.method == 'GET':
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user