mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
insert-files can now read from stdin, closes #127
This commit is contained in:
parent
710454d72a
commit
8fe1e6d1be
3 changed files with 47 additions and 8 deletions
|
|
@ -459,6 +459,14 @@ The full list of column definitions you can use is as follows:
|
|||
``size``
|
||||
The integer size of the file in bytes
|
||||
|
||||
You can insert data piped from standard input like this::
|
||||
|
||||
cat dog.jpg | sqlite-utils insert-files dogs.db pics - --name=dog.jpg
|
||||
|
||||
The ``-`` argument indicates data should be read from standard input. The string passed using the ``--name`` option will be used for the file name and path values.
|
||||
|
||||
When inserting data from standard input only the following column definitions are supported: ``name``, ``path``, ``content``, ``sha256``, ``md5`` and ``size``.
|
||||
|
||||
.. _cli_create_table:
|
||||
|
||||
Creating tables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue