Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P381
deposit-client: metadata xml generated from new cli flags
Active
Public
Actions
Authored by
ardumont
on Apr 16 2019, 5:06 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
SWORD deposit
Subscribers
None
$
ipython
Python
3.7
.
2
+
(
default
,
Feb
2
2019
,
14
:
31
:
48
)
Type
'copyright'
,
'credits'
or
'license'
for
more
information
IPython
7.2
.
0
--
An
enhanced
Interactive
Python
.
Type
'?'
for
help
.
In
[
1
]:
import
logging
In
[
2
]:
logging
.
basicConfig
(
level
=
logging
.
DEBUG
)
In
[
3
]:
from
swh.deposit.cli.deposit
import
generate_metadata_file
;
name
=
'some-awesome-tool'
;
author0
=
'Antoine R. Dumont (@ardumont)'
;
author1
=
'Morane G.'
;
authors
=
[
author1
,
author0
];
path
=
generate_metadata_file
(
name
,
authors
)
DEBUG
:
root
:
Temporary
file
:
/
tmp
/
swh
.
deposit
.
cli
.
m79wstvz
DEBUG
:
root
:
Metadata
dict
to
generate
as
xml
:
{
'entry'
:
{
'@xmlns'
:
'http://www.w3.org/2005/Atom'
,
'@xmlns:codemeta'
:
'https://doi.org/10.5063/SCHEMA/CODEMETA-2.0'
,
'codemeta:name'
:
'some-awesome-tool'
,
'codemeta:author'
:
[{
'codemeta:name'
:
'Morane G.'
},
{
'codemeta:name'
:
'Antoine R. Dumont (@ardumont)'
}]}}
DEBUG
:
root
:
Metadata
dict
as
xml
generated
:
<
?
xml
version
=
"1.0"
encoding
=
"utf-8"
?
>
<
entry
xmlns
=
"http://www.w3.org/2005/Atom"
xmlns
:
codemeta
=
"https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"
>
<
codemeta
:
name
>
some
-
awesome
-
tool
</
codemeta
:
name
>
<
codemeta
:
author
>
<
codemeta
:
name
>
Morane
G
.</
codemeta
:
name
>
</
codemeta
:
author
>
<
codemeta
:
author
>
<
codemeta
:
name
>
Antoine
R
.
Dumont
(
@ardumont
)
</
codemeta
:
name
>
</
codemeta
:
author
>
</
entry
>
Event Timeline
ardumont
created this paste.
Apr 16 2019, 5:06 PM
2019-04-16 17:06:05 (UTC+2)
ardumont
edited the content of this paste.
(Show Details)
ardumont
mentioned this in
D1419: cli.deposit: Add mandatory flags to generate the metadata xml
.
Apr 16 2019, 5:10 PM
2019-04-16 17:10:25 (UTC+2)
ardumont
edited the content of this paste.
(Show Details)
Apr 16 2019, 5:16 PM
2019-04-16 17:16:24 (UTC+2)
Comment Actions
Related
D1419
ardumont
changed the title of this paste from
metadata xml generated from new cli flags
to
deposit-client: metadata xml generated from new cli flags
.
Apr 16 2019, 5:16 PM
2019-04-16 17:16:56 (UTC+2)
ardumont
updated the paste's language from
autodetect
to
python
.
Log In to Comment