Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
apachedex
Commits
d4e06a41
Commit
d4e06a41
authored
Apr 07, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for parsing from stdin.
Document stdin & stdout capabilities in README.
parent
552d017e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
README
README
+4
-0
apachedex/__init__.py
apachedex/__init__.py
+9
-6
No files found.
README
View file @
d4e06a41
...
@@ -81,11 +81,15 @@ configuration (see `--logformat` argument documentation).
...
@@ -81,11 +81,15 @@ configuration (see `--logformat` argument documentation).
Input files may be provided gzip'ed.
Input files may be provided gzip'ed.
Input filename "-" is understood as stdin.
Output
Output
------
------
The output is HTML + CSS + JS, so you need a web browser to read it.
The output is HTML + CSS + JS, so you need a web browser to read it.
Output filename "-" is understood as stdout.
Usage
Usage
=====
=====
...
...
apachedex/__init__.py
View file @
d4e06a41
...
@@ -974,13 +974,16 @@ def main():
...
@@ -974,13 +974,16 @@ def main():
for
fileno
,
filename
in
enumerate
(
infile_list
,
1
):
for
fileno
,
filename
in
enumerate
(
infile_list
,
1
):
print
>>
sys
.
stderr
,
'Processing %s [%i/%i]'
%
(
print
>>
sys
.
stderr
,
'Processing %s [%i/%i]'
%
(
filename
,
fileno
,
file_count
)
filename
,
fileno
,
file_count
)
logfile
=
gzip
.
open
(
filename
)
if
filename
==
'-'
:
try
:
logfile
=
sys
.
stdin
logfile
.
readline
()
except
IOError
:
logfile
=
open
(
filename
)
else
:
else
:
logfile
.
seek
(
0
)
logfile
=
gzip
.
open
(
filename
)
try
:
logfile
.
readline
()
except
IOError
:
logfile
=
open
(
filename
)
else
:
logfile
.
seek
(
0
)
lineno
=
0
lineno
=
0
for
lineno
,
line
in
enumerate
(
logfile
,
1
):
for
lineno
,
line
in
enumerate
(
logfile
,
1
):
if
lineno
%
5000
==
0
:
if
lineno
%
5000
==
0
:
...
...
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