Talk:ROM images: Difference between revisions
Jump to navigation
Jump to search
(Created page with "The wiki text for the table entries is a bit complex and repetitive. This bit of bash code generates an entry that can be pasted into the wiki. The "refdes" and "instrument" f...") |
m (Old info - updated for newer table layout) |
||
Line 6: | Line 6: | ||
#!/bin/bash | #!/bin/bash | ||
partnum=$1 | partnum=${1}.bin | ||
echo "| [[Media:${partnum} | echo "| [[Media:${partnum}|${partnum}]] ([[:File:${partnum}#filehistory|?]]) || $(crc32 ${partnum}) || [[InstrumentPage|Instrument Name]] || refdes || [[PartPage|Part Name]]" | ||
echo "|-" | echo "|-" | ||
</pre> | </pre> | ||
Line 18: | Line 18: | ||
Example output: | Example output: | ||
<pre> | <pre> | ||
| [[Media:160-9983-01.bin|160-9983-01.bin]] ([[:File:160-9983-01.bin#filehistory|?]]) || refdes || [[ | | [[Media:160-9983-01.bin|160-9983-01.bin]] ([[:File:160-9983-01.bin#filehistory|?]]) || b1cbac4d || [[instrument]] || refdes || [[PartPage|Part Name]] | ||
|- | |- | ||
</pre> | </pre> |
Latest revision as of 08:10, 22 May 2024
The wiki text for the table entries is a bit complex and repetitive. This bit of bash code generates an entry that can be pasted into the wiki. The "refdes" and "instrument" fields should be filled in, or replaced with question marks if they are unknown.
$ cat gen_romtable_entry
#!/bin/bash partnum=${1}.bin echo "| [[Media:${partnum}|${partnum}]] ([[:File:${partnum}#filehistory|?]]) || $(crc32 ${partnum}) || [[InstrumentPage|Instrument Name]] || refdes || [[PartPage|Part Name]]" echo "|-"
Usage example:
$ ./gen_romtable_entry 160-9983-01
Example output:
| [[Media:160-9983-01.bin|160-9983-01.bin]] ([[:File:160-9983-01.bin#filehistory|?]]) || b1cbac4d || [[instrument]] || refdes || [[PartPage|Part Name]] |-