##// END OF EJS Templates
refactor to improve cell switching in edit mode...
refactor to improve cell switching in edit mode This code was repeated in both CodeCell and TextCell, both of which are extensions of Cell, so this just unifies the logic in Cell. TextCell had logic here to check if the cell was rendered or not, but I don't believe it is possible to end up triggering such a code path. (Should that be required, I can always just add back these methods to TextCell, performing the .rendered==True check, and calling the Cell prior to this, code mirror at_top would only return true on if the cursor was at the first character of the top line. Now, pressing up arrow on any character on the top line will take you to the cell above. The same applies for the bottom line. Pressing down arrow would only go to the next cell if the cursor was at a location *after* the last character (something that is only possible to achieve in vim mode if the last line is empty, for example). Now, down arrow on any character of the last line will go to the next cell.

File last commit:

r15317:92e068ab
r15754:d60e793e
Show More
autogen_api.py
45 lines | 1.9 KiB | text/x-python | PythonLexer
Fernando Perez
Update docs for automatic API building.
r1850 #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os
import sys
# local imports
sys.path.append(os.path.abspath('sphinxext'))
from apigen import ApiDocWriter
#*****************************************************************************
if __name__ == '__main__':
pjoin = os.path.join
package = 'IPython'
outdir = pjoin('source','api','generated')
Paul Ivanov
update indexes to use .rst, remove .txt refs
r11730 docwriter = ApiDocWriter(package,rst_extension='.rst')
Brian Granger
Cleanup of docs....
r2275 # You have to escape the . here because . is a special char for regexps.
# You must do make clean if you change this!
Thomas Kluyver
Update API doc skip patterns
r13586 docwriter.package_skip_patterns += [r'\.external$',
# Extensions are documented elsewhere.
Brian Granger
Renaming Extensions=>extensions in code and imports.
r2064 r'\.extensions',
Brian Granger
Cleanup of docs....
r2275 r'\.config\.profile',
Fernando Perez
Update docs for automatic API building.
r1850 ]
Fernando Perez
Small fixes so the docs build....
r2404
Thomas Kluyver
Update API doc skip patterns
r13586 # The inputhook* modules often cause problems on import, such as trying to
# load incompatible Qt bindings. It's easiest to leave them all out. The
# main API is in the inputhook module, which is documented.
docwriter.module_skip_patterns += [ r'\.lib\.inputhook.+',
Fernando Perez
Update docs for automatic API building.
r1850 r'\.ipdoctest',
Thomas Kluyver
Various minor docs fixes
r13592 r'\.testing\.plugin',
Thomas Kluyver
Update API doc skip patterns
r13586 # This just prints a deprecation msg:
Thomas Kluyver
Include qt.console.frontend_widget in docs
r13886 r'\.frontend$',
Thomas Kluyver
Manually document py3compat module....
r14087 # We document this manually.
r'\.utils\.py3compat',
Fernando Perez
Update docs for automatic API building.
r1850 ]
Fernando Perez
Generate docs correctly if pexpect is not available....
r2568
# Now, generate the outputs
Fernando Perez
Update docs for automatic API building.
r1850 docwriter.write_api_docs(outdir)
Paul Ivanov
fix api docs post txt -> rst rename
r11758 # Write index with .txt extension - we can include it, but Sphinx won't try
Thomas Kluyver
Miscellaneous docs fixes
r9244 # to compile it
Paul Ivanov
fix api docs post txt -> rst rename
r11758 docwriter.write_index(outdir, 'gen.txt',
Fernando Perez
Update docs for automatic API building.
r1850 relative_to = pjoin('source','api')
)
MinRK
Python 3 print functions...
r11213 print ('%d files written' % len(docwriter.written_modules))