Converts a byte array to a string depending on the type of parser.
Converts a byte array to a string depending on the type of parser.
(format-matches sample [_ identifier-fn converter])
Determines whether a format matches a sample from a file.
Determines whether a format matches a sample from a file.
(identify in)
(identify in sample-size)
Attempts to identify the type of a sample obtained from anything that clojure.java.io/reader can convert to a reader.
Attempts to identify the type of a sample obtained from anything that clojure.java.io/reader can convert to a reader.
(identify-one-row column-number sample-size csv-data)
Pulls the path out of column-number
of csv-data
, and then identifies
with sample-size
and returns the CSV data with the type added as an
additional column (using 'unknown' if no type was detected). Returns nil if
the file does not exist.
Pulls the path out of `column-number` of `csv-data`, and then identifies with `sample-size` and returns the CSV data with the type added as an additional column (using 'unknown' if no type was detected). Returns nil if the file does not exist.
(identify-sample sample)
Attempts to identify the type of a sample.
Attempts to identify the type of a sample.
(list-formats)
Lists all of the formats currently recognized by this utility.
Lists all of the formats currently recognized by this utility.
(parse-args args)
Parses the command-line arguments.
Parses the command-line arguments.
(show-file-type sample-size path)
Shows the type of a single file or 'UNRECOGNIZED' if the file type can't be identified.
Shows the type of a single file or 'UNRECOGNIZED' if the file type can't be identified.
(show-file-types sample-size paths)
Shows the types of a sequence of files.
Shows the types of a sequence of files.
(sip input-stream limit)
Reads in 'limit' number of bytes from input-stream. Returns a byte-array.
Reads in 'limit' number of bytes from input-stream. Returns a byte-array.
(supported-formats)
Returns a list of the formats currently recognized by heuristomancer. Returns the list in the order of evaluation when iterating over the parsers when attempting to id a file.
Returns a list of the formats currently recognized by heuristomancer. Returns the list in the order of evaluation when iterating over the parsers when attempting to id a file.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close