Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CERN Digital Memory
bagit-create
Commits
5b228966
Verified
Commit
5b228966
authored
Nov 20, 2020
by
Antonio Vivace
Browse files
Prepare bagit.txt creation
parent
4d9338db
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
5b228966
...
...
@@ -24,6 +24,15 @@ def get_random_string(length):
# Stub
def
createBagItTxt
(
version
=
"1.0"
,
encoding
=
"UTF-8"
):
"""
Creates the Bag Declaration file, as specified by the RFC:
https://tools.ietf.org/html/rfc8493#section-2.1.1
"""
bagittxt
=
(
f
'BagIt-Version:
{
version
}
\n
'
'Tag-File-Character-Encoding: {encoding}'
)
my_fs
.
writetext
(
aicfoldername
+
"/"
+
"bagit.txt"
,
bagittxt
)
def
checkunique
(
id
):
"""
Check if the given ID is unique in our system
...
...
Write
Preview
Supports
Markdown
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