Bug 596580: Fix mozJSSubScriptLoader's version finding. (r=brendan)
[mozilla-central.git] / xpcom / analysis / MDC-attach.py
blob77dad3925f5922a5f7c608a97af32bc8152192c2
1 #!/usr/bin/env python
3 """
4 Upload a file attachment to MDC
6 Usage: python MDC-attach.py <file> <parent page name> <MIME type> <description>
7 Please set MDC_USER and MDC_PASSWORD in the environment
8 """
10 import os, sys, deki
12 wikiuser = os.environ['MDC_USER']
13 wikipw = os.environ['MDC_PASSWORD']
15 file, pageid, mimetype, description = sys.argv[1:]
17 wiki = deki.Deki("http://developer.mozilla.org/@api/deki/", wikiuser, wikipw)
18 wiki.create_file(pageid, os.path.basename(file), open(file).read(), mimetype,
19 description)