metadata [ -n ] [ file... ]
metadata [ -c ] [ file... ]
metadata [ -n ] -e
The idea of the metadata command is to gather the (often poorly defined) meta data that is saved in a file (where the main focus are documentation/PDF files) and enrich the data with the real information of the file (as: title, subtitle, author, date, etc.) and save the data beside the original file without changing it.
The so gathered and enriched information can be used to quickly view the most important information by opening the *.meta file instead of the original file where the key information often has to be searched on several pages.
Furthermore it can be used to create reference files that can be used by other software or manually; currently available are: CSV, SQLITE3, BibTex/JabRef and 'Microsoft Word' bibliography XML files using the command metadata -e.
In addition to the saving of the *.meta file alongside to the original file, it is saved to a central repository for later retrieval.
The original file is identified by its SHA256 check sum.
If the *.meta files are defined to be opened by the metadata command a double-click on the *.meta file will later display the enriched meta data information. Because the displayed file is always primarily loaded from the repository, the data displayed is always up to date based on the latest editing (enrichment) of the meta information.
When later the same original file is located somewhere else (probably also having another file name) and the metadata command is used against the file using the 'Send To' mechanism, the previously saved meta data from the repository is displayed and also saved alongside the newly discovered file. This is possible due to the fact that if the file is identical it will also have the same SHA256 check sum.
The original file is not changed, the enriched meta data is therefore not written back to the original.
When pasted to a text editor the output width is adjusted to 80 characters.
If pasted to a HTML/Rich-Text mail (as Microsoft Outlook™) or a word processor (as Microsoft Word™) the information is pasted as a table.
When pasted to a text editor the output width is not adjusted.
If pasted to a HTML/Rich-Text mail (as Microsoft Outlook™) or a word processor (as Microsoft Word™) the information is pasted as a table.
The metadata command should be installed to the 'Send To' context menu in 'Microsoft™ Windows Explorer' for most convenient usage. To do so, invoke the config(1m) command and select the related option.
In addition the
config(1m)
command also registers
*.meta
files to be opened by the
metadata
command.
When the automatic registration is not successful
it is recommended to define that the
metadata
command should be used to open
*.meta
files in
'Microsoft™ Windows Explorer'
on double-click manually.
When using this option together with the file... option, the interactive editor to edit the meta data information is not started, but the data is still updated.
When using this option together with the -e option, the 'Press any key to continue ...' message at the end of the export does not show up.
This to enable batch- or scheduled processing.
If no file is specified, you are queried to select a file by a open file box dialog where you then can select one file to be processed.
If the performance stays unacceptable, you can increase the performance of resolving meta data of PDF files by setting the FASTPDFRESOLUTION=True setting in the metadata.cfg(4) file. The downside of doing this is, that you will get a bit less meta information, but the most important data is still present.
To create a full HTML bibliography file from *.meta files, use the tf filter command:
[ H:\data\projects\Apollo\documents ] [ neil@acme-007 ][*wtshell*/cmd]: lsw -r * | grep "\.meta$" | tf bib - > _BIBLIOGRAPHY.html
and to create a [REF] - only HTML bibliography:
[ H:\data\projects\Apollo\documents ] [ neil@acme-007 ][*wtshell*/cmd]: lsw -r * | grep "\.meta$" | tf bibref - > _REF.html
If you send a file that has currently no *.meta file and that is not known in the repository multiple times to the metadata command (what would happen if you get no response as described in the NOTES section and you think the command does not work) the last opened window will be the one whose data "survives"
Workaround: be patient on the first command call.
This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.