Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
bc78f8c5
Commit
bc78f8c5
authored
Sep 24, 2015
by
LE GAC Renaud
Browse files
Propagate the method get_record_by_fields to all automatons.
parent
e7cedef0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
46 deletions
+46
-46
modules/harvest_tools/notes.py
modules/harvest_tools/notes.py
+7
-7
modules/harvest_tools/preprints.py
modules/harvest_tools/preprints.py
+8
-8
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+13
-13
modules/harvest_tools/reports.py
modules/harvest_tools/reports.py
+6
-6
modules/harvest_tools/talks.py
modules/harvest_tools/talks.py
+5
-5
modules/harvest_tools/thesis.py
modules/harvest_tools/thesis.py
+7
-7
No files found.
modules/harvest_tools/notes.py
View file @
bc78f8c5
...
...
@@ -72,13 +72,13 @@ class Notes(Automaton):
year
=
record
.
year
()
# get existing notes
rec_id
,
status
=
self
.
get_by_fields
(
first_author
=
first_author
,
id_categories
=
self
.
id_category
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
first_author
=
first_author
,
id_categories
=
self
.
id_category
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
modules/harvest_tools/preprints.py
View file @
bc78f8c5
...
...
@@ -99,14 +99,14 @@ class Preprints(Automaton):
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# get existing preprint or article
rec_id
,
status
=
self
.
get_by_fields
(
first_author
=
first_author
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
preprint
=
preprint
,
submitted
=
submitted
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
first_author
=
first_author
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
preprint
=
preprint
,
submitted
=
submitted
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
modules/harvest_tools/proceedings.py
View file @
bc78f8c5
...
...
@@ -102,19 +102,19 @@ class Proceedings(Automaton):
id_publisher
=
self
.
get_create_publisher
(
editor
)
# get an already published proceeding
rec_id
,
status
=
self
.
get_by_fields
(
authors
=
authors
,
conference_title
=
conference_title
,
first_author
=
first_author
,
id_publishers
=
id_publisher
,
oai_url
=
oai_url
,
preprint
=
preprint
,
pages
=
pages
,
publication_url
=
url
,
report_numbers
=
report_numbers
,
submitted
=
submitted
,
volume
=
volume
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
authors
=
authors
,
conference_title
=
conference_title
,
first_author
=
first_author
,
id_publishers
=
id_publisher
,
oai_url
=
oai_url
,
preprint
=
preprint
,
pages
=
pages
,
publication_url
=
url
,
report_numbers
=
report_numbers
,
submitted
=
submitted
,
volume
=
volume
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
modules/harvest_tools/reports.py
View file @
bc78f8c5
...
...
@@ -91,12 +91,12 @@ class Reports(Automaton):
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# get an already published reports
rec_id
,
status
=
self
.
get_by_fields
(
id_categories
=
self
.
id_category
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
id_categories
=
self
.
id_category
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
modules/harvest_tools/talks.py
View file @
bc78f8c5
...
...
@@ -84,11 +84,11 @@ class Talks(Automaton):
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# get an already published talk
rec_id
,
status
=
self
.
get_by_fields
(
conference_title
=
conference_title
,
first_author
=
first_author
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
conference_title
=
conference_title
,
first_author
=
first_author
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
modules/harvest_tools/thesis.py
View file @
bc78f8c5
...
...
@@ -88,13 +88,13 @@ class Thesis(Automaton):
year
=
re
.
search
(
r
"(\d\d\d\d)"
,
defense_date
).
group
(
1
)
# get an already published thesis
rec_id
,
status
=
self
.
get_by_fields
(
first_author
=
first_author
,
defense
=
defense_date
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
rec_id
,
status
=
self
.
get_
record_
by_fields
(
first_author
=
first_author
,
defense
=
defense_date
,
id_projects
=
self
.
id_project
,
id_teams
=
self
.
id_team
,
oai_url
=
oai_url
,
title
=
title
,
year
=
year
)
if
rec_id
:
return
status
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment