예제 #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')
예제 #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)
예제 #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)
예제 #4
0
def generate_dc_txt(dc_dict):
    """Generate DC data as ANVL formatted string."""
    return writeANVLString(dc_dict, DC_ORDER)
예제 #5
0
def generate_dc_txt(dc_dict):
    """Generate DC data as ANVL formatted string."""
    return writeANVLString(dc_dict, DC_ORDER)