Browse Source

Moved configuration of author list to config.py

Andreas Kopmann 7 years ago
parent
commit
ea9f8f0f69
5 changed files with 99 additions and 117 deletions
  1. 10 1
      README.md
  2. 3 1
      ak_scopus.py
  3. 81 1
      config.py.sample
  4. 0 101
      my_scopus.py
  5. 5 13
      scopus-get-publications.py

+ 10 - 1
README.md

@@ -1,5 +1,5 @@
 # README scopus
-*Ak, 27.3.2017*
+*Ak, 24.4.2017*
 
 Get information on publications of work groups from Elsevier's Scopus database for usage in websites. For each publication a post on a Wordpress CMS is created. Citations are mapped to Wordpress comments. The get-publication script is intended to run on a regualr basis (e.g. by cron).
 
@@ -8,6 +8,15 @@ Note: All scopus scripts run only with valid access to the Scopus database (e.g.
 
 ## Version history
 
+Todo:
+- generate python inline documentation
+
+
+Version 1.2, 24.4.17 (ak):
+- move complete configuration of author lists to config file
+- removed old list of Scopus author keys in my_scopus.py
+- added Philipp Lösel to the author list
+ 
 Version 1.1, 12.4.17 (ak):
 - added a second script to synchronize publication database and posts in wordpress
 - pushed repository to IPE GIT server

+ 3 - 1
ak_scopus.py

@@ -1,6 +1,8 @@
 import requests
 import json
-from my_scopus import MY_API_KEY
+
+from config import *
+
 
 
 #

+ 81 - 1
config.py.sample

@@ -11,10 +11,90 @@ db_name = 'scopus'
 log_file = '/root/scopus/scopus-publications.log'
 
 
-wp_api_url = "http://ufo.kit.edu/ufo2/xmlrpc.php"
+wp_api_url = "http://ufo.kit.edu/dis/xmlrpc.php"
 wp_user = "scopus"
 wp_password = "$scopus$"
 
 
+# Reporting
+
+log_file = "/Users/kopmann/scopus-publications.log"
+
+
+# Scopus query definition
+# Todo:
+# - Define a single object with the defintion of the author groups
+# - Search intervall - change to last 2 years?!
+
+MY_API_KEY = "14d431d052c2caf5e9c4b1ab7de7463d"
+
+
+# Scopus author IDs
+
+# KIT, PDV
+ak = "35313939900"
+csa = "15076530600"
+matthiasVogelgesang = "35303862100"
+timoDritschler = "56473578500"
+andreiShkarin = "56950893700"
+nicholasTanJerome = ""
+tillBergmann = "35308595100"
+armenBeglarian = "55343303900"
+petraRohr = "40561503300"
+norbertKunka = "35276889200"
+horstDemattio = "6506285395"
+
+# KIT, EPS
+micheleCaselle = "7006767859"
+urosStevanovic = "55557712600"
+lorenzoRota = "56473442500"
+matthiasBalzer = "35519411500"
+
+# KIT, IPE
+marcWeber = "56654729000"
+mw2 = "56603987800"
+mw3 = "7404138824"
+
+# KIT, IPS
+tomyRolo = "56118820400"
+tr2 = "35194644400"
+tr3 = "35277157300"
+tomasFarago = "56655045700"
+alexyErshof = "56441809800"
+romanShkarin = "56951331000"
+tiloBaumbach = "7003270957"
+thomasVandekamp = "46761453500"
+
+# TUD
+michaelHeethoff = "55979397800"
+sebastianSchmelzle = "34768986100"
+
+# UHD
+philipLoesel = "57190622016"
+
+# Others (e.g. for black list)
+ashotChiligarian = "7004126133"
+hansBluemer = "7006284555"
+matthiasKleifegs = "6602072426"
+
+
+# Definition of workgroups for automatic Scopus publication retrieval
+
+sc_start = 2010
+
+ufo_pdv = [ak, csa, matthiasVogelgesang, timoDritschler, andreiShkarin ]
+ufo_eps = [matthiasBalzer, lorenzoRota, micheleCaselle ]
+ufo_ips = [tomyRolo, tr2, tr3, tomasFarago]
+ufo_apps = [thomasVandekamp]
+ufo_alg = [philipLoesel]
+
+sc_workgroups = [
+{'name':"Computing",'authors':ufo_pdv},
+{'name':"Electronics",'authors':ufo_eps},
+{'name':"X-ray Imaging",'authors':ufo_ips},
+{'name':"Morphology",'authors':ufo_apps},
+{'name':"Algorithms",'authors':ufo_alg}
+]
+
 
 

+ 0 - 101
my_scopus.py

@@ -1,101 +0,0 @@
-# Access key and list of group members
-
-MY_API_KEY = "14d431d052c2caf5e9c4b1ab7de7463d"
-
-
-# PDV
-
-ak = "35313939900"
-
-# Merged with ak, Scopus 24.2.17
-#ak2 = "56656673700"
-
-csa = "15076530600"
-
-matthiasVogelgesang = "35303862100"
-
-timoDritschler = "56473578500"
-
-andreiShkarin = "56950893700"
-
-nicholasTanJerome = ""
-
-tillBergmann = "35308595100"
-
-armenBeglarian = "55343303900"
-
-petraRohr = "40561503300"
-
-norbertKunka = "35276889200"
-
-horstDemattio = "6506285395"
-
-
-
-# UFO-IPE
-
-# Warning: In the profile are two authors with the same name mixed!
-micheleCaselle = "7006767859"
-
-urosStevanovic = "55557712600"
-
-lorenzoRota = "56473442500"
-
-matthiasBalzer = "35519411500"
-
-marcWeber = "56654729000"
-mw2 = "56603987800"
-mw3 = "7404138824"
-
-
-# UFO-IPS
-
-tomyRolo = "56118820400"
-tr2 = "35194644400"
-tr3 = "35277157300"
-
-tomasFarago = "56655045700"
-
-
-alexyErshof = "56441809800"
-
-romanShkarin = "56951331000"
-
-tiloBaumbach = "7003270957"
-
-# ASTOR/ NOVA
-
-thomasVandekamp = "46761453500"
-
-michaelHeethoff = "55979397800"
-
-sebastianSchmelzle = "34768986100"
-
-philipLoesel = ""
-
-
-# Blacklist
-
-ashotChiligarian = "7004126133"
-
-hansBluemer = "7006284555"
-
-matthiasKleifegs = "6602072426"
-
-
-
-
-pdv = [ak, csa, tillBergmann, armenBeglarian, matthiasVogelgesang, petraRohr, timoDritschler, norbertKunka, horstDemattio]
-
-ufo_pdv = [ak, csa, matthiasVogelgesang, timoDritschler, andreiShkarin ]
-
-ufo_eps = [matthiasBalzer, lorenzoRota, micheleCaselle ]
-
-ufo_ips = [tomyRolo, tr2, tr3, tomasFarago]
-
-ufo_apps = [ thomasVandekamp]
-
-ufo = ufo_pdv + ufo_ips + ufo_eps
-
-
-

+ 5 - 13
scopus-get-publications.py

@@ -20,8 +20,8 @@ import requests
 import json
 import os.path
 
-from my_scopus import MY_API_KEY
-from my_scopus import ak, csa, pdv, ufo, ufo_pdv, ufo_ips, ufo_eps, ufo_apps
+#from my_scopus import MY_API_KEY
+#from my_scopus import ak, csa, pdv, ufo, ufo_pdv, ufo_ips, ufo_eps, ufo_apps
 from ak_scopus import get_scopus_list, get_scopus_data, get_scopus_refs
 
 
@@ -342,24 +342,16 @@ print ""
 # Todo: Detect, if there is no access to scopus !!!
 #
 
+search_param = '(PUBYEAR AFT %d)' % (sc_start)
 
-# Define the author, that should be considered
-#authors = ["Computing", ufo_pdv]
-#print authors
-
-#update_publications(ufo_pdv, "Computing", '(PUBYEAR AFT 2006)',10)
-update_publications(ufo_pdv, "Computing", '(PUBYEAR AFT 2006)')
-update_publications(ufo_ips, "X-ray Imaging", '(PUBYEAR AFT 2010)')
-update_publications(ufo_eps, "Electronics", '(PUBYEAR AFT 2010)')
-update_publications(ufo_apps, "Morphology", '(PUBYEAR AFT 2010)')
-
+for wp in sc_workgroups:
+    update_publications(wp['authors'],wp['name'],search_param)
 
 update_wp_posts()
 
 # read all citations
 # Todo: read only new citations?!
 
-
 update_citations()