Esempio n. 1
0
def test_writeANVLString():
    elements = {
        'issue': [{
            'content': '1'
        }],
        'title': [{
            'content': 'Important Paper'
        }, {
            'content': 'Another Paper'
        }]
    }
    anvl = mg.writeANVLString(elements, ordering=['title', 'issue'])
    assert anvl == ('title: Important Paper\n'
                    'title: Another Paper\n'
                    'issue: 1')
Esempio n. 2
0
def generate_highwire_text(highwire_elements):
    """Convert highwire elements into an ANVL formatted string."""
    highwire_dict = highwirepy2dict(highwire_elements)
    return writeANVLString(highwire_dict, HIGHWIRE_ORDER)
Esempio n. 3
0
def generate_highwire_text(highwire_elements):
    """Convert highwire elements into an ANVL formatted string."""
    highwire_dict = highwirepy2dict(highwire_elements)
    return writeANVLString(highwire_dict, HIGHWIRE_ORDER)
Esempio n. 4
0
def generate_dc_txt(dc_dict):
    """Generate DC data as ANVL formatted string."""
    return writeANVLString(dc_dict, DC_ORDER)
Esempio n. 5
0
def generate_dc_txt(dc_dict):
    """Generate DC data as ANVL formatted string."""
    return writeANVLString(dc_dict, DC_ORDER)