mirror of https://github.com/perkeep/perkeep.git
Add genconfig support for flickr importer
Change-Id: I8be13f81fae15acfe87cce9d65318524efc3035d
This commit is contained in:
parent
b33a785e62
commit
b53e79614d
|
@ -44,6 +44,7 @@ type configPrefixesParams struct {
|
|||
blobPath string
|
||||
searchOwner blob.Ref
|
||||
shareHandlerPath string
|
||||
flickr map[string]interface{}
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -444,6 +445,13 @@ func genLowLevelPrefixes(params *configPrefixesParams, ownerName string) (m json
|
|||
}
|
||||
}
|
||||
|
||||
if params.flickr != nil {
|
||||
m["/importer-flickr/"] = map[string]interface{}{
|
||||
"handler": "importer-flickr",
|
||||
"handlerArgs": params.flickr,
|
||||
}
|
||||
}
|
||||
|
||||
if haveIndex {
|
||||
syncArgs := map[string]interface{}{
|
||||
"from": "/bs/",
|
||||
|
@ -530,6 +538,9 @@ func genLowLevelConfig(conf *Config) (lowLevelConf *Config, err error) {
|
|||
sqliteFile = conf.OptionalString("sqlite", "")
|
||||
kvFile = conf.OptionalString("kvIndexFile", "")
|
||||
|
||||
// Importer options
|
||||
flickr = conf.OptionalObject("flickr")
|
||||
|
||||
_ = conf.OptionalList("replicateTo")
|
||||
publish = conf.OptionalObject("publish")
|
||||
// alternative source tree, to override the embedded ui and/or closure resources.
|
||||
|
@ -638,6 +649,7 @@ func genLowLevelConfig(conf *Config) (lowLevelConf *Config, err error) {
|
|||
blobPath: blobPath,
|
||||
searchOwner: blob.SHA1FromString(armoredPublicKey),
|
||||
shareHandlerPath: shareHandlerPath,
|
||||
flickr: flickr,
|
||||
}
|
||||
|
||||
prefixes := genLowLevelPrefixes(prefixesParams, ownerName)
|
||||
|
|
|
@ -23,6 +23,8 @@ 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. Enter two child keys: <code>appKey</code> and <code>appSecret</code>, which you can get by filling out <a href="http://www.flickr.com/services/apps/create/noncommercial/">this form</a>.</li>
|
||||
|
||||
<li><b><code>https</code></b>: if "true", HTTPS is used
|
||||
<ul>
|
||||
<li><b><code>HTTPSCertFile</code></b>: if using https</li>
|
||||
|
|
Loading…
Reference in New Issue