This is a simple tracker that allows me to track my games, books, and other stuff.
The app can add games through Steam and update their progress.
The app is built using React.
- Clone the repository
- Run
npm install
to install the dependencies - Run
npx netlify dev
to start the app - Open
http://localhost:8888
in your browser
To import words from Kindle, you need to download the words from the Kindle Mate app.
- Right click over
vocabuary words -> Progress -> Learning
, then click onExport to file
- Save the file as
txt
inkindle-words.txt
folder - Run
npm run script
and follow the menu to select the proper option.
-
Run
npm run script
and follow the menu to select the proper option to:-
Get incomplete
-
Generate requests
The generated files will be saved as
[REQ_TYPE]_req_[BATCH_INDEX].jsonl
-
-
Now you can go to OpenAI and upload the files to generate the batches.
Download the results with format
[REQ_TYPE]_batch_[BATCH_INDEX].jsonl
-
Then you can run again
npm run script
and follow the menu to select the proper option to:-
Parse requests
-
Upload to database
-
To backup the data, you need to have Postgres 15.1 installed. To do so, you can run the following commands:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql-15 postgresql-client-15
If you have this error:
pg_dump: error: server version: 15.1 (Ubuntu 15.1-1.pgdg20.04+1); pg_dump version: 12.19 (Ubuntu 12.19-0ubuntu0.20.04.1)
pg_dump: error: aborting because of server version mismatch
You can run the following command:
export PATH=/usr/lib/postgresql/15/bin:$PATH
To backup the data, you can run npm run script
follow the menu to select the proper option.
To create a Prisma migration, you can run the following command:
npx prisma migrate dev --create-only --name [MIGRATION_NAME]
The you can edit the migration file in prisma/migrations/[TIMESTAMP]_[MIGRATION_NAME]/migration.sql
and run the following command:
npx prisma migrate dev
To change the generated Typescript file, run the following command:
npx prisma generate
To deploy the migration to the database, run the following command:
npx prisma migrate deploy
If you have this error:
- The migration `[name]` was modified after it was applied.
✔ We need to reset the "public" schema at "xxx"
Do you want to continue? All data will be lost.
You can run the following command:
# make a backup
npm run script #db:backup
# reset the database
npx prisma migrate reset
# deploy the migration
npm run script #db:restore