hcarter333 / ham-radio-freedom

0 stars 0 forks source link

Play with Tech Question Pool in Datasette #14

Open hcarter333 opened 1 year ago

hcarter333 commented 1 year ago

Load the tech question pool into a database to use for learning @simonw 's datasette

This is related to #13 . It's also related to working through the tutorial at

https://datasette.io/tutorials/data-analysis#exploring-data-with-datasette

and

https://sqlite-tutorial-pycon-2023.readthedocs.io/en/latest/datasette.html

Steps:

  1. Load tech question pool at jscript/tqs.js into a python file tqs.py
  2. Create methods for loading up a dictionary with the question data
  3. Write the existing qestion data into a sqlite .db file.
  4. Use datasette to play with the data and possibly add help links as in #13 using the datasette write plugin.
hcarter333 commented 1 year ago

Authenticating my way into my own Datasette instance wasn't as straightforward as I'd though. To be clear, the whole process is in fact straightforward, it's just not the process I though it would be. Once I was authenticated, I was immediately able to make changes to the ham_qs database from inside the datasette web interface.

hcarter333 commented 12 months ago

How to append text around SQL results.

hcarter333 commented 10 months ago

I never built a script that uses the contents of tech_tqs.py (and now general_tqs.py), so they have to be called from within a Python interpreter after issuing

from general_tqs import load_qs

hcarter333 commented 10 months ago

To install datasette on a Windows box, (mine at least), be sure to use

python -m pip

not

python pip

hcarter333 commented 10 months ago

The command to publish the datasette instance is

python -m datasette publish cloudrun ham_exam_general_question_pool.db --service=hamgeneralexampool