3 If you have not already done so, please edit the file `.taguette_gdocs` in this
4 directory. You must enter ever variable marked with "CHANGME." You only need to
7 In order to not commit your changes into git, you can run this command:
10 git update-index --assume-unchanged .taguette_gdocs
13 I also create a directory called `taguette_backups` and one called `exported_tags` like:
16 mkdir taguette_backups
20 ## Step 1: Backing things up
22 Do this every time before you run the script:
25 sudo systemctl stop taguette
26 BACKUP_FILE="taguette-snapshot-$(date +%Y%m%d-%H%M%S).sqlite3"
27 sudo cp /var/lib/taguette/taguette.sqlite3 "taguette_backups/$BACKUP_FILE"
28 cp "taguette_backups/$BACKUP_FILE" ./taguette-working.sqlite3
31 The first line shuts down Taguette. The second line just creates the backup
32 file name. The third and fourth lines will create a new backup file and copy the
33 backup file into the `./taguette-working.sqlite3`.
35 ### Step 2a: Import from Google Sheets into the database
37 If everything is setup well, you should just need to run:
40 python3 taguette-update_tags_from_sheet.py
43 Check for errors! If you don't see any, you will need to copy the database back
47 sudo cp ./taguette-working.sqlite3 /var/lib/taguette/taguette.sqlite3
48 sudo chown taguette:taguette /var/lib/taguette/taguette.sqlite3
51 ### Step 2b: Exporting from the database
53 Exporting tags should be as easy as:
56 python3 taguette-export_tags_to_csv.py
59 This will create a new file called `exported_tags.tsv` which you can manually
60 move into the spreadsheet.
62 ## Step 3: Restarting Taguette
64 Once everything looks good, go ahead and restart Taguette like:
67 sudo systemctl start taguette
70 You can check it with `systemctl status taguette` but keep in mind it takes