hal_openscience 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +12 -10
- data/config/locales/fr.yml +194 -0
- data/lib/hal_openscience/engine.rb +2 -0
- data/lib/hal_openscience/resources/document.rb +77 -0
- data/lib/hal_openscience/version.rb +1 -1
- data/lib/hal_openscience.rb +8 -1
- metadata +5 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bd8e1e65d2db77c206fa6fa2c5bde497ce87527589dfa61b04246ee34f594f6
|
|
4
|
+
data.tar.gz: deffedb873270b0ce6eb2331a5cc89c7378ae226b677ba6cdf3aa7f7f012fcaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0360c9085408ca4c666792c87b40f3f20269c8a54fb29b461126cf74eeb85565dd23c747a3012c215d7520cce515f808e2ff4886b022597a681aadd5a072a49c
|
|
7
|
+
data.tar.gz: b27ebfde9a965b00699fd1d88ab8c8944a653deffd5194a43b280e0b1285ee6ae561b02b7bd859d158effb50de96659856c311f02ea0ed03589413ebbeaeac4a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hal_openscience (
|
|
4
|
+
hal_openscience (1.0.0)
|
|
5
5
|
json
|
|
6
6
|
net-http
|
|
7
7
|
open-uri
|
|
@@ -9,22 +9,24 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
date (3.
|
|
13
|
-
json (2.
|
|
14
|
-
net-http (0.
|
|
15
|
-
uri
|
|
16
|
-
open-uri (0.
|
|
12
|
+
date (3.5.1)
|
|
13
|
+
json (2.18.0)
|
|
14
|
+
net-http (0.9.1)
|
|
15
|
+
uri (>= 0.11.1)
|
|
16
|
+
open-uri (0.5.0)
|
|
17
17
|
stringio
|
|
18
18
|
time
|
|
19
19
|
uri
|
|
20
|
-
rake (13.
|
|
21
|
-
stringio (3.0
|
|
22
|
-
time (0.2
|
|
20
|
+
rake (13.3.1)
|
|
21
|
+
stringio (3.2.0)
|
|
22
|
+
time (0.4.2)
|
|
23
23
|
date
|
|
24
|
-
uri (
|
|
24
|
+
uri (1.1.1)
|
|
25
25
|
|
|
26
26
|
PLATFORMS
|
|
27
27
|
arm64-darwin-22
|
|
28
|
+
arm64-darwin-25
|
|
29
|
+
x86_64-darwin-24
|
|
28
30
|
|
|
29
31
|
DEPENDENCIES
|
|
30
32
|
hal_openscience!
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
fr:
|
|
2
|
+
hal_openscience:
|
|
3
|
+
document:
|
|
4
|
+
subtype:
|
|
5
|
+
ARTREV:
|
|
6
|
+
one: Article de synthèse
|
|
7
|
+
other: Articles de synthèse
|
|
8
|
+
BOOKREVIEW:
|
|
9
|
+
one: Compte-rendu de lecture
|
|
10
|
+
other: Compte-rendus de lecture
|
|
11
|
+
CRIT:
|
|
12
|
+
one: Édition critique
|
|
13
|
+
other: Éditions critiques
|
|
14
|
+
DATAPAPER:
|
|
15
|
+
one: Data paper
|
|
16
|
+
other: Data papers
|
|
17
|
+
DICTIONAR:
|
|
18
|
+
one: Dictionnaire ou encyclopédie
|
|
19
|
+
other: Dictionnaires ou encyclopédies
|
|
20
|
+
DMP:
|
|
21
|
+
one: Plan de gestion de données
|
|
22
|
+
other: Plans de gestion de données
|
|
23
|
+
DRAWING:
|
|
24
|
+
one: Dessin
|
|
25
|
+
other: Dessins
|
|
26
|
+
EXPERTREPORT:
|
|
27
|
+
one: Rapport d’expertise
|
|
28
|
+
other: Rapports d’expertise
|
|
29
|
+
FUNDREPORT:
|
|
30
|
+
one: Rapport de contrat, de projet / Rapport de fin de contrat / Rapport au financeur
|
|
31
|
+
other: Rapports de contrat, de projet / Rapports de fin de contrat / Rapports au financeur
|
|
32
|
+
GRAPHICS:
|
|
33
|
+
one: Image de synthèse
|
|
34
|
+
other: Images de synthèse
|
|
35
|
+
GRAVURE:
|
|
36
|
+
one: Gravure
|
|
37
|
+
other: Gravures
|
|
38
|
+
ILLUSTRATION:
|
|
39
|
+
one: Illustration
|
|
40
|
+
other: Illustrations
|
|
41
|
+
MANUAL:
|
|
42
|
+
one: Manuel
|
|
43
|
+
other: Manuels
|
|
44
|
+
PHOTOGRAPHY:
|
|
45
|
+
one: Photographie
|
|
46
|
+
other: Photographies
|
|
47
|
+
PREPRINT:
|
|
48
|
+
one: Preprints/Prepublications
|
|
49
|
+
other: Preprints/Prepublications
|
|
50
|
+
RESREPORT:
|
|
51
|
+
one: Rapport de recherche
|
|
52
|
+
other: Rapports de recherche
|
|
53
|
+
SYNTOUV:
|
|
54
|
+
one: Ouvrage de synthèse
|
|
55
|
+
other: Ouvrages de synthèse
|
|
56
|
+
TECHREPORT:
|
|
57
|
+
one: Rapport technique
|
|
58
|
+
other: Rapports techniques
|
|
59
|
+
WORKINGPAPER:
|
|
60
|
+
one: Working paper
|
|
61
|
+
other: Working papers
|
|
62
|
+
type:
|
|
63
|
+
ART:
|
|
64
|
+
one: Article dans une revue
|
|
65
|
+
other: Articles dans une revue
|
|
66
|
+
BLOG:
|
|
67
|
+
one: Article de blog scientifique
|
|
68
|
+
other: Articles de blog scientifique
|
|
69
|
+
COMM:
|
|
70
|
+
one: Communication dans un congrès
|
|
71
|
+
other: Communications dans un congrès
|
|
72
|
+
COUV:
|
|
73
|
+
one: Chapitre d'ouvrage
|
|
74
|
+
other: Chapitres d'ouvrages
|
|
75
|
+
CREPORT:
|
|
76
|
+
one: Chapitre de rapport
|
|
77
|
+
other: Chapitres de rapports
|
|
78
|
+
ETABTHESE:
|
|
79
|
+
one: Thèse d'établissement
|
|
80
|
+
other: Thèses d'établissement
|
|
81
|
+
HDR:
|
|
82
|
+
one: Habilitation à Diriger des Recherches (HDR)
|
|
83
|
+
other: Habilitations à Diriger des Recherches (HDR)
|
|
84
|
+
IMG:
|
|
85
|
+
one: Image
|
|
86
|
+
other: Images
|
|
87
|
+
ISSUE:
|
|
88
|
+
one: Numéro spécial de revue / Numéro thématique de revue / Dossier
|
|
89
|
+
other: Numéros spéciaux de revue / Numéros thématiques de revue / Dossiers
|
|
90
|
+
LECTURE:
|
|
91
|
+
one: Cours
|
|
92
|
+
other: Cours
|
|
93
|
+
MAP:
|
|
94
|
+
one: Carte
|
|
95
|
+
other: Cartes
|
|
96
|
+
MEM:
|
|
97
|
+
one: Mémoire d'étudiant
|
|
98
|
+
other: Mémoires d'étudiant
|
|
99
|
+
MEMLIC:
|
|
100
|
+
one: Mémoire de licence
|
|
101
|
+
other: Mémoires de licence
|
|
102
|
+
NOTE:
|
|
103
|
+
one: Note de lecture
|
|
104
|
+
other: Notes de lecture
|
|
105
|
+
NOTICE:
|
|
106
|
+
one: Notice d’encyclopédie ou de dictionnaire
|
|
107
|
+
other: Notices d’encyclopédie ou de dictionnaire
|
|
108
|
+
OTHER:
|
|
109
|
+
one: Autre publication scientifique
|
|
110
|
+
other: Autres publications scientifiques
|
|
111
|
+
OTHERREPORT:
|
|
112
|
+
one: Autre rapport, séminaire, workshop
|
|
113
|
+
other: Autres rapports, séminaires, workshops
|
|
114
|
+
OUV:
|
|
115
|
+
one: Ouvrage / Monographie / Livre
|
|
116
|
+
other: Ouvrages / Monographies / Livres
|
|
117
|
+
PATENT:
|
|
118
|
+
one: Brevet
|
|
119
|
+
other: Brevets
|
|
120
|
+
POSTER:
|
|
121
|
+
one: Poster de conférence
|
|
122
|
+
other: Posters de conférences
|
|
123
|
+
PRESCONF:
|
|
124
|
+
one: Document associé à des manifestations scientifiques
|
|
125
|
+
other: Documents associés à des manifestations scientifiques
|
|
126
|
+
PROCEEDINGS:
|
|
127
|
+
one: Proceedings/recueil des communications
|
|
128
|
+
other: Proceedings/recueil des communications
|
|
129
|
+
REPACT:
|
|
130
|
+
one: Rapport d'activité
|
|
131
|
+
other: Rapports d'activité
|
|
132
|
+
REPORT:
|
|
133
|
+
one: Rapport
|
|
134
|
+
other: Rapports
|
|
135
|
+
REPORT_COOR:
|
|
136
|
+
one: Rapport d’évaluation d’une coordination territoriale
|
|
137
|
+
other: Rapports d’évaluation d’une coordination territoriale
|
|
138
|
+
REPORT_DOCT:
|
|
139
|
+
one: Rapport d’évaluation d’une école doctorale
|
|
140
|
+
other: Rapports d’évaluation d’une école doctorale
|
|
141
|
+
REPORT_ETAB:
|
|
142
|
+
one: Rapport d’évaluation d’un établissement
|
|
143
|
+
other: Rapports d’évaluation d’un établissement
|
|
144
|
+
REPORT_FORM:
|
|
145
|
+
one: Rapport d’évaluation d’un champ formations
|
|
146
|
+
other: Rapports d’évaluation d’un champ formations
|
|
147
|
+
REPORT_FPROJ:
|
|
148
|
+
one: Rapport d’un champ (domaine) de formations (projet)
|
|
149
|
+
other: Rapports d’un champ (domaine) de formations (projet)
|
|
150
|
+
REPORT_GLICE:
|
|
151
|
+
one: Rapport d’évaluation d’un grade licence
|
|
152
|
+
other: Rapports d’évaluation d’un grade licence
|
|
153
|
+
REPORT_GMAST:
|
|
154
|
+
one: Rapport d’évaluation d’un grade master
|
|
155
|
+
other: Rapports d’évaluation d’un grade master
|
|
156
|
+
REPORT_LABO:
|
|
157
|
+
one: Rapport d’évaluation d’une entité de recherche
|
|
158
|
+
other: Rapports d’évaluation d’une entité de recherche
|
|
159
|
+
REPORT_LICE:
|
|
160
|
+
one: Rapport d’évaluation d’une licence
|
|
161
|
+
other: Rapports d’évaluation d’une licence
|
|
162
|
+
REPORT_LPRO:
|
|
163
|
+
one: Rapport d’évaluation d’une licence professionnelle
|
|
164
|
+
other: Rapports d’évaluation d’une licence professionnelle
|
|
165
|
+
REPORT_MAST:
|
|
166
|
+
one: Rapport d’évaluation d’un master
|
|
167
|
+
other: Rapports d’évaluation d’un master
|
|
168
|
+
REPORT_RETABINT:
|
|
169
|
+
one: Rapport d’évaluation/accréditation d’un établissement étranger
|
|
170
|
+
other: Rapports d’évaluation/accréditation d’un établissement étranger
|
|
171
|
+
REPORT_RFOINT:
|
|
172
|
+
one: Rapport d’évaluation/accréditation d’une formation étrangère
|
|
173
|
+
other: Rapports d’évaluation/accréditation d’une formation étrangère
|
|
174
|
+
SOFTWARE:
|
|
175
|
+
one: Logiciel / Code source de logiciel
|
|
176
|
+
other: Logiciels / Code source de logiciels
|
|
177
|
+
SON:
|
|
178
|
+
one: Son
|
|
179
|
+
other: Sons
|
|
180
|
+
SYNTHESE:
|
|
181
|
+
one: Note de synthèse
|
|
182
|
+
other: Notes de synthèse
|
|
183
|
+
THESE:
|
|
184
|
+
one: Thèse
|
|
185
|
+
other: Thèses
|
|
186
|
+
TRAD:
|
|
187
|
+
one: Traduction
|
|
188
|
+
other: Traductions
|
|
189
|
+
UNDEFINED:
|
|
190
|
+
one: Pré-publication, Document de travail
|
|
191
|
+
other: Pré-publications, Documents de travail
|
|
192
|
+
VIDEO:
|
|
193
|
+
one: Vidéo
|
|
194
|
+
other: Vidéos
|
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
module HalOpenscience
|
|
2
2
|
class Document < BaseResource
|
|
3
|
+
TYPES = [
|
|
4
|
+
'ART',
|
|
5
|
+
'COMM',
|
|
6
|
+
'COUV',
|
|
7
|
+
'THESE',
|
|
8
|
+
'OUV',
|
|
9
|
+
'MEM',
|
|
10
|
+
'UNDEFINED',
|
|
11
|
+
'POSTER',
|
|
12
|
+
'REPORT',
|
|
13
|
+
'OTHER',
|
|
14
|
+
'IMG',
|
|
15
|
+
'ISSUE',
|
|
16
|
+
'PROCEEDINGS',
|
|
17
|
+
'NOTICE',
|
|
18
|
+
'BLOG',
|
|
19
|
+
'HDR',
|
|
20
|
+
'PATENT',
|
|
21
|
+
'VIDEO',
|
|
22
|
+
'REPORT_LABO',
|
|
23
|
+
'LECTURE',
|
|
24
|
+
'TRAD',
|
|
25
|
+
'REPORT_MAST',
|
|
26
|
+
'REPORT_LPRO',
|
|
27
|
+
'REPORT_LICE',
|
|
28
|
+
'SOFTWARE',
|
|
29
|
+
'PRESCONF',
|
|
30
|
+
'CREPORT',
|
|
31
|
+
'SON',
|
|
32
|
+
'REPORT_DOCT',
|
|
33
|
+
'MAP',
|
|
34
|
+
'REPORT_ETAB',
|
|
35
|
+
'REPORT_FORM',
|
|
36
|
+
'REPORT_GMAST',
|
|
37
|
+
'NOTE',
|
|
38
|
+
'SYNTHESE',
|
|
39
|
+
'REPORT_FPROJ',
|
|
40
|
+
'REPORT_GLICE',
|
|
41
|
+
'ETABTHESE',
|
|
42
|
+
'REPACT',
|
|
43
|
+
'MEMLIC',
|
|
44
|
+
'REPORT_RFOINT',
|
|
45
|
+
'REPORT_COOR',
|
|
46
|
+
'REPORT_RETABINT',
|
|
47
|
+
'OTHERREPORT'
|
|
48
|
+
].freeze
|
|
49
|
+
|
|
50
|
+
SUBTYPES = [
|
|
51
|
+
'PHOTOGRAPHY',
|
|
52
|
+
'RESREPORT',
|
|
53
|
+
'BOOKREVIEW',
|
|
54
|
+
'ARTREV',
|
|
55
|
+
'TECHREPORT',
|
|
56
|
+
'ILLUSTRATION',
|
|
57
|
+
'DATAPAPER',
|
|
58
|
+
'WORKINGPAPER',
|
|
59
|
+
'PREPRINT',
|
|
60
|
+
'FUNDREPORT',
|
|
61
|
+
'GRAPHICS',
|
|
62
|
+
'EXPERTREPORT',
|
|
63
|
+
'SYNTOUV',
|
|
64
|
+
'CRIT',
|
|
65
|
+
'MANUAL',
|
|
66
|
+
'DRAWING',
|
|
67
|
+
'GRAVURE',
|
|
68
|
+
'DICTIONAR',
|
|
69
|
+
'DMP'
|
|
70
|
+
].freeze
|
|
71
|
+
|
|
72
|
+
SUBTYPES_PER_TYPE = {
|
|
73
|
+
'ART' => ['ARTREV', 'DATAPAPER', 'BOOKREVIEW'],
|
|
74
|
+
'IMG' => ['DRAWING', 'GRAVURE', 'ILLUSTRATION', 'GRAPHICS', 'PHOTOGRAPHY'],
|
|
75
|
+
'OUV' => ['SYNTOUV', 'MANUAL', 'DICTIONAR', 'CRIT'],
|
|
76
|
+
'UNDEFINED' => ['PREPRINT', 'WORKINGPAPER'],
|
|
77
|
+
'REPORT' => ['RESREPORT', 'TECHREPORT', 'FUNDREPORT', 'EXPERTREPORT', 'DMP']
|
|
78
|
+
}
|
|
79
|
+
|
|
3
80
|
def self.repository_url
|
|
4
81
|
"#{HalOpenscience::BASE_URL}/search/"
|
|
5
82
|
end
|
data/lib/hal_openscience.rb
CHANGED
|
@@ -4,10 +4,17 @@ require "json"
|
|
|
4
4
|
require "net/http"
|
|
5
5
|
require "open-uri"
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Try to load Railties to check if we are in a Rails environment
|
|
8
|
+
begin
|
|
9
|
+
require "railties"
|
|
10
|
+
rescue LoadError
|
|
11
|
+
# Not in a Rails environment
|
|
12
|
+
end
|
|
8
13
|
|
|
14
|
+
require "hal_openscience/version"
|
|
9
15
|
require "hal_openscience/response"
|
|
10
16
|
require "hal_openscience/resources"
|
|
17
|
+
require "hal_openscience/engine" if defined?(Rails::Engine)
|
|
11
18
|
|
|
12
19
|
module HalOpenscience
|
|
13
20
|
BASE_URL = "https://api.archives-ouvertes.fr"
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hal_openscience
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sébastien Gaya
|
|
8
8
|
- Arnaud Levy
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: json
|
|
@@ -53,7 +52,6 @@ dependencies:
|
|
|
53
52
|
- - ">="
|
|
54
53
|
- !ruby/object:Gem::Version
|
|
55
54
|
version: '0'
|
|
56
|
-
description:
|
|
57
55
|
email:
|
|
58
56
|
- sebastien.gaya@noesya.coop
|
|
59
57
|
- arnaud.levy@noesya.coop
|
|
@@ -68,8 +66,10 @@ files:
|
|
|
68
66
|
- LICENSE.txt
|
|
69
67
|
- README.md
|
|
70
68
|
- Rakefile
|
|
69
|
+
- config/locales/fr.yml
|
|
71
70
|
- hal_openscience.gemspec
|
|
72
71
|
- lib/hal_openscience.rb
|
|
72
|
+
- lib/hal_openscience/engine.rb
|
|
73
73
|
- lib/hal_openscience/resources.rb
|
|
74
74
|
- lib/hal_openscience/resources/author.rb
|
|
75
75
|
- lib/hal_openscience/resources/base_resource.rb
|
|
@@ -83,7 +83,6 @@ metadata:
|
|
|
83
83
|
homepage_uri: https://github.com/noesya/hal_openscience
|
|
84
84
|
source_code_uri: https://github.com/noesya/hal_openscience
|
|
85
85
|
changelog_uri: https://github.com/noesya/hal_openscience/blob/main/CHANGELOG.md
|
|
86
|
-
post_install_message:
|
|
87
86
|
rdoc_options: []
|
|
88
87
|
require_paths:
|
|
89
88
|
- lib
|
|
@@ -98,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
98
97
|
- !ruby/object:Gem::Version
|
|
99
98
|
version: '0'
|
|
100
99
|
requirements: []
|
|
101
|
-
rubygems_version:
|
|
102
|
-
signing_key:
|
|
100
|
+
rubygems_version: 4.0.3
|
|
103
101
|
specification_version: 4
|
|
104
102
|
summary: API wrapper for HAL OpenScience
|
|
105
103
|
test_files: []
|