Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ajustando importações de copyrighter, datas de criação e atualização …

…e licença de uso
  • Loading branch information...
commit bfcd1d3197820411a9bcc54654d77ac6bca36f89 1 parent 23222b6
Fabio Batalha authored
View
5 scielomanager/utils/brasil/test_journal.json
@@ -1,5 +0,0 @@
-[
-{"151": ["ABCD, arq. bras. cir. dig"], "150": ["ABCD, arq. bras. cir. dig."], "450": ["LL - LILACS"], "400": ["0102-6720"], "62": ["Col\u00e9gio Brasileiro de Cirurgia Digestiva - CBCD"], "310": ["BR"], "330": ["CT"], "943": ["20111216"], "950": ["EMS"], "117": ["vancouv"], "63": ["Av. Brigadeiro Luiz Antonio, 278 - 6\u00b0 - Salas 10 e 11", "01318-901 S\u00e3o Paulo/SP Brasil", "Tel.: (11) 3288-8174/3289-0741"], "64": ["cbcd@cbcd.org.br"], "940": ["20100323"], "66": ["art"], "67": ["na"], "68": ["abcd"], "230": ["Brazilian Archives of Digestive Surgery"], "85": ["decs"], "690": ["www.scielo.br"], "691": ["10000000000000000000000"], "20": ["083653-2"], "951": ["EMS"], "490": ["S\u00e3o Paulo"], "540": ["^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo el contenido de esta revista, excepto d\u00f3nde est\u00e1 identificado, est&#225; bajo una <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licencia Creative Commons</a>^les", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo o conte\u00fado deste peri\u00f3dico, exceto onde est&#225 identificado, est&#225; licenciado sob uma <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licen&#231;a Creative Commons</a>^lpt", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> All the contents of %SITE_NAME%, except where otherwise noted, is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Creative Commons Attribution License</a>^len"], "320": ["SP"], "541": ["BY-NC"], "5": ["S"], "6": ["c"], "340": ["B"], "930": ["ABCD"], "302": ["1"], "360": ["en", "pt"], "51": ["^a20100500^bC"], "440": ["MEDICINA", "CIRURGIA", "GASTROENTEROLOGIA", "GASTROENTEROLOGIA"], "140": ["Col\u00e9gio Brasileiro de Cirurgia Digestiva - CBCD"], "301": ["1986"], "441": ["Health Sciences"], "303": ["1"], "380": ["Q"], "240": ["Arquivos Brasileiros de Cirurgia Digestiva"], "100": ["ABCD. Arquivos Brasileiros de Cirurgia Digestiva (S\u00e3o Paulo)"], "480": ["Col\u00e9gio Brasileiro de Cirurgia Digestiva"], "10": ["br1.1"], "901": ["Publicar art\u00edculos de estudios cl\u00ednicos y experimentales que aporten para el desarrollo de la pesquisa, ense\u00f1anza y asistencia en el \u00e1rea gastroenterolog\u00eda quir\u00fargica, cl\u00ednica, endosc\u00f3pica y otras correlacionadas.^les", "Publicar artigos de estudos cl\u00ednicos e experimentais que contribuam para o desenvolvimento da pesquisa, ensino e assist\u00eancia na \u00e1rea gastroenterologia cir\u00fargica, cl\u00ednica, endosc\u00f3pica e outras correlatas.^lpt", "To publish articles of clinical and experimental studies that foster the advancement of research, teaching and assistance in surgical, clinical, and endoscopic gastroenterology, and related areas. ^len"], "37": ["6633"], "50": ["C"], "35": ["PRINT"], "941": ["20100514"], "935": ["0102-6720"], "350": ["en", "pt"], "942": ["20100323"]},
-{"151": ["ARS (S\u00e3o Paulo)"], "150": ["ARS (S\u00e3o Paulo)"], "400": ["1678-5320"], "62": ["USP"], "310": ["BR"], "330": ["CT"], "943": ["20120110"], "117": ["nbr6023"], "63": ["Depto. De Artes Pl\u00e1sticas / ARS", "Av. Prof. L\u00facio Martins Rodrigues, 443", "05508-900 - S\u00e3o Paulo - SP", "Tel. (11) 3091-4430 / Fax. (11) 3091-4323"], "64": ["ars@usp.br"], "940": ["20100427"], "66": ["art"], "67": ["na"], "68": ["ars"], "490": ["S\u00e3o Paulo"], "85": ["nd"], "690": ["www.scielo.br"], "691": ["100000000000000000000000"], "20": ["101449-8"], "951": ["JSDA"], "950": ["JSDA"], "540": ["^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo el contenido de esta revista, excepto d\u00f3nde est\u00e1 identificado, est&#225; bajo una <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licencia Creative Commons</a>^les", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo o conte\u00fado deste peri\u00f3dico, exceto onde est&#225 identificado, est&#225; licenciado sob uma <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licen&#231;a Creative Commons</a>^lpt", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> All the contents of this journal, except where otherwise noted, is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Creative Commons Attribution License</a>^len"], "320": ["SP"], "541": ["BY-NC"], "5": ["S"], "6": ["c"], "340": ["B"], "930": ["ARS"], "360": ["en", "pt"], "301": ["20030100"], "441": ["Linguistics, Letters and Arts"], "440": ["ARTES PL\u00c1STICAS", "EDUCA\u00c7\u00c3O ART\u00cdSTICA", "HIST\u00d3RIA DA ARTE", "TEORIA DA ARTE", "FOTOGRAFIA"], "380": ["F"], "100": ["ARS (S\u00e3o Paulo)"], "480": ["Escola de Comunica\u00e7\u00f5es e Artes da Universidade de S\u00e3o Paulo"], "10": ["br1.1"], "901": ["La revista Ars (S\u00e3o Paulo) tiene como misi\u00f3n: 1. incentivar la producci\u00f3n art\u00edstica y cultural brasilera en general; 2. ofrecer a artistas, profesores de arte e investigadores actuando en Brasil y en el exterior, en inicio de carrera o con trayectorias profesionales ya consolidados, el forum privilegiado para el debate e intercambio de conocimientos que la vida acad\u00e9mica puede propiciar; 3. constituirse en una instancia de cr\u00edtica y fortalecimiento rec\u00edprocos para el medio acad\u00e9mico, art\u00edstico y cultural, favoreciendo la presencia proponente de la Universidad en la sociedad brasilera; 4. buscar el nivel de excelencia acad\u00e9mica en la investigaci\u00f3n art\u00edstica, cultural y cient\u00edfica; 5. promover el di\u00e1logo de las artes visuales con otras \u00e1reas de la producci\u00f3n cultural y cient\u00edfica y 6. formar un p\u00fablico lector en el \u00e1rea especializada del arte y de la cultura, p\u00fablico todav\u00eda incipiente en el contexto brasilero.^les", "A revista ARS (S\u00e3o Paulo) visa: 1. incentivar a produ\u00e7\u00e3o art\u00edstica e cultural brasileira em geral; 2. oferecer a artistas, professores de arte e pesquisadores atuantes no Brasil e no Exterior, em in\u00edcio de carreira ou com trajet\u00f3rias profissionais j\u00e1 consolidadas, o f\u00f3rum privilegiado de debate e interc\u00e2mbio de conhecimentos que a vida acad\u00eamica pode propiciar; 3. constituir-se em uma inst\u00e2ncia de cr\u00edtica e revigoramento rec\u00edprocos para o meio acad\u00eamico e art\u00edstico e cultural, favorecendo uma presen\u00e7a propositiva da Universidade na sociedade brasileira; 4. buscar o n\u00edvel da excel\u00eancia acad\u00eamica na pesquisa art\u00edstica, cultural e cient\u00edfica; 5. incentivar o di\u00e1logo das artes visuais com outras \u00e1reas da produ\u00e7\u00e3o cultural e cient\u00edfica e 6. formar um p\u00fablico leitor na \u00e1rea especializada da arte e da cultura, p\u00fablico ainda incipiente no ambiente brasileiro.^lpt", "The Ars mission is: (1) To qualify Brazilian cultural and artistic production in general; (2) To provide a privileged arena for the debate and exchange of knowledge, to both beginners and distinguished artists, art teachers and researchers, working in Brazil or abroad; (3) To bring about a locus of mutual criticism and strenghtening for both the academic and the artistic and cultural milieu, thus stimulating the University towards an assertive role in Brazilian society; (4) To pursue the level of academic excellence in the artistic, cultural and cientific areas of research; (5) To stimulate the dialogue between the visual arts and other cultural and scientific areas and (6). To build a public interested in the specific areas of art and culture, a task still to be consolidated in the Brazilian context.^len"], "51": ["^a20100000^bC"], "50": ["C"], "35": ["PRINT"], "941": ["20101006"], "935": ["1678-5320"], "350": ["pt"], "942": ["20100427"]},
-{"151": ["ARS (S\u00e3o Paulo)"], "150": ["ARS (S\u00e3o Paulo)"], "400": ["1678-5320"], "62": ["USP"], "310": ["BR"], "330": ["CT"], "943": ["20120110"], "117": ["nbr6023"], "63": ["Depto. De Artes Pl\u00e1sticas / ARS", "Av. Prof. L\u00facio Martins Rodrigues, 443", "05508-900 - S\u00e3o Paulo - SP", "Tel. (11) 3091-4430 / Fax. (11) 3091-4323"], "64": ["ars@usp.br"], "940": ["20100427"], "66": ["art"], "67": ["na"], "68": ["ars"], "490": ["S\u00e3o Paulo"], "85": ["nd"], "690": ["www.scielo.br"], "691": ["100000000000000000000000"], "20": ["101449-8"], "951": ["JSDA"], "950": ["JSDA"], "540": ["^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo el contenido de esta revista, excepto d\u00f3nde est\u00e1 identificado, est&#225; bajo una <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licencia Creative Commons</a>^les", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> Todo o conte\u00fado deste peri\u00f3dico, exceto onde est&#225 identificado, est&#225; licenciado sob uma <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Licen&#231;a Creative Commons</a>^lpt", "^t<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-nc/3.0/80x15.png\" /></a> All the contents of this journal, except where otherwise noted, is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/3.0/\">Creative Commons Attribution License</a>^len"], "320": ["SP"], "541": ["BY-NC"], "5": ["S"], "6": ["c"], "340": ["B"], "930": ["ARS"], "360": ["en", "pt"], "301": ["20030100"], "441": ["Linguistics, Letters and Arts"], "440": ["ARTES PL\u00c1STICAS", "EDUCA\u00c7\u00c3O ART\u00cdSTICA", "HIST\u00d3RIA DA ARTE", "TEORIA DA ARTE", "FOTOGRAFIA"], "380": ["F"], "100": ["ARS (S\u00e3o Paulo)"], "480": ["Escola de Comunica\u00e7\u00f5es e Artes da Universidade de S\u00e3o Paulo"], "10": ["br1.1"], "901": ["La revista Ars (S\u00e3o Paulo) tiene como misi\u00f3n: 1. incentivar la producci\u00f3n art\u00edstica y cultural brasilera en general; 2. ofrecer a artistas, profesores de arte e investigadores actuando en Brasil y en el exterior, en inicio de carrera o con trayectorias profesionales ya consolidados, el forum privilegiado para el debate e intercambio de conocimientos que la vida acad\u00e9mica puede propiciar; 3. constituirse en una instancia de cr\u00edtica y fortalecimiento rec\u00edprocos para el medio acad\u00e9mico, art\u00edstico y cultural, favoreciendo la presencia proponente de la Universidad en la sociedad brasilera; 4. buscar el nivel de excelencia acad\u00e9mica en la investigaci\u00f3n art\u00edstica, cultural y cient\u00edfica; 5. promover el di\u00e1logo de las artes visuales con otras \u00e1reas de la producci\u00f3n cultural y cient\u00edfica y 6. formar un p\u00fablico lector en el \u00e1rea especializada del arte y de la cultura, p\u00fablico todav\u00eda incipiente en el contexto brasilero.^les", "A revista ARS (S\u00e3o Paulo) visa: 1. incentivar a produ\u00e7\u00e3o art\u00edstica e cultural brasileira em geral; 2. oferecer a artistas, professores de arte e pesquisadores atuantes no Brasil e no Exterior, em in\u00edcio de carreira ou com trajet\u00f3rias profissionais j\u00e1 consolidadas, o f\u00f3rum privilegiado de debate e interc\u00e2mbio de conhecimentos que a vida acad\u00eamica pode propiciar; 3. constituir-se em uma inst\u00e2ncia de cr\u00edtica e revigoramento rec\u00edprocos para o meio acad\u00eamico e art\u00edstico e cultural, favorecendo uma presen\u00e7a propositiva da Universidade na sociedade brasileira; 4. buscar o n\u00edvel da excel\u00eancia acad\u00eamica na pesquisa art\u00edstica, cultural e cient\u00edfica; 5. incentivar o di\u00e1logo das artes visuais com outras \u00e1reas da produ\u00e7\u00e3o cultural e cient\u00edfica e 6. formar um p\u00fablico leitor na \u00e1rea especializada da arte e da cultura, p\u00fablico ainda incipiente no ambiente brasileiro.^lpt", "The Ars mission is: (1) To qualify Brazilian cultural and artistic production in general; (2) To provide a privileged arena for the debate and exchange of knowledge, to both beginners and distinguished artists, art teachers and researchers, working in Brazil or abroad; (3) To bring about a locus of mutual criticism and strenghtening for both the academic and the artistic and cultural milieu, thus stimulating the University towards an assertive role in Brazilian society; (4) To pursue the level of academic excellence in the artistic, cultural and cientific areas of research; (5) To stimulate the dialogue between the visual arts and other cultural and scientific areas and (6). To build a public interested in the specific areas of art and culture, a task still to be consolidated in the Brazilian context.^len"], "51": ["^a20100000^bC"], "50": ["C"], "35": ["PRINT"], "941": ["20101006"], "935": ["1678-5320"], "350": ["pt"], "942": ["20100427"]}
-]
View
2  scielomanager/utils/clean.sql
@@ -4,13 +4,13 @@ delete from journalmanager_sectiontitle;
delete from journalmanager_section;
delete from journalmanager_journalstudyarea;
delete from journalmanager_journalmission;
-delete from journalmanager_journalhist;
delete from journalmanager_journaltitle;
delete from journalmanager_journal_collections;
delete from journalmanager_journal_languages;
delete from journalmanager_journalpublicationevents;
delete from journalmanager_journal_publisher;
delete from journalmanager_journal_sponsor;
+delete from journalmanager_journal_abstract_keyword_languages;
delete from journalmanager_journal;
delete from journalmanager_publisher_collections;
delete from journalmanager_journal_sponsor;
View
65 scielomanager/utils/journalimport.py
@@ -275,8 +275,19 @@ def load_title(self, journal, titles, category):
journal.journaltitle_set.add(title)
self.charge_summary("title")
- def load_use_license(self):
- return UseLicense.objects.get_or_create(license_code='###PLACEBO###')[0]
+ def load_use_license(self,code, disclaimer):
+
+ expanded_disclaimer = subfield.expand(disclaimer)
+ parsed_subfields_disclaimer = dict(expanded_disclaimer)
+
+ use_license = UseLicense.objects.get_or_create(license_code=code)[0]
+
+ if parsed_subfields_disclaimer.has_key('t'):
+ use_license.disclaimer = parsed_subfields_disclaimer['t']
+
+ use_license.save()
+
+ return use_license
def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
"""
@@ -287,9 +298,19 @@ def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
issn_type=""
print_issn=""
electronic_issn=""
- use_license = self.load_use_license()
+
+ # Creating use license codes.
+ license_code = ""
+ license_disclaimer = ""
+ if record.has_key('541'):
+ license_code = record['541'][0]
+ if record.has_key('540'):
+ license_disclaimer = record['540'][0]
+ use_license = self.load_use_license(license_code,license_disclaimer)
+
journal = Journal()
+ # ISSN and Other Complex Stuffs from the old version
if record['35'][0] == "PRINT":
issn_type="print"
print_issn = record['935'][0]
@@ -303,37 +324,58 @@ def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
issn_type="print"
print_issn = record['400'][0]
- journal.title = record['100'][0]
- journal.short_title = record['150'][0]
- journal.acronym = record['930'][0]
journal.scielo_issn = issn_type
journal.print_issn = print_issn
journal.eletronic_issn = electronic_issn
+
+ # Journal Original Title
+ journal.title = record['100'][0]
+
+ # Short Title
+ journal.short_title = record['150'][0]
+
+ # Acronym
+ journal.acronym = record['930'][0]
+
+ # Use License
journal.use_license = use_license
+
+ # Subject Descriptors
journal.subject_descriptors = '\n'.join(record['440']).lower()
+ # Indexing Coverage
if record.has_key('450'):
journal.index_coverage = '\n'.join(record['450']).lower()
+ # Copyright
+ if record.has_key('62'):
+ journal.copyrighter = record['62'][0]
+
# Text Language
if record.has_key('301'):
journal.init_year = record['301'][0]
+ # Initial Volume
if record.has_key('302'):
journal.init_vol = record['302'][0]
+ # Initial Number
if record.has_key('303'):
journal.init_num = record['303'][0]
+ # Final Year
if record.has_key('304'):
journal.final_year = record['304'][0]
+ # Final Volumen
if record.has_key('305'):
journal.final_vol = record['305'][0]
+ # Final Number
if record.has_key('306'):
journal.final_num = record['306'][0]
+ # Publication Frequency
if record.has_key('380'):
journal.frequency = record['380'][0]
@@ -373,6 +415,7 @@ def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
if record.has_key('151'):
journal.title_iso = record['151'][0]
+
journal.pub_status_changed_by_id = 1
journal.creator_id = 1
journal.save(force_insert=True)
@@ -385,6 +428,14 @@ def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
journal.sponsor = loaded_sponsor
+ # created date
+ if record.has_key('940'):
+ journal.created = self.iso_format(record['940'][0])
+
+ # updated date
+ if record.has_key('941'):
+ journal.updated = self.iso_format(record['941'][0])
+
# text language
if record.has_key('350'):
self.load_textlanguage(journal,record['350'])
@@ -415,6 +466,8 @@ def load_journal(self, collection, loaded_publisher, loaded_sponsor, record):
if record.has_key('230'):
self.load_title(journal,record['230'],'paralleltitle')
+ journal.save()
+
return journal
def run_import(self, json_file, collection):
Please sign in to comment.
Something went wrong with that request. Please try again.