Skip to content

New LARC

Generate coverings file for new LARC

Excel and csv

If a new LARC is provided by the ITTF download PDF and export the Excel file.

The Excel file does not contain all data of the online list or PDF, but until things get better, this is what we have to work with.

I have my own ID for LARCs: <larcid> = LARC_<year>_<version of year>.xyz. The ID is used in naming LARC files: LARC_<larcid>.ext Examples:

  • LARC_2020-2.pdf
  • LARC_2021-1.pdf
  • LARC_2021-2.pdf
  • LARC_2021-3.pdf
  • LARC_2022-1.pdf
  • ...

See all LARCs so far: LARC-Archive

Download PDF and Excel export to:

  • data/ittf/pdf
  • data/ittf/xslx

Fill the Excel file with the missing information. It misses the "expires on" information of the online list. Create a new column "custom-expires-on" and fill in the data manually.

Now export the Excel as csv into:

  • data/ittf/csv/LARC_<larcid>.csv
  • utf-8
  • separator: colon = ","
  • strings enclosed in ""
  • quote all text cells

JSON files

Add the LARC data into

  • data/basics/larcs.json

Generate coverings file

Run the script:

$> cd data
$> ./1_coverings_csv2json.sh

If there is a Brand '...' not found ... message, add the missing brand to data/basics/types/brands.json

Now the coverings file should have been created or updated:

  • data/basics/coverings/coverings_<larcid>.json

Update metadata

Update the metadata file:

  • data/basics/meta.json

Generate database

$> cd data
$> ./2_create_database.sh

Now the database file should have been created or updated:

  • data/database/database.json

Generate API database

This step generates the API database, which contains several redundancies in order to ease the creation of the different files.

$> cd data
$> ./3_create_api_database.sh

Now the database file should have been created or updated:

  • api/database/database.json

SQL database for Hasura

Generate SQL database

This step generates the SQL database for Hasura that is used in the next step.

$> cd sql-database
$> ./1_generate_sql.sh

Now the database file should have been created or updated:

  • sql-database/generated/sql-database.sql

Upload data to Hasura

Possible data loss

Existing data in the database will be deleted and generated data newly inserted. This should not be a problem, as the data should not be modified but check just to be sure.

  1. https://cloud.hasura.io/
  2. Login (with E-Mail and password or otherwise)
  3. "Launch Console" for project
  4. select "SQL"
  5. insert generated SQL, check "Track this" and then "Run!"
  6. be patient, this may take a while to process

if data structure was changed, adapt GraphSQL queries accordingly

Not ready!

not ready from here, please ignore...

Generate API files

$> cd api
$> ./1_generate_api.sh

Upload API files

Generate PDF

Use LibreOffice Writer.

Scripts: ~/.config/libreoffice/4/user/Scripts/python

  • color values: open Writer, format color of text, then Extras -> Deveopler Tools, look for color property (CharBackColor or CharColor)

API reference