File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import logging
2+ import logging .config
3+ import io
4+
5+ logger = logging .getLogger (__name__ )
6+
7+ logging .config .dictConfig ({
8+ 'version' : 1 ,
9+ 'disable_existing_loggers' : False ,
10+ 'formatters' : {
11+ 'standard' : {
12+ 'format' : '%(asctime)s [%(levelname)s] %(name)s %(funcName)s:%(lineno)d: %(message)s'
13+ },
14+ },
15+ 'handlers' : {
16+ 'default' : {
17+ 'level' :'DEBUG' ,
18+ 'formatter' : 'standard' ,
19+ 'class' :'logging.StreamHandler' ,
20+ },
21+ },
22+ 'loggers' : {
23+ '' : {
24+ 'handlers' : ['default' ],
25+ 'level' : 'DEBUG' ,
26+ 'formatter' : 'standard' ,
27+ 'propagate' : True
28+ }
29+ }
30+ })
31+
32+
33+ if __name__ == '__main__' :
34+ bibtex_source = """@ARTICLE{Cesar2013,
35+ author = {Jean César},
36+ title = {An amazing title},
37+ year = {2013},
38+ month = {1},
39+ volume = {12},
40+ pages = {12--23},
41+ journal = {Nice Journal},
42+ abstract = {This is an abstract. This line should be long enough to test
43+ multilines...},
44+ comments = {A comment},
45+ keywords = {keyword1, keyword2},
46+ }
47+ """
48+
49+ from bibtexparser .bparser import BibTexParser
50+
51+ with io .StringIO (bibtex_source ) as f :
52+ bp = BibTexParser (f .read ())
53+ print (bp .get_entry_list ())
You can’t perform that action at this time.
0 commit comments