Mercurial > hg > sidinfo
comparison README.txt @ 193:ef646bacfa99
Update examples.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 09 Jul 2018 17:10:54 +0300 |
parents | da2fbfe18c60 |
children | 05e2332070a7 |
comparison
equal
deleted
inserted
replaced
192:c0849f47e10f | 193:ef646bacfa99 |
---|---|
68 ===== | 68 ===== |
69 For more information about options, see 'sidinfo --help'. | 69 For more information about options, see 'sidinfo --help'. |
70 | 70 |
71 --- --- --- --- --- --- --- --- --- --- | 71 --- --- --- --- --- --- --- --- --- --- |
72 | 72 |
73 Display all information about one file in "entry per row" format: | |
74 | |
73 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid | 75 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
74 Filename : /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid | 76 Filename : /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
75 Type : PSID | 77 Type : PSID |
76 Version : 2.0 | 78 Version : 2.0 |
77 Data offset : 124 | 79 Data offset : 124 |
85 Author : Søren Lund (Jeff) | 87 Author : Søren Lund (Jeff) |
86 Copyright : 1996 Jeff | 88 Copyright : 1996 Jeff |
87 Hash : 6d5b7f0ff092e55abf27c37c8bc3fc64 | 89 Hash : 6d5b7f0ff092e55abf27c37c8bc3fc64 |
88 | 90 |
89 --- --- --- --- --- --- --- --- --- --- | 91 --- --- --- --- --- --- --- --- --- --- |
92 | |
93 Display in "parseable" INI-style format, with hexadecimal values: | |
90 | 94 |
91 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid -p -x | 95 $ sidinfo /misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid -p -x |
92 Filename=/misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid | 96 Filename=/misc/C64Music/MUSICIANS/J/Jeff/Anal_ogue.sid |
93 Type=PSID | 97 Type=PSID |
94 Version=2.0 | 98 Version=2.0 |
104 Copyright=1996 Jeff | 108 Copyright=1996 Jeff |
105 Hash=6d5b7f0ff092e55abf27c37c8bc3fc64 | 109 Hash=6d5b7f0ff092e55abf27c37c8bc3fc64 |
106 | 110 |
107 --- --- --- --- --- --- --- --- --- --- | 111 --- --- --- --- --- --- --- --- --- --- |
108 | 112 |
113 One-line format with "|" as field separator, and specify | |
114 which fields to display: | |
115 | |
109 $ sidinfo -l \| -f type,ver,hash,name,author,copyright Anal_ogue.sid | 116 $ sidinfo -l \| -f type,ver,hash,name,author,copyright Anal_ogue.sid |
110 PSID|2.0|Anal'ogue|Søren Lund (Jeff)|1996 Jeff|6d5b7f0ff092e55abf27c37c8bc3fc64| | 117 PSID|2.0|Anal'ogue|Søren Lund (Jeff)|1996 Jeff|6d5b7f0ff092e55abf27c37c8bc3fc64| |
111 | 118 |
112 --- --- --- --- --- --- --- --- --- --- | 119 --- --- --- --- --- --- --- --- --- --- |
113 | 120 |
114 By using the format string functionality you can | 121 By using the format string functionality you can control |
115 control the output very specifically: | 122 the output very specifically: |
116 | 123 |
117 $ sidinfo Anal_ogue.sid -F 'NAME="@name@"\nHASH=@hash@\n' | 124 $ sidinfo Anal_ogue.sid -F 'NAME="@name@"\nHASH=@hash@\n' |
118 NAME="Anal'ogue" | 125 NAME="Anal'ogue" |
119 HASH=6d5b7f0ff092e55abf27c37c8bc3fc64 | 126 HASH=6d5b7f0ff092e55abf27c37c8bc3fc64 |
127 | |
128 --- --- --- --- --- --- --- --- --- --- | |
129 | |
130 You could, for example create SQL INSERT statements: | |
131 | |
132 $ sidinfo Anal_ogue.sid -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n" | |
133 | |
134 INSERT INTO sometable (filename,name,author) VALUES ('./Anal_ogue.sid', 'Anal\'ogue', 'Søren Lund (Jeff)', '1996 Jeff') | |
120 | 135 |
121 --- --- --- --- --- --- --- --- --- --- | 136 --- --- --- --- --- --- --- --- --- --- |
122 | 137 |
123 Furthermore, you can use "printf"-style format specifiers for | 138 Furthermore, you can use "printf"-style format specifiers for |
124 formatting each @field@, see this example: | 139 formatting each @field@, see this example: |
128 HASH=" 6d5b7f0ff092e55abf27c37c8bc3fc64" | 143 HASH=" 6d5b7f0ff092e55abf27c37c8bc3fc64" |
129 LOAD_ADDR=$0fb0 | 144 LOAD_ADDR=$0fb0 |
130 | 145 |
131 Many of the format specifiers are supported, but not all, and obviously only | 146 Many of the format specifiers are supported, but not all, and obviously only |
132 integer/string formats are supported. | 147 integer/string formats are supported. |
148 | |
149 --- --- --- --- --- --- --- --- --- --- | |
150 | |
151 Since sidinfo v0.7.6 it is also possible to automatically scan | |
152 and recurse directories via '-R' option, for example: | |
153 | |
154 $ sidinfo -R /misc/C64Music/*.sid | |
155 | |
156 The above ill start from /misc/C64Music/ and scan any accessible subdirectories | |
157 for files that match "*.sid" pattern and handle them. | |
158 | |
159 Using previous example about SQL inserts: | |
160 | |
161 $ sidinfo /misc/C64Music/*.sid -R -e\' -F "INSERT INTO sometable (filename,name,author) VALUES ('@filename@', '@name@', '@author@', '@copyright@')\n" |