This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Merge results from query above into local peer | |
$ mcclient merge QmZ6dckUhRouVr6AsBTpK6vMLVpcz1KAeJAJVQEZQ5gCek 'SELECT * FROM images.flickr WHERE wki = flickr100mm_3733230430' | |
merged 1 statement and 1 object | |
# retrieve merged statement from local peer | |
$ mcclient query 'SELECT * FROM images.* WHERE wki = flickr100mm_3733230430' | |
{ id: '4XTTM2kxMrVAZXSAu9AKtHBiMFpiqWToAmr7s6BzGXiPoriHy:1477062213:15926844', | |
publisher: '4XTTM2kxMrVAZXSAu9AKtHBiMFpiqWToAmr7s6BzGXiPoriHy', | |
namespace: 'images.flickr', | |
body: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mcclient query -r QmZ6dckUhRouVr6AsBTpK6vMLVpcz1KAeJAJVQEZQ5gCek 'SELECT * FROM images.flickr WHERE wki = flickr100mm_3733230430' | |
{ id: '4XTTM2kxMrVAZXSAu9AKtHBiMFpiqWToAmr7s6BzGXiPoriHy:1477062213:15926844', | |
publisher: '4XTTM2kxMrVAZXSAu9AKtHBiMFpiqWToAmr7s6BzGXiPoriHy', | |
namespace: 'images.flickr', | |
body: | |
{ Body: | |
{ Simple: | |
{ object: 'Qmb1zMZygv1eEj855X8JJxTga2ohLsqK7JE8tHUnuvLrxQ', | |
refs: [ 'flickr100mm_3733230430' ] } } }, | |
timestamp: 1477062213, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mcclient listPeers --info | |
QmeiY2eHMwK92Zt6X4kUUC3MsjMmVb2VnGZ17DhnhRPCEQ -- Metadata for CC images from DPLA, 500px, and pexels; operated by Mediachain Labs. | |
QmZ6dckUhRouVr6AsBTpK6vMLVpcz1KAeJAJVQEZQ5gCek -- Metadata for CC images from flickr; operated by Mediachain Labs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message Statement { | |
string id = 1; | |
string publisher = 2; // ECC public key | |
string namespace = 3; // e.g. "cc" | |
StatementBody body = 4; // reference to the actual metadata | |
int64 timestamp = 5; | |
bytes signature = 6; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl indexer.mediachain.io:23456/search -d '{"q": "actor"}' | |
{ | |
"cache_hit": true, | |
"next_page": { | |
"limit": 15, | |
"offset": 15, | |
"token": "e10fea03553d2c9058b156287e866add" | |
}, | |
"prev_page": null, | |
"results": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv) $ mkdir artsy | |
(venv) $ curl https://artsy-random-image.herokuapp.com/ > artsy/001.json | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 3164 100 3164 0 0 3323 0 --:--:-- --:--:-- --:--:-- 3323 | |
(venv) $ mediachain ingest artsy@QmTvzPcDjKyAP9nx3tLnE3k9kMmB4QXF7hzZTM2vLDHtUA artsy | |
Inserted canonical: QmaQoM65kDsVR2SPfovGRdjirUaau8SKTfHVL4fgwP4PCM | |
(venv) $ mediachain get QmaQoM65kDsVR2SPfovGRdjirUaau8SKTfHVL4fgwP4PCM | |
{ | |
"metaSource": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ virtualenv venv | |
$ source venv/bin/activate | |
(venv) $ pip install -U pip | |
(venv) $ pip install mediachain-client | |
(venv) $ mediachain get Qmd2EEpQXnxd4HDpaDLymwRBUniS4tJvFXktNBW3kMd5ut | |
{ | |
"metaSource": { | |
"@link": "Qmcbo67Ycv6rCREhQYoYeGJzgAJiCZDfyEdtHqdbmTsv6T" | |
}, | |
"meta": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% git clone git@github.com:mediachain/L-SPACE.git && cd L-SPACE && sbt test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ./perceptive-client.py 300px-Susan_Meiselas_-_Molotov_Man.jpg | |
Searching with input image 300px-Susan_Meiselas_-_Molotov_Man.jpg | |
perceptual hash: afe9d44ba135198a | |
Using IPFS daemon at 127.0.0.1:5001, id: QmRW2PTGpWk2X5sDbAvyDLV8668skcF8ADr1FcaP8VtC1q | |
Fetching metadata from /ipfs/QmRBHQVmjKTv6ust1SVjJ4WLQb2p7PJaA1bEespBjb8SwY | |
{ | |
"@context": "http://schema.org", | |
"image_id": "c2ba20ae-8ccc-11e5-b627-83bff0768b7d", | |
"thumbnailUrl": { | |
"mlink": "QmXNDXmqfd9p5XXm6EBm6D2i1FbsaBQyBNEieZ2Czhxi77" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"10d13b93acbd9b62": "QmaDZCS2g1S6Z5yzPYqNDs9rycJyFzkehHocSVkuH5LpQv", | |
"114726d3c6d6558f": "QmRALYmxXnA7MZTXJGvrRg2XLKqEJxL6Vt55AdQG73sntB", | |
... | |
} |