Moving the collection parameter to the top of the script so as to allow the user to easily configure that setting.

git-svn-id: https://wikiteam.googlecode.com/svn/trunk@666 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
Hydriz 12 years ago
parent 78a07544ed
commit b8b2dbcf4a

@ -28,7 +28,9 @@ import urllib
# Configuration goes here
accesskey = ''
secretkey = ''
collection = 'opensource' # Replace with "wikiteam" if you're an admin of the collection
# Nothing to change below
def upload(wikis):
for wiki, dumps in wikis.items():
wikiname = '-'.join(wiki.split('-')[:-1]) # The identifier has to match this pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]{4,100}$
@ -56,7 +58,7 @@ def upload(wikis):
]
if c == 0:
curl += ['--header', "'x-archive-meta-mediatype:web'",
'--header', "'x-archive-meta-collection:opensource'", # Replace with wikiteam if you're an admin of the collection
'--header', "'x-archive-meta-collection:%s'" % (collection),
'--header', "'x-archive-meta-title:%s'" % (wikititle),
'--header', "'x-archive-meta-description:%s'" % (wikidesc),
'--header', "'x-archive-meta-subject:%s'" % ('; '.join(wikikeys)), # Keywords should be separated by ; but it doesn't matter much; the alternative is to set one per field with subject[0], subject[1], ...

Loading…
Cancel
Save