Save and find metadata about your files.
hashurfile stores metadata and sha256-hashes of files. The metadata will be stored in XML format. The hashes are used to identify files. Extra sender-hashes can be stored to identify the sender of an entry.
There are 2 kinds of entries:
There are 2 methods to use hashurfile: get.php and post.php, which is kind of selfevident, what it is useful for.
As the name suggests, you can pass a file hash to it using http-get-request, e.g.
https://hashurfile.org/get.php?hash=f31ee1abbaf0db820b2e5de5224667cdd953ceb4f30e3ec8f41329fedee36b3cand get in return a XML-metadata-set
<?xml version="1.0" encoding="UTF-8"?> <dc:dcx xmlns:dc="info:lc/xmlns/dcx-v1" xmlns="http://purl.org/dc/terms/"> <dc:simpleDc> <title>The illuminatus! trilogy</title> <creator>Wilson, Robert Anton</creator> <creator>Shea, Robert</creator> <identifier>Robert Anton Wilson, Robert Shea - The illuminatus! trilogy.mobi</identifier> </dc:simpleDc> </dc:dcx>(If you use this in a browser, right-click the result page and "View page source".)
For illustration purpose, there is a rudimentary form to recieve XML from a hash
hash+XML GET form
Here you can post metadata in XML-format, a hash as unique ID for this entry and a sender hash to identifiy yourself.
In a html form this would look like
<form action="post.php" method="post"> Hash:<input type="text" name="hash" size="100" maxlength="64"><br> Sender-Hash:<input type="text" name="sender_hash" size="100" maxlength="64"><br> Free it from ownership<input type="checkbox" name="free_from_ownership" value="1"><br> <textarea name="xml" cols="100" rows="40"></textarea><br> <input type="submit" value="submit"> </form>
The field names have to be hash
, sender_hash
, free_from_ownership
(optional) and xml
. The hash values have to be exact 64 hex characters. If you use the sender_hash
, the database entry can only be overwritten by using the same sender-hash. So please store your sender-hash carefully somewhere!
sender_hash
can be empty, which allows anybody to overwrite this database entry (and put his/her own sender-hash there and claim the entry).
If you post free_from_ownership=1
you can change an entry owned by you to an open entry. Already open entries will stay open.
The XML Metadata has a maximum of 2021 characters and has to be compliant to Dublin Core Extended (DCX) schema "info:lc/xmlns/dcx-v1" from Library of Congress.
All the relevant XML-Schemas can be found here:
All non ASCII-characters have to be HTML encoded. For a valid XML-entry example, look up at the get.php-paragraph.
For illustration purpose, there is a rudimentary form to register an entry and send XML
hash+XML POST form
Please feel free to write your own clients!
In Linux-Enviroment you can use the first attempt of a command line interface written in Perl.
DOWNLOAD hashurfile CLI
hashurfile ver. 0.5 Usage: hashurfile [OPTION] [FILE] -h this help -p post hash and filename of FILE to hashurfile.org -d don't overwrite existing entry -e post with empty sender hash (means, this can be overwritten and occupied by anyone) note: only works either for new entries or you are the owner of this entry or it's an open entry -b <EAN/ISBN> autofill entry for a book (get metadata from amazon (worldcat not implemented yet) -i autofill entry from file's metadata in case of pdf -t "<dc_element>=value" provide a value for a dc_element, see dcx.xsd for possible dc_elements this overwrites -b and -i and can be used multiple times -g get entry of FILE from hashurfile.org -s simple output (just the <identifier>-tag of XML) -c create sender hash using dd, sha256sum, /dev/urandom and /tmp from shell (this will be stored in ~/.config/hashurfile.cfg) -v verbose
To provide an entire directory, use find
at the linux console
find <some-directory-path> -type f -exec hashurfile -p -e {} \;For this PERL-script to run you need a bunch of PERL-modules. In Linux install them as root like
cpan LWP::UserAgent HTTP::Response HTTP::Request::Common Getopt::Long File::Basename XML::Entities HTML::Entities Text::BibTeX File::Type PDF::API2 utf8 Data::Dumper