changeset 193:ef646bacfa99

Update examples.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Jul 2018 17:10:54 +0300
parents c0849f47e10f
children 05e2332070a7
files README.txt
diffstat 1 files changed, 31 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Mon Jul 09 16:47:03 2018 +0300
+++ b/README.txt	Mon Jul 09 17:10:54 2018 +0300
@@ -70,6 +70,8 @@
 
 --- --- --- --- --- --- --- --- --- ---
 
+Display all information about one file in "entry per row" format:
+
 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid
 Filename             : /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid
 Type                 : PSID
@@ -88,6 +90,8 @@
 
 --- --- --- --- --- --- --- --- --- ---
 
+Display in "parseable" INI-style format, with hexadecimal values:
+
 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid -p -x
 Filename=/misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid
 Type=PSID
@@ -106,13 +110,16 @@
 
 --- --- --- --- --- --- --- --- --- ---
 
+One-line format with "|" as field separator, and specify
+which fields to display:
+
 $ sidinfo -l \| -f type,ver,hash,name,author,copyright Anal_ogue.sid
 PSID|2.0|Anal'ogue|Søren Lund (Jeff)|1996 Jeff|6d5b7f0ff092e55abf27c37c8bc3fc64|
 
 --- --- --- --- --- --- --- --- --- ---
 
-By using the format string functionality you can
-control the output very specifically:
+By using the format string functionality you can control
+the output very specifically:
 
 $ sidinfo Anal_ogue.sid -F 'NAME="@name@"\nHASH=@hash@\n'
 NAME="Anal'ogue"
@@ -120,6 +127,14 @@
 
 --- --- --- --- --- --- --- --- --- ---
 
+You could, for example create SQL INSERT statements:
+
+$ sidinfo Anal_ogue.sid -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n"
+
+INSERT INTO sometable (filename,name,author) VALUES ('./Anal_ogue.sid', 'Anal\'ogue', 'Søren Lund (Jeff)', '1996 Jeff')
+
+--- --- --- --- --- --- --- --- --- ---
+
 Furthermore, you can use "printf"-style format specifiers for
 formatting each @field@, see this example:
 
@@ -130,3 +145,17 @@
 
 Many of the format specifiers are supported, but not all, and obviously only
 integer/string formats are supported.
+
+--- --- --- --- --- --- --- --- --- ---
+
+Since sidinfo v0.7.6 it is also possible to automatically scan
+and recurse directories via '-R' option, for example:
+
+$ sidinfo -R /misc/C64Music/*.sid
+
+The above ill start from /misc/C64Music/ and scan any accessible subdirectories
+for files that match "*.sid" pattern and handle them.
+
+Using previous example about SQL inserts:
+
+$ sidinfo /misc/C64Music/*.sid -R -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n"