-
Notifications
You must be signed in to change notification settings - Fork 2
/
bibmaptobibtex.py
79 lines (75 loc) · 2.91 KB
/
bibmaptobibtex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
#数据修改的设置
#
#注意:域如果不存在且需要终止,应加上"final":True
# 大小写字母保护的字符串
CaseProtect=['AIAA','IEEE','AAAI',"GECCO\'18","ACML","SAR",'BVR','UAV','UCAV','UAVs','PSO','AI','IJCAI','WIC','ACM',
'CICAI','CDC','CoRR','IT','CAA','PSO','CAC','ICLR','II','III','IV','NIPS','arXiv','VI','VII',
'VIII','IJCNN','AAMAS','ICGNC','CIG','ICUS','ACC','ICMA','MATEC','ACTA']
#其他情况请在bib文件中修改做保护,比如用{}包起来,NIPS-12这种用带数字的单词会自动保护
#平时积累的时候就要做保护
sourcemaps=[
[#map1:将设置title为sentencecase
{"fieldsource":"title","final":True},#
{"fieldset":"title","origfieldval":True,"fieldfunction":'setsentencecase',"overwrite":True}#step1
],
[#map1:将设置title为sentencecase
{"fieldsource":"author","final":True},#
{"fieldset":"author","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1
],
[#map2:将设置booktitle为titlecase
{"fieldsource":"booktitle","final":True},#
{"fieldset":"booktitle","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1
],
[#map2:将location域转换为address域
{"fieldsource":"journaltitle","fieldtarget":"journal"}#step1
],
[#map3:将设置journal为titlecase
{"fieldsource":"journal","final":True},#
{"fieldset":"journal","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1
],
[#map2:将location域转换为address域
{"fieldsource":"location","fieldtarget":"address"}#step1
],
[#map1:将设置title为sentencecase
{"pertype":"inproceedings"},#
{"pertype":"proceedings"},#
{"pertype":"proceedings"},#
{"fieldsource":"institution","fieldtarget":"organization"}#step1
],
[#map1:将设置title为sentencecase
{"pertype":"incollection"},#
{"fieldsource":"institution","fieldtarget":"publisher"}#step1
],
[#map1:将设置title为sentencecase
{"pertype":"thesis"},#
{"fieldsource":"type","match":'phdthesis',"final":True},#step1
{"typesource":"thesis","typetarget":"phdthesis"}
],
[#map1:将设置title为sentencecase
{"pertype":"thesis"},#
{"fieldsource":"type","match":'mastersthesis',"final":True},#step1
{"typesource":"thesis","typetarget":"mastersthesis"}
],
[
{"typesource":"report","typetarget":"techreport"}
],
[
{"pertype":"techreport"},#
{"fieldsource":"publisher","fieldtarget":"institution"},
{"fieldsource":"organization","fieldtarget":"institution"}
],
[#map1:将设置title为sentencecase
{"pertype":"phdthesis"},#
{"pertype":"mastersthesis"},#
{"fieldsource":"publisher","fieldtarget":"school"},
{"fieldsource":"institution","fieldtarget":"school"},
{"fieldsource":"organization","fieldtarget":"school"},
],
[#map1:将设置title为sentencecase
{"fieldsource":"date","final":True},#
{"fieldset":"date","origfieldval":True,"fieldfunction":'setdatetoymd',"overwrite":True}#step1
]
]
#默认不做修改
#sourcemaps=[]