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
f9bfd171
Commit
f9bfd171
authored
Sep 21, 2015
by
LE GAC Renaud
Browse files
Rename the class PublicationsTool to Automaton.
parent
7c9997ac
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
39 deletions
+39
-39
controllers/harvest.py
controllers/harvest.py
+13
-13
modules/harvest_tools/__init__.py
modules/harvest_tools/__init__.py
+2
-2
modules/harvest_tools/articles.py
modules/harvest_tools/articles.py
+4
-4
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+2
-2
modules/harvest_tools/notes.py
modules/harvest_tools/notes.py
+3
-3
modules/harvest_tools/preprints.py
modules/harvest_tools/preprints.py
+3
-3
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+3
-3
modules/harvest_tools/reports.py
modules/harvest_tools/reports.py
+3
-3
modules/harvest_tools/talks.py
modules/harvest_tools/talks.py
+3
-3
modules/harvest_tools/thesis.py
modules/harvest_tools/thesis.py
+3
-3
No files found.
controllers/harvest.py
View file @
f9bfd171
...
...
@@ -6,10 +6,10 @@ import traceback
from
gluon
import
current
from
gluon.restricted
import
RestrictedError
from
harvest_tools
import
(
format_author_fr
,
family_name_fr
,
from
harvest_tools
import
(
Automaton
,
build_harvester_tool
,
PublicationsTool
,
format_author_fr
,
family_name_fr
,
ToolException
)
from
invenio_tools
import
(
CheckAndFix
,
CheckException
,
...
...
@@ -124,15 +124,15 @@ def edit_insert():
values
=
{}
check
=
CheckAndFix
()
# NOTE
: the publication tool is only require to extract
# the list of my authors
tool
=
Public
at
i
on
sTool
(
db
,
selector
.
id_teams
,
selector
.
id_projects
,
selector
.
controller
,
selector
.
id_categories
,
dry_run
=
True
,
debug
=
False
)
# NOTE
#
publication tool is only require to extract
the list of my authors
tool
=
Autom
aton
(
db
,
selector
.
id_teams
,
selector
.
id_projects
,
selector
.
controller
,
selector
.
id_categories
,
dry_run
=
True
,
debug
=
False
)
# title, preprint, URL, report number
values
[
'PublicationsTitle'
]
=
record
.
title
()
...
...
@@ -387,4 +387,4 @@ def run_all():
return
dict
(
collection_logs
=
collection_logs
,
controller
=
'all harvesters'
,
logs
=
logs
,
selector
=
selector
)
\ No newline at end of file
selector
=
selector
)
modules/harvest_tools/__init__.py
View file @
f9bfd171
...
...
@@ -8,11 +8,11 @@ from base import (DRY_RUN,
format_author_fr
,
ToolException
)
from
automaton
import
Automaton
from
articles
import
Articles
from
factory
import
build_harvester_tool
,
get_harvester_tool
from
msg
import
Msg
from
msgcollection
import
MsgCollection
from
publicationstool
import
PublicationsTool
from
articles
import
Articles
from
notes
import
Notes
from
preprints
import
Preprints
from
proceedings
import
Proceedings
...
...
modules/harvest_tools/articles.py
View file @
f9bfd171
...
...
@@ -5,9 +5,9 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_FIX_ORIGIN
,
MSG_IN_DB
,
MSG_LOAD
from
invenio_tools
import
CheckException
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
...
...
@@ -15,13 +15,13 @@ MSG_NO_EDITOR = "Reject article is not published"
MSG_TRANSFORM_PREPRINT
=
"Transform the preprint into an article"
class
Articles
(
Public
at
i
on
sTool
):
class
Articles
(
Autom
aton
):
"""Publications tool for articles.
"""
def
__init__
(
self
,
*
args
,
**
kwargs
):
Public
at
i
on
sTool
.
__init__
(
self
,
*
args
,
**
kwargs
)
Autom
aton
.
__init__
(
self
,
*
args
,
**
kwargs
)
# the preprint categories
self
.
id_preprint
=
get_id
(
self
.
db
.
categories
,
code
=
"PRE"
)
...
...
@@ -272,7 +272,7 @@ class Articles(PublicationsTool):
@rtype: bool
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/
public
at
i
on
stool
.py
→
modules/harvest_tools/
autom
aton.py
View file @
f9bfd171
# -*- coding: utf-8 -*-
""" harvest_tools.
public
at
i
on
stool
""" harvest_tools.
autom
aton
"""
import
re
...
...
@@ -27,7 +27,7 @@ MSG_NO_OAI = "Reject no OAI identifier"
MSG_WELL_FORM_OAI
=
"Reject OAI is not well formed"
class
Public
at
i
on
sTool
(
object
):
class
Autom
aton
(
object
):
"""Base class to search and process publications.
- Decode the parameter of a selector defining user criteria.
- Search for publications in the store, according to
...
...
modules/harvest_tools/notes.py
View file @
f9bfd171
...
...
@@ -5,13 +5,13 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
class
Notes
(
Public
at
i
on
sTool
):
class
Notes
(
Autom
aton
):
"""Publications tool for notes.
"""
...
...
@@ -74,7 +74,7 @@ class Notes(PublicationsTool):
@rtype: bool
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/preprints.py
View file @
f9bfd171
...
...
@@ -5,9 +5,9 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
,
RecordConf
,
RecordThesis
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
UNDEF_ID
...
...
@@ -17,7 +17,7 @@ MSG_PREPRINT_IS_THESIS = "Reject preprint is a thesis"
MSG_PREPRINT_NO_NUMBER
=
"Reject no preprint number"
class
Preprints
(
Public
at
i
on
sTool
):
class
Preprints
(
Autom
aton
):
"""Publications tool for preprints.
"""
...
...
@@ -86,7 +86,7 @@ class Preprints(PublicationsTool):
@param record:
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/proceedings.py
View file @
f9bfd171
...
...
@@ -5,13 +5,13 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
class
Proceedings
(
Public
at
i
on
sTool
):
class
Proceedings
(
Autom
aton
):
"""Publications tool for conference proceedings.
"""
...
...
@@ -118,7 +118,7 @@ class Proceedings(PublicationsTool):
@rtype: bool
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/reports.py
View file @
f9bfd171
...
...
@@ -5,16 +5,16 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
,
UNKNOWN
MSG_REPORT_NO_NUMBER
=
"Reject no report number"
class
Reports
(
Public
at
i
on
sTool
):
class
Reports
(
Autom
aton
):
"""Publications tool for reports to committee.
"""
...
...
@@ -93,7 +93,7 @@ class Reports(PublicationsTool):
@param record:
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/talks.py
View file @
f9bfd171
...
...
@@ -5,13 +5,13 @@
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
class
Talks
(
Public
at
i
on
sTool
):
class
Talks
(
Autom
aton
):
"""Publications tool for conference talks.
"""
...
...
@@ -86,7 +86,7 @@ class Talks(PublicationsTool):
@rtype: bool
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
if
self
.
dbg
:
...
...
modules/harvest_tools/thesis.py
View file @
f9bfd171
...
...
@@ -6,16 +6,16 @@ import re
import
traceback
from
automaton
import
Automaton
from
base
import
family_name_fr
,
MSG_CRASH
,
MSG_LOAD
from
invenio_tools
import
CheckException
,
RecordThesis
from
publicationstool
import
PublicationsTool
from
plugin_dbui
import
get_id
,
UNDEF_ID
MSG_NO_THESIS
=
"Reject not a thesis record"
class
Thesis
(
Public
at
i
on
sTool
):
class
Thesis
(
Autom
aton
):
"""Publications tool for thesis.
"""
...
...
@@ -84,7 +84,7 @@ class Thesis(PublicationsTool):
@param record:
"""
if
not
Public
at
i
on
sTool
.
select_record
(
self
,
record
):
if
not
Autom
aton
.
select_record
(
self
,
record
):
return
False
try
:
...
...
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