source: make_jcr_list.py @ 0:2f43cb89e87c

Revision 0:2f43cb89e87c, 540 bytes checked in by andre.hagenbruch@rub.de, 8 years ago (diff)

Initial commit for version 0.2

Line 
1#!/usr/bin/env python
2# encoding: utf-8
3"""
4make_jcr_list.py
5
6Created by Andre Hagenbruch on 2009-12-02.
7Copyright (c) 2009 University Library Bochum. All rights reserved.
8"""
9
10from jcr import jcr
11
12def make_unique(jcr):
13        unique = set()
14        for year in jcr:
15                for issn in jcr[year]:
16                        unique.add(issn)
17        return unique
18
19def main():
20        u = make_unique(jcr)
21        print len(u)
22        out = open('unique_jcr.py', 'w')
23        out.write('unique = (')
24        for issn in u:
25                out.write('"%s", ' % issn.replace('-', ''))
26        out.write(')\n')
27
28
29if __name__ == '__main__':
30        main()
31
Note: See TracBrowser for help on using the repository browser.