Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
1910a774
Commit
1910a774
authored
Nov 27, 2014
by
Mathieu Giraud
Browse files
latex.py: output clones in a LaTeX table
parent
38c3c801
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/fuse.py
View file @
1910a774
...
...
@@ -158,6 +158,9 @@ class Window:
return
obj
def
latex
(
self
,
point
=
0
):
return
r
" & & %s & %-50s \\ %% %s"
%
(
self
.
d
[
"reads"
][
0
],
self
.
d
[
"name"
],
self
.
d
[
"id"
])
### print essential info about Window
def
__str__
(
self
):
return
"<window : %s %s %s>"
%
(
self
.
d
[
"reads"
],
'*'
if
self
.
d
[
"top"
]
==
sys
.
maxint
else
self
.
d
[
"top"
],
self
.
d
[
"id"
])
...
...
server/latex.py
0 → 100644
View file @
1910a774
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
fuse
import
sys
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--threshold'
,
'-t'
,
type
=
float
,
default
=
0.1
,
help
=
'threshold (%(default)d)'
)
parser
.
add_argument
(
'--verbose'
,
'-v'
,
action
=
'store_true'
,
help
=
'verbose output'
)
parser
.
add_argument
(
'file'
,
nargs
=
'+'
,
help
=
'''.vidjil files'''
)
def
main
():
args
=
parser
.
parse_args
()
datas
=
[]
for
i
in
args
.
file
:
data
=
fuse
.
ListWindows
()
data
.
load
(
i
,
False
,
verbose
=
args
.
verbose
)
print
' '
,
i
for
w
in
data
:
if
w
.
d
[
'reads'
][
0
]
>=
args
.
threshold
:
print
w
.
latex
()
print
r
' \hline'
if
__name__
==
'__main__'
:
main
()
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment