Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodbtools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
zodbtools
Commits
cbbc1adb
Commit
cbbc1adb
authored
Jan 12, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX proto: update scripts to work with final format
parent
545c6414
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
prototype/calculate_tids.py
prototype/calculate_tids.py
+1
-1
prototype/proto.go
prototype/proto.go
+2
-2
prototype/proto.py
prototype/proto.py
+1
-1
No files found.
prototype/calculate_tids.py
View file @
cbbc1adb
...
@@ -41,7 +41,7 @@ with open(args.formats, "r") as f:
...
@@ -41,7 +41,7 @@ with open(args.formats, "r") as f:
if
not
(
line
.
startswith
(
"#1"
)
or
line
.
startswith
(
"#2"
)):
if
not
(
line
.
startswith
(
"#1"
)
or
line
.
startswith
(
"#2"
)):
print
(
line
)
print
(
line
)
continue
continue
reference
,
timespec
=
line
.
split
(
" "
,
1
)
reference
,
_
,
timespec
=
line
.
split
(
" "
,
2
)
parsed_time
=
dateparser
.
parse
(
parsed_time
=
dateparser
.
parse
(
reference
[
1
:]
if
reference
.
startswith
(
"#"
)
else
reference
,
reference
[
1
:]
if
reference
.
startswith
(
"#"
)
else
reference
,
...
...
prototype/proto.go
View file @
cbbc1adb
...
@@ -66,9 +66,9 @@ func main() {
...
@@ -66,9 +66,9 @@ func main() {
line
:=
scanner
.
Text
()
line
:=
scanner
.
Text
()
// skip comments or empty lines
// skip comments or empty lines
if
strings
.
Index
(
line
,
"#"
)
!=
0
&&
line
!=
""
{
if
strings
.
Index
(
line
,
"#"
)
!=
0
&&
line
!=
""
{
parts
:=
strings
.
SplitN
(
line
,
" "
,
2
)
parts
:=
strings
.
SplitN
(
line
,
" "
,
3
)
reference
:=
parts
[
0
]
reference
:=
parts
[
0
]
timespec
:=
parts
[
1
]
timespec
:=
parts
[
2
]
preprocessed_timespec
:=
timespec
preprocessed_timespec
:=
timespec
if
strings
.
Contains
(
timespec
,
"ago"
)
{
if
strings
.
Contains
(
timespec
,
"ago"
)
{
...
...
prototype/proto.py
View file @
cbbc1adb
...
@@ -49,7 +49,7 @@ with open(args.formats, "r") as f:
...
@@ -49,7 +49,7 @@ with open(args.formats, "r") as f:
if
not
line
or
line
.
startswith
(
"#"
):
if
not
line
or
line
.
startswith
(
"#"
):
continue
continue
reference
,
timespec
=
line
.
split
(
" "
,
1
)
reference
,
_
,
timespec
=
line
.
split
(
" "
,
2
)
preprocessed_timespec
=
timespec
preprocessed_timespec
=
timespec
if
"ago"
in
timespec
:
if
"ago"
in
timespec
:
preprocessed_timespec
=
timespec
.
replace
(
"."
,
" "
).
replace
(
"_"
,
" "
)
preprocessed_timespec
=
timespec
.
replace
(
"."
,
" "
).
replace
(
"_"
,
" "
)
...
...
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