Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gepetto Utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
Gepetto Utils
Commits
a8e3388e
Commit
a8e3388e
authored
9 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
voilà™
parent
772811e2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
db.py
+48
-3
48 additions, 3 deletions
db.py
gepetto.bib
+5699
-0
5699 additions, 0 deletions
gepetto.bib
projects
+1
-0
1 addition, 0 deletions
projects
with
5750 additions
and
3 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
a8e3388e
bib
diffs
This diff is collapsed.
Click to expand it.
db.py
+
48
−
3
View file @
a8e3388e
...
...
@@ -15,8 +15,28 @@ HAL_RE = [
lambda
g
:
'
hal-%08i
'
%
int
(
g
.
replace
(
'
/
'
,
''
))),
]
HAL_KEYS
=
[
'
url
'
,
'
link
'
,
'
pdf
'
,
'
video
'
]
HAL_DICT
=
{}
USELESS_KEYS
=
{
'
hal_local_reference
'
,
'
hal_version
'
,
'
address
'
,
'
note
'
,
'
month
'
}
TEAM_NAMES
=
{
'
ad
'
:
[
'
del prete
'
],
'
ao
'
:
[
'
orthey
'
],
'
bt
'
:
[
'
tondu
'
],
'
cv
'
:
[
'
vassallo
'
],
'
fl
'
:
[
'
lamiraux
'
,
'
perrin
'
,
'
dalibard
'
],
'
gs
'
:
[
'
saurel
'
],
'
jpl
'
:
[
'
laumond
'
],
'
mc
'
:
[
'
campana
'
],
'
mt
'
:
[
'
taïx
'
,
'
ta{
\\
"
i}x
'
],
'
nm
'
:
[
'
mansard
'
,
'
ramos
'
,
'
sol{
\\
`a}
'
],
'
or
'
:
[
'
roussel
'
],
'
os
'
:
[
'
stasse
'
],
'
psa
'
:
[
'
salaris
'
],
'
ps
'
:
[
'
souères
'
,
'
sou{
\\
`e}res
'
],
'
st
'
:
[
'
tonneau
'
],
'
test
'
:
[
'
test
'
],
}
def
parse_hal_id
(
entry
):
"""
Tries to find HAL_ID in an entry
"""
...
...
@@ -49,6 +69,7 @@ def check_hal(entry, hal_db):
hal_id
=
parse_hal_id
(
entry
)
if
not
hal_id
:
return
HAL_DICT
[
hal_id
]
=
entry
hal_entry
=
get_hal_entry
(
hal_id
,
hal_db
)
keys
=
(
set
(
entry
.
keys
())
|
set
(
hal_entry
.
keys
()))
-
USELESS_KEYS
for
key
in
keys
:
...
...
@@ -56,12 +77,36 @@ def check_hal(entry, hal_db):
print
(
'
IN HAL for %s: %s = {%s},
'
%
(
entry
[
'
ID
'
],
key
,
hal_entry
[
key
]))
def
header
(
title
,
lvl
=
1
):
c
=
'
=
'
if
lvl
==
1
else
'
*
'
if
lvl
==
2
else
'
-
'
print
(
c
*
20
,
'
{:^20}
'
.
format
(
title
),
c
*
20
)
if
__name__
==
'
__main__
'
:
with
open
(
'
hal.bib
'
)
as
hal_file
:
hal_db
=
load
(
hal_file
)
dbs
=
{}
not_in_dbs
=
{
key
:
[]
for
key
in
TEAM_NAMES
.
keys
()}
for
path
in
Path
(
'
bib
'
).
glob
(
'
*.bib
'
):
print
(
'
==== {:^15} ====
'
.
format
(
path
.
name
)
)
header
(
path
.
name
)
with
path
.
open
()
as
f
:
db
=
load
(
f
)
for
entry
in
db
.
entries
:
db
s
[
path
.
stem
]
=
load
(
f
)
for
entry
in
db
s
[
path
.
stem
]
.
entries
:
check_hal
(
entry
,
hal_db
)
with
open
(
'
gepetto.bib
'
)
as
gepetto_file
:
gepetto_db
=
load
(
gepetto_file
)
for
entry
in
hal_db
.
entries
:
if
entry
[
'
hal_id
'
]
in
HAL_DICT
:
continue
for
initials
,
names
in
TEAM_NAMES
.
items
():
if
any
(
name
in
entry
[
'
author
'
].
lower
()
for
name
in
names
):
not_in_dbs
[
initials
].
append
((
entry
[
'
link
'
],
entry
[
'
title
'
]))
break
else
:
print
(
'
IN HAL ??:
'
,
entry
[
'
hal_id
'
],
entry
[
'
author
'
])
for
initials
,
names
in
TEAM_NAMES
.
items
():
if
not_in_dbs
[
initials
]:
header
(
names
[
0
])
with
open
(
'
diffs/%s.txt
'
%
initials
,
'
w
'
)
as
f
:
for
url
,
title
in
not_in_dbs
[
initials
]:
print
(
url
,
title
,
file
=
f
)
This diff is collapsed.
Click to expand it.
gepetto.bib
0 → 100644
+
5699
−
0
View file @
a8e3388e
This diff is collapsed.
Click to expand it.
projects
0 → 120000
+
1
−
0
View file @
a8e3388e
/www/html/projects/gepetto/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment