Enable Flickr importer in the production server. This was meant to work previously but there was a bug.

Change-Id: I657a20bd97a9e186d6b2bb4ec34553889e7c262c
This commit is contained in:
Aaron Boodman 2013-12-28 01:43:19 -08:00
parent 19f4324066
commit 5de3951ccf
4 changed files with 128 additions and 2 deletions

View File

@ -459,7 +459,10 @@ func genLowLevelPrefixes(params *configPrefixesParams, ownerName string) (m json
if params.flickr != "" {
m["/importer-flickr/"] = map[string]interface{}{
"apiKey": params.flickr,
"handler": "importer-flickr",
"handlerArgs": map[string]interface{}{
"apiKey": params.flickr,
},
}
}

View File

@ -0,0 +1,112 @@
{
"auth": "userpass:camlistore:pass3179",
"https": false,
"listen": "localhost:3179",
"prefixes": {
"/": {
"handler": "root",
"handlerArgs": {
"blobRoot": "/bs-and-maybe-also-index/",
"ownerName": "Alice",
"searchRoot": "/my-search/",
"statusRoot": "/status/",
"stealth": false
}
},
"/bs-and-index/": {
"handler": "storage-replica",
"handlerArgs": {
"backends": [
"/bs/",
"/index-kv/"
]
}
},
"/bs-and-maybe-also-index/": {
"handler": "storage-cond",
"handlerArgs": {
"read": "/bs/",
"write": {
"else": "/bs/",
"if": "isSchema",
"then": "/bs-and-index/"
}
}
},
"/bs/": {
"handler": "storage-filesystem",
"handlerArgs": {
"path": "/tmp/blobs"
}
},
"/cache/": {
"handler": "storage-filesystem",
"handlerArgs": {
"path": "/tmp/blobs/cache"
}
},
"/importer-flickr/": {
"handler": "importer-flickr",
"handlerArgs": {
"apiKey": "monkey:balls"
}
},
"/index-kv/": {
"handler": "storage-kvfileindexer",
"handlerArgs": {
"blobSource": "/bs/",
"file": "/path/to/indexkv.db"
}
},
"/my-search/": {
"handler": "search",
"handlerArgs": {
"index": "/index-kv/",
"owner": "sha1-f2b0b7da718b97ce8c31591d8ed4645c777f3ef4",
"slurpToMemory": true
}
},
"/setup/": {
"handler": "setup"
},
"/share/": {
"handler": "share",
"handlerArgs": {
"blobRoot": "/bs/"
}
},
"/sighelper/": {
"handler": "jsonsign",
"handlerArgs": {
"keyId": "26F5ABDA",
"publicKeyDest": "/bs-and-index/",
"secretRing": "/path/to/secring"
}
},
"/status/": {
"handler": "status"
},
"/sync/": {
"handler": "sync",
"handlerArgs": {
"from": "/bs/",
"queue": {
"file": "/tmp/blobs/sync-to-index-queue.kv",
"type": "kv"
},
"to": "/index-kv/"
}
},
"/ui/": {
"handler": "ui",
"handlerArgs": {
"cache": "/cache/",
"jsonSignRoot": "/sighelper/",
"scaledImage": {
"file": "/tmp/blobs/thumbmeta.kv",
"type": "kv"
}
}
}
}
}

11
pkg/serverconfig/testdata/flickr.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"listen": "localhost:3179",
"auth": "userpass:camlistore:pass3179",
"blobPath": "/tmp/blobs",
"flickr": "monkey:balls",
"kvIndexFile": "/path/to/indexkv.db",
"identity": "26F5ABDA",
"identitySecretRing": "/path/to/secring",
"ownerName": "Alice",
"shareHandlerPath": "/share/"
}

View File

@ -23,7 +23,7 @@ web browser and restart the server.</p>
<li><b><code>baseURL</code></b>: Optional. If non-empty, this is the root of your URL prefix for your Camlistore server. Useful for when running behind a reverse proxy. Should not end in a slash. e.g. <code>https://yourserver.example.com</code></li>
<li><b><code>flickr</code></b>: Optional, and doesn't do anything yet. Support for continuous import from Flickr. Should be an API key and secret formatted as <code>key</code>:<code>secret</code>. Get yours by filling out <a href="http://www.flickr.com/services/apps/create/noncommercial/">this form</a>.</li>
<li><b><code>flickr</code></b>: Optional. Flickr importer. Should be a Flickr API key and secret formatted as <code>key</code>:<code>secret</code>. Get these values by filling out <a href="http://www.flickr.com/services/apps/create/noncommercial/">this form</a>. There's no UI yet, but you can run it by navigating to <code>/importer-flickr/?mode=start</code>. Progress is printed to the server's stdout.</li>
<li><b><code>https</code></b>: if "true", HTTPS is used
<ul>