From 6e46b9913411682f3a3ec66f4d58886c1db8654b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 6 Jan 2022 10:01:35 -0800 Subject: [PATCH] Renamed ip to source in example code --- docs/cli.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index 6d687ec..0fe6669 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -948,10 +948,10 @@ With ``--lines``, instead of being passed a ``row`` dictionary your function wil You could convert it into structured data like so:: $ sqlite-utils insert logs.db loglines access.log --convert ' - type, ip, _, verb, path, _, status, _ = line.split() + type, source, _, verb, path, _, status, _ = line.split() return { "type": type, - "ip": ip, + "source": source, "verb": verb, "path": path, "status": status, @@ -960,7 +960,7 @@ You could convert it into structured data like so:: The resulting table would look like this: ====== =============== ====== ============================ ======== -type ip verb path status +type source verb path status ====== =============== ====== ============================ ======== INFO: 127.0.0.1:60581 GET / 200 INFO: 127.0.0.1:60581 GET /foo/-/static/app.css?cead5a 200