def processSpecrefBiblioFile(text, storage, order):
    import json
    try:
        datas = json.loads(text)
    except Exception, e:
        die("Couldn't read the local JSON file:\n{0}", str(e))
        return storage

    # JSON field name: BiblioEntry name
    fields = {
        "authors": "authors",
        "etAl": "etAl",
        "href": "dated_url",
        "edDraft": "current_url",
        "title": "title",
        "date": "date",
        "status": "status"
    }
    # Required BiblioEntry fields
    requiredFields = ["url", "title"]

    aliases = {}
    for biblioKey, data in datas.items():
        biblio = {"linkText": biblioKey, "order": order}
        if isinstance(data, basestring):
            # Handle <legacyRef>
            biblio['biblioFormat'] = "string"
            biblio['data'] = data.replace("\n", " ")
        elif "aliasOf" in data:
            # Handle <alias>
            if biblioKey.lower() == data["aliasOf"].lower():
                # SpecRef uses aliases to handle capitalization differences,
                # which I don't care about.
                continue
            biblio["biblioFormat"] = "alias"
            biblio["aliasOf"] = data["aliasOf"].lower()
        else:
            # Handle <ref>
            biblio['biblioFormat'] = "dict"
            for jsonField, biblioField in fields.items():
                if jsonField in data:
                    biblio[biblioField] = data[jsonField]
                if "versionOf" in data:
                    # "versionOf" entries are all dated urls,
                    # so you want the href *all* the time.
                    biblio["current_url"] = data["href"]
        storage[biblioKey.lower()].append(biblio)
    return storage
Returns a collection with the given name
dataset/ETHPy150Open tabatkins/bikeshed/bikeshed/biblio.py/processSpecrefBiblioFile--crossover with--dataset/ETHPy150Open saeschdivara/ArangoPy/arangodb/api.py/Client.collection