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
787ba85c
Commit
787ba85c
authored
Apr 10, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-introduce --js and --js-embed when pkg_resource is available.
parent
0164c5bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
TODO
TODO
+0
-1
apachedex/__init__.py
apachedex/__init__.py
+5
-8
No files found.
TODO
View file @
787ba85c
- use some templating system instead of hardcoded html strings
- use some templating system instead of hardcoded html strings
- allow user to specify min & max dates
- allow user to specify min & max dates
- implement --js & --js-embed even when pkg_resource is available
- move all N_* constants into command line arguments
- move all N_* constants into command line arguments
- graph annotations
- graph annotations
apachedex/__init__.py
View file @
787ba85c
...
@@ -875,8 +875,8 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
...
@@ -875,8 +875,8 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
graph_coefficient
=
period_parameter_dict
[
'graph_coefficient'
]
graph_coefficient
=
period_parameter_dict
[
'graph_coefficient'
]
out
.
write
(
'<!DOCTYPE html>
\
n
<html><head><meta charset="%s">'
out
.
write
(
'<!DOCTYPE html>
\
n
<html><head><meta charset="%s">'
'<title>Stats</title>'
%
encoding
)
'<title>Stats</title>'
%
encoding
)
js_embed
=
getattr
(
args
,
'js_embed'
,
True
)
js_path
=
getattr
(
args
,
'js'
,
None
)
js_path
=
getattr
(
args
,
'js'
,
None
)
js_embed
=
getattr
(
args
,
'js_embed'
,
js_path
is
None
)
if
js_embed
:
if
js_embed
:
out
.
write
(
'<style>'
)
out
.
write
(
'<style>'
)
out
.
write
(
getResource
(
'apachedex.css'
))
out
.
write
(
getResource
(
'apachedex.css'
))
...
@@ -1038,13 +1038,10 @@ def main():
...
@@ -1038,13 +1038,10 @@ def main():
group
.
add_argument
(
'-s'
,
'--stats'
,
action
=
'store_true'
,
group
.
add_argument
(
'-s'
,
'--stats'
,
action
=
'store_true'
,
help
=
'Enable parsing stats (time spent parsing input, time spent '
help
=
'Enable parsing stats (time spent parsing input, time spent '
'generating output, ...)'
)
'generating output, ...)'
)
if
abs_file_container
is
not
None
:
group
.
add_argument
(
'--js'
,
default
=
abs_file_container
,
# Force embedding when file container is unknown (ex: pkg_resources).
help
=
'Folder containing needed js files. Default: %(default)s'
)
# XXX: allow when --js is also provided ?
group
.
add_argument
(
'--js-embed'
,
action
=
'store_true'
,
group
.
add_argument
(
'--js'
,
default
=
abs_file_container
,
help
=
'Embed js files instead of linking to them.'
)
help
=
'Folder containing needed js files. Default: %(default)s'
)
group
.
add_argument
(
'--js-embed'
,
action
=
'store_true'
,
help
=
'Embed js files instead of linking to them.'
)
group
=
parser
.
add_argument_group
(
'site matching'
,
'Earlier arguments take '
group
=
parser
.
add_argument_group
(
'site matching'
,
'Earlier arguments take '
'precedence. For example: --skip-base "/foo/bar(/|$|
\
\
?)" '
'precedence. For example: --skip-base "/foo/bar(/|$|
\
\
?)" '
...
...
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