Simon Willison’s Weblog

Subscribe

February 2022

52 posts: 5 entries, 12 links, 2 quotes, 33 beats

Feb. 17, 2022

TIL Google OAuth for a CLI application — > :warning: The OOB flow described in this document has been [scheduled for deprecation](https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oo) by Google. See [issue #39](https://github.com/simonw/google-drive-to-sqlite/issues/39) for notes on how to replace it.
TIL Recursively fetching metadata for all files in a Google Drive folder — For [google-drive-to-sqlite](https://github.com/simonw/google-drive-to-sqlite) I wanted a mechanism to recursively return metadata on every file in a specified Goole Drive folder.

redbean (via) “redbean makes it possible to share web applications that run offline as a single-file αcτµαlly pδrταblε εxεcµταblε zip archive which contains your assets. All you need to do is download the redbean.com program below, change the filename to .zip, add your content in a zip editing tool, and then change the extension back to .com”.

redbean is implemented as a single C file with a dazzling array of clever tricks—most impressively, the single executable works on Linux, macOS, Windows and various BSDs!

It embeds Lua, and in June last year added SQLite too—so self-contained distributable web applications built with Redbean can now use Lua and SQLite for dynamic scripting. Performance sounds incredible: “redbean can serve 1 million+ gzip encoded responses per second on a cheap personal computer”.

# 6:01 am / c, lua, sqlite, redbean, cosmopolitan

Release google-drive-to-sqlite 0.1a1 — Create a SQLite database containing metadata from Google Drive
Release google-drive-to-sqlite 0.1a2 — Create a SQLite database containing metadata from Google Drive

Feb. 18, 2022

Release google-drive-to-sqlite 0.2a0 — Create a SQLite database containing metadata from Google Drive

Fullmoon (via) A “fast and minimalistic web framework” written in Lua, based on Redbean. The documentation for this is fantastic, and because it uses Redbean the development experience is to download the Redbean executable (which runs on every platform) and then drop your own Lua scripts into it using zip.

# 6:41 pm / lua, redbean, cosmopolitan

Feb. 19, 2022

Release google-drive-to-sqlite 0.3 — Create a SQLite database containing metadata from Google Drive

Feb. 20, 2022

Release google-drive-to-sqlite 0.4 — Create a SQLite database containing metadata from Google Drive

Google Drive to SQLite

Visit Google Drive to SQLite

I released a new tool this week: google-drive-to-sqlite. It’s a CLI utility for fetching metadata about files in your Google Drive and writing them to a local SQLite database.

[... 1,221 words]

Feb. 21, 2022

Release sqlite-diffable 0.2.1 — Tools for dumping/loading a SQLite database to diffable directory structure

[history] When I tried this in 1996 (via) “I removed the GIL back in 1996 from Python 1.4...” is the start of a fascinating (supportive) comment by Greg Stein on the promising nogil Python fork that Sam Gross has been putting together. Greg provides some historical context that I’d never heard before, relating to an embedded Python for Microsoft IIS.

# 10:43 pm / gil, history, python

Feb. 22, 2022

TIL Using curl to run GraphQL queries from the command line — I wanted to run a query against the GitHub GraphQL API using `curl` on the command line, while keeping the query itself as readable as possible. Here's the recipe I came up with (tested in both `bash` and `zsh`), with TOKEN replaced by my GitHub API personal access token:

Feb. 23, 2022

Support open source that you use by paying the maintainers to talk to your team

I think I’ve come up with a novel hack for the challenge of getting your company to financially support the open source projects that it uses: reach out to the maintainers and offer them generous speaking fees for remote talks to your engineering team.

[... 645 words]

Release datasette-redirect-forbidden 0.1 — Redirect forbidden requests to a login page

Feb. 26, 2022

Release datasette-render-markdown 2.1 — Datasette plugin for rendering Markdown

migra (via) This looks like a very handy tool to have around: run “migra postgresql:///a postgresql:///b” and it will detect and output the SQL alter statements needed to modify the first PostgreSQL database schema to match the second. It’s written in Python, running on top of SQLAlchemy.

# 11:23 pm / databases, migrations, postgresql

Feb. 27, 2022

Even then, what does “best” even mean? I think back then I used it a lot more just because I was writing for a food blog every day, and “best” gives you more clicks than “really good.” These days, I don’t really care about clicks, and so I very rarely say something is “best.” I generally go out of my way to say, “This is just what I felt like doing today.”

J. Kenji López-Alt

# 3:57 pm / cooking

Weeknotes: Datasette Tutorials

I published two new tutorials for Datasette this week, both focused at end-users of the web application.

[... 479 words]

Feb. 28, 2022

TIL Crawling Datasette with Datasette — I wanted to add the new tutorials on https://datasette.io/tutorials to the search index that is used by the https://datasette.io/-/beta search engine.
TIL Running the latest SQLite in Datasette using Homebrew — I made a pleasant discovery today: Homebrew are very quick to update to the latest SQLite release (here's [their formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/sqlite.rb)), and since [Datasette](https://datasette.io/) when installed via Homebrew uses that version, this means you can use `brew update sqlite` to ensure you are running the most recent SQLite version within Datasette.
TIL Installing Python on macOS with the official Python installer — I usually use Homebrew on macOS, but I decided to try using the official Python installer based on [this Twitter conversation](https://twitter.com/rtpg_/status/1498115527465914371).

2022 » February

MTWTFSS
 123456
78910111213
14151617181920
21222324252627
28