metadata
Package: WA2L/WinTools 1.2.08
Section: General Commands (1)
Updated: 25 April 2022
Index
Return to Main Contents
NAME
metadata - save/handle meta data of files
SYNOPSIS
WA2LWinTools/bin/metadata
[
-h
|
-i
|
-u
|
-V
]
metadata
[
-n
] [
file...
]
metadata
[
-c
] [
file...
]
metadata
[
-n
]
-e
AVAILABILITY
WA2L/WinTools
DESCRIPTION
save meta data of one or more file(s) to
*.meta
file(s) and a central data repository ("database").
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.
- NO key pressed:
-
As soon as the meta data editor is closed,
a short bibliography entry is available in the
clipboard for later pasting.
- LEFT CONTROL key pressed:
-
If you press the
LEFT CONTROL
key while closing the meta data editor all filled out
meta data fields from the
[GENERAL]
section are copied to the clipboard.
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.
- RIGHT CONTROL key pressed:
-
If you press the
RIGHT CONTROL SHIFT
key while closing the meta data editor all filled out
meta data fields from the
[GENERAL]
section are copied to the clipboard.
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.
- SHIFT key pressed:
-
If you press the
SHIFT
key while closing the meta data editor nothing is copied to
the clipboard, respectively the current content of the
clipboard is not replaced.
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.
OPTIONS
- -h
-
usage message.
- -i
-
install the
metadata
command as menu point
'metadata'
to the
'Send To'
context menu in
'Windows Explorer'.
- -u
-
uninstall the
metadata
shortcut from the
'Send To'
context menu in
'Windows Explorer'.
- -V
-
print program version.
- -e
-
export metadata repository to
*.csv, *.tab, *.sqlite3, *.bib BibTeX/JabRef, XML
files. The target directory is
var/metadata/
respectively the
DATABASEDIR
specified in the
metadata.cfg
file.
- -n
-
non interactive mode.
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.
- -c
-
output of computed metadata to stdout.
- file...
-
list of
files to save the meta data to
*.meta
.
When installed in the
'Send To'
menu the selected file(s) in
'Windows Explorer'
are passed as a list of files to the
metadata
command and the meta data of all given files are saved to separate
*.meta
files.
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.
ENVIRONMENT
-
EXIT STATUS
- 0
-
no error.
- 4
-
usage message displayed.
- 5
-
program version printed.
- 6
-
export was not successful due to locked output
files.
FILES
- etc/metadata.cfg
-
optional configuration file for
metadata.
See:
metadata.cfg(4)
for more information.
- etc/metadata.suffix.meta
-
optional adjusted template for file type with suffix
suffix.
See
metadata.template(4)
for more information.
- etc/metadata.default.meta
-
optional adjusted default template.
See
metadata.template(4)
for more information.
- lib/metadata.default.meta
-
default template to save the resolved
meta data.
- etc/metadata.type.bib
-
optional adjusted BibTeX template for document-type with name
type.
See
metadata.bib(4)
for more information.
- etc/metadata.default.bib
-
optional adjusted default BibTeX template.
See
metadata.bib(4)
for more information.
- lib/metadata.type.bib
-
default BibTeX template for document-type with name
type.
- lib/metadata.default.bib
-
default BibTeX template when no other template matched to
the type.
- var/db/metadata/<DB-VERSION>/<SHA-FILE-KEY>/meta
-
centrally saved meta data information.
The location
(var/db/metadata/)
of the meta data "database" can be changed using the
DATABASEDIR=directory
setting in
metadata.cfg
file.
- path/filename.ext.meta
-
meta data file of the file
path/filename.ext
- path/.meta/
-
if the
.meta
directory exists (has to be created manually) beside the file
path/filename.ext
, the
filename.ext.meta
file is saved to this subdirectory.
- path/.meta/filename.ext.meta
-
meta data file of the file
path/filename.ext
if the
.meta
directory exists.
EXAMPLES
-
SEE ALSO
wintoolsintro(1),
bib2xml.xml(4),
bibliography(1),
config(1m),
dirinfo(1),
grep(1),
lsw(1),
metadata.cfg(4),
metadata.bib(4),
metadata.template(4),
sqlite3(3),
sqlite-gui(1),
tf(1),
vcp(1)
NOTES
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
bibliography(1)
command.
BUGS
Currently there is no locking mechanism in place.
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.
the
last opened window will be the one whose data "survives".
AUTHOR
metadata was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2022
Christian Walther
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.
This document was created by man2html
using the manual pages.
Time: 16:32:23 GMT, September 14, 2024