EXTRACT(1)

๐Ÿ’– extract(1) โ€” the girlies' guide to peeking at your files ๐Ÿ’–

okay so. bestie. this is extract, from section 1 of the General Commands Manual. she's a whole icon. and this page? documents version 1.0.0 of the extract command, no cap. ๐ŸŽ€


โœจ NAME โœจ

extract โ€” figure out meta-information about a file ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

extract [ -bgihLmnvV ] [ -l library ] [ -p type ] [ -x type ] file ...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea โ˜• โ€” extract takes every file you hand it in the argument list and tests it, trying to infer meta-information from it. like, it's snooping, but consensually. each file gets run through the meta-data extraction libraries from libextractor.

libextractor sorts meta-information (we also call it keywords, same thing, don't stress) into types. and if you wanna see every type that exists? that's literally what -L is for. slay. ๐Ÿ’…


๐Ÿ’œ OPTIONS ๐Ÿ’œ

  • -b โ€” spits the output out in BiBTeX format. academic queen behavior ๐Ÿ“š
  • -g โ€” grep-friendly output, meaning all the keywords land on a single line for each file. use the verbose option and it prints the filename first, then the keywords. use verbose twice and it also shows you the keyword types. heads up though: this option will not print keyword types or non-textual metadata. ๐Ÿ™ˆ
  • -h โ€” print a brief summary of the options. your lil cheat sheet ๐Ÿซถ
  • -i โ€” run plugins in-process (this one's for debugging). by default, each plugin runs in its own process.
  • -l libraries โ€” use the specified libraries to extract keywords. the general format of libraries is [[-]LIBRARYNAME[:[-]LIBRARYNAME]*] where LIBRARYNAME is a libextractor compatible library and is typically of the form jpeg. that minus sign before the libraryname means remove this library from the existing list. and if you wanna run only a few selected plugins? use -l in combination with -n. ๐Ÿ’ซ
  • -L โ€” print a list of all known keyword types. the full menu, bestie ๐Ÿ“‹
  • -m โ€” load the file into memory and perform extraction from memory (for debugging). main character energy, in-memory edition โœจ
  • -n โ€” do not use the default set of extractors (typically all standard extractors, currently mp3, ogg, jpg, gif, png, tiff, real, html, pdf and mime-types), use only the extractors specified with the -l option.
  • -p type โ€” print only the keywords matching the specified type. by default, all keywords that are found and not removed as duplicates get printed.
  • -v โ€” print the version number and exit. bye bestie ๐Ÿ‘‹
  • -V โ€” be verbose. and you can specify this option multiple times to increase verbosity further. stack it, it's giving layered ๐Ÿ’…
  • -x type โ€” exclude keywords of the specified type from the output. by default, all keywords that are found and not removed as duplicates get printed.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


๐ŸŒˆ EXAMPLES ๐ŸŒˆ

okay these are the good part. watch her work:

$ extract test/test.jpg
comment - (C) 2001 by Christian Grothoff, using gimp 1.2 1
mimetype - image/jpeg
$ extract -V -x comment test/test.jpg
Keywords for file test/test.jpg:
mimetype - image/jpeg
$ extract -p comment test/test.jpg
comment - (C) 2001 by Christian Grothoff, using gimp 1.2 1
$ extract -nV -l png.so -p comment test/test.jpg test/test.png
Keywords for file test/test.jpg:
Keywords for file test/test.png:
comment - Testing keyword extraction

ate. no crumbs. ๐Ÿ”ฅ


libextractor and the extract tool are released under the GPL. and libextractor is a GNU package. periodt. ๐Ÿ’–


๐Ÿ’€ BUGS ๐Ÿ’€

a couple of file-formats (on the order of 10^3) are not recognized... ๐Ÿ˜ญ we don't talk about it.


๐ŸŽ€ AUTHORS ๐ŸŽ€

extract was originally written by Christian Grothoff <christian@grothoff.org> and Vidyut Samanta <vids@cs.ucla.edu>. use <libextractor@gnu.org> to contact the current maintainer(s). legends only ๐Ÿ‘‘


โญ AVAILABILITY โญ

you can obtain the original author's latest version from http://www.gnu.org/software/libextractor/ โ€” go get it bestie ๐Ÿงš


and that's the whole page! this was libextractor 1.0.0, dated Aug 7, 2012, manual page EXTRACT(1). go forth and extract, my love ๐Ÿฆ‹โœจ๐Ÿ’œ