Show More
@@ -19,6 +19,10 b' From the command line:' | |||||
19 |
|
19 | |||
20 | $ python -m IPython.external.mathjax |
|
20 | $ python -m IPython.external.mathjax | |
21 |
|
21 | |||
|
22 | To a specific profile: | |||
|
23 | ||||
|
24 | $ python -m IPython.external.mathjax --profile=research | |||
|
25 | ||||
22 | To install MathJax from a file you have already downloaded: |
|
26 | To install MathJax from a file you have already downloaded: | |
23 |
|
27 | |||
24 | $ python -m IPython.external.mathjax mathjax-xxx.tar.gz |
|
28 | $ python -m IPython.external.mathjax mathjax-xxx.tar.gz | |
@@ -200,20 +204,26 b' def main() :' | |||||
200 | ) |
|
204 | ) | |
201 |
|
205 | |||
202 | parser.add_argument( |
|
206 | parser.add_argument( | |
|
207 | '-p', | |||
|
208 | '--profile', | |||
|
209 | default='default', | |||
|
210 | help='profile to install MathJax to (default is default)') | |||
|
211 | ||||
|
212 | parser.add_argument( | |||
203 | '-i', |
|
213 | '-i', | |
204 | '--install-dir', |
|
214 | '--install-dir', | |
205 | default=default_dest, |
|
215 | help='custom installation directory') | |
206 | help='installation directory (by default : %s)' % (default_dest)) |
|
216 | ||
207 | parser.add_argument( |
|
217 | parser.add_argument( | |
208 | '-d', |
|
218 | '-d', | |
209 | '--dest', |
|
219 | '--dest', | |
210 | action='store_true', |
|
220 | action='store_true', | |
211 |
help='print where |
|
221 | help='print where current mathjax would be installed and exit') | |
212 | parser.add_argument( |
|
222 | parser.add_argument( | |
213 | '-r', |
|
223 | '-r', | |
214 | '--replace', |
|
224 | '--replace', | |
215 | action='store_true', |
|
225 | action='store_true', | |
216 | help='Wether to replace current mathjax if already exist') |
|
226 | help='Whether to replace current mathjax if it already exists') | |
217 | parser.add_argument( |
|
227 | parser.add_argument( | |
218 | '-t', |
|
228 | '-t', | |
219 | '--test', |
|
229 | '--test', | |
@@ -225,7 +235,13 b' def main() :' | |||||
225 |
|
235 | |||
226 | pargs = parser.parse_args() |
|
236 | pargs = parser.parse_args() | |
227 |
|
237 | |||
228 |
|
|
238 | if pargs.install_dir: | |
|
239 | # Explicit install_dir overrides profile | |||
|
240 | dest = pargs.install_dir | |||
|
241 | else: | |||
|
242 | profile = pargs.profile | |||
|
243 | dest = os.path.join(locate_profile(profile), 'static', 'mathjax') | |||
|
244 | ||||
229 | if pargs.dest : |
|
245 | if pargs.dest : | |
230 | print dest |
|
246 | print dest | |
231 | return |
|
247 | return |
General Comments 0
You need to be logged in to leave comments.
Login now