Skip to content

Commit

Permalink
Incluindo carga de áreas do WoS e bases do WoS onde o periódico é ind…
Browse files Browse the repository at this point in the history
…exado, #819
  • Loading branch information
fabiobatalha committed Jun 4, 2014
1 parent a1b0cd1 commit 04db6ed
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scielomanager/tools/import_data/journalimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@


def capitalize(text):
text = str(text).lower()
return text[0].upper()+text[1:]

def capitalize_word(word):
return word[0].upper()+word[1:]

text = ' '.join([capitalize_word(i) for i in str(text).lower().split(' ')])

return text


class JournalImport:
Expand Down Expand Up @@ -447,7 +452,7 @@ def load_journal(self, collection, user, loaded_sponsor, record):

if '854' in record:
for item in record['854']:
capitalized = ' '.join([capitalize(i) for i in item.split(' ')])
capitalized = capitalize(item)
try:
area = SubjectCategory.objects.get(term=capitalized)
except:
Expand Down

0 comments on commit 04db6ed

Please sign in to comment.