2015-05-02 14:34:53 +02:00
|
|
|
def get_catalog_tag_from_id(ident):
|
2017-08-15 15:26:32 +02:00
|
|
|
return 'IDRE{:0>3d}'.format(ident)
|
2015-03-14 22:38:12 +01:00
|
|
|
|
2017-08-17 16:44:26 +02:00
|
|
|
|
2015-05-02 14:34:53 +02:00
|
|
|
def get_id_from_catalog_tag(tag):
|
|
|
|
try:
|
|
|
|
return int(tag[4:])
|
|
|
|
except ValueError:
|
|
|
|
return -1
|
|
|
|
|
2015-03-14 22:38:12 +01:00
|
|
|
|
|
|
|
def get_contribs(contributors):
|
|
|
|
contrib_list = []
|
|
|
|
for contrib in contributors:
|
|
|
|
contrib_list.append({
|
2017-08-15 15:26:32 +02:00
|
|
|
'slug': contrib.slug,
|
|
|
|
'name': contrib.name
|
2015-03-14 22:38:12 +01:00
|
|
|
})
|
|
|
|
return contrib_list
|