Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

None
TIL Extracting objects recursively with jq — The Algolia-powered Hacker News API returns nested comment threads that look like this: https://hn.algolia.com/api/v1/items/27941108
Release sqlite-transform 1.2 — Tool for running transformations on columns in a SQLite database
Release sqlite-utils 3.13 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-transform 1.1 — Tool for running transformations on columns in a SQLite database
Release sqlite-transform 1.0 — Tool for running transformations on columns in a SQLite database
None
TIL Using the tesseract CLI tool — Tesseract OCR has a command-line utility which is woefully under-documented. Thanks to [Alexandru Nedelcu](https://alexn.org/blog/2020/11/11/organize-index-screenshots-ocr-macos.html) I figured out how to use it today.
Release datasette-export-notebook 1.0 — Datasette plugin providing instructions for exporting data to Jupyter or Observable
Release datasette-graphql 1.5 — Datasette plugin providing an automatic GraphQL API for your SQLite databases
Release datasette 0.58.1 — An open source multi-tool for exploring and publishing data
Release datasette 0.58 — An open source multi-tool for exploring and publishing data
None
TIL Importing CSV data into SQLite with .import — I usually use my `sqlite-utils insert blah.db tablename file.csv --csv` command to import CSV data into SQLite, but for large CSV files (like a 750MB one) this can take quite a long time - over half an hour in this case.
Release conditional-get 0.3 — CLI tool for fetching data using HTTP conditional get
None
TIL Using nginx to proxy to a Unix domain socket — I figured this out while adding `--uds` support to Datasette in [#1388](https://github.com/simonw/datasette/issues/1388). Save the following in `nginx.conf`:
None
TIL Using pysqlite3 on macOS — While trying to use [pysqlite3](https://github.com/coleifer/pysqlite3) on macOS I got the following error:
None
TIL Increasing the time limit for a Google Cloud Scheduler task — In [VIAL issue 724](https://github.com/CAVaccineInventory/vial/issues/724) a Cloud Scheduler job which triggered a Cloud Run hosted export script - by sending an HTTP POST to an endpoint - was returning an error. The logs showed the error happened exactly three minutes after the task started executing.
None
TIL Preventing double form submissions with JavaScript — I needed this for [VIAL issue 722](https://github.com/CAVaccineInventory/vial/issues/722). I decided to disable form submissions for two seconds after they are submitted, to protect against accidental double submissions without risk of unexpected issues that could cause the form to be permanently disabled even though it should still be able to submit it.
None
TIL Installing different PostgreSQL server versions in GitHub Actions — The GitHub Actions `ubuntu-latest` default runner currently includes an installation of PostgreSQL 13. The server is not running by default but you can interact with it like this:
Release django-sql-dashboard 1.0.1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 1.0 — Django app for building dashboards using raw SQL queries
  • New db.query(sql, params) method, which executes a SQL query and returns the results as an iterator over Python dictionaries. (#290)
  • This project now uses flake8 and has started to use mypy. (#291)
  • New documentation on contributing to this project. (#292)
Release datasette 0.58a1 — An open source multi-tool for exploring and publishing data
Release asgi-csrf 0.9 — ASGI middleware for protecting against CSRF attacks
None
TIL Scraping Reddit via their JSON API — Reddit have long had an unofficial (I think) API where you can add `.json` to the end of any URL to get back the data for that page as JSON.
Release sqlite-utils 3.11 — Python CLI utility and library for manipulating SQLite databases
None
TIL Mouse support in vim — Today I learned that if you hit `Esc` in vim and then type `:set mouse=a` and hit enter... vim grows mouse support! In your terminal!
Release sqlite-utils 3.10 — Python CLI utility and library for manipulating SQLite databases
Release dogsheep-beta 0.10.2 — Build a search index across content from multiple SQLite database tables and run faceted searches against it using Datasette
Release yaml-to-sqlite 1.0 — Utility for converting YAML files to SQLite
Release markdown-to-sqlite 1.0 — CLI tool for loading markdown files into a SQLite database
Release sqlite-utils 3.9.1 — Python CLI utility and library for manipulating SQLite databases