Show More
@@ -103,8 +103,8 b' gitwash-update:' | |||
|
103 | 103 | nightly: dist |
|
104 | 104 | rsync -avH --delete dist/ ipython:www/doc/nightly |
|
105 | 105 | |
|
106 | gh-pages: html | |
|
106 | gh-pages: html pdf | |
|
107 | 107 | python gh-pages.py |
|
108 | 108 | |
|
109 | gh-pages-current: html | |
|
110 | python gh-pages.py current | |
|
109 | gh-pages-current: html pdf | |
|
110 | python gh-pages.py current "Current Development Version" |
@@ -29,6 +29,7 b' from subprocess import Popen, PIPE, CalledProcessError, check_call' | |||
|
29 | 29 | |
|
30 | 30 | pages_dir = 'gh-pages' |
|
31 | 31 | html_dir = 'build/html' |
|
32 | pdf_dir = 'build/latex' | |
|
32 | 33 | pages_repo = 'git@github.com:ipython/ipython-doc.git' |
|
33 | 34 | |
|
34 | 35 | #----------------------------------------------------------------------------- |
@@ -74,20 +75,28 b' def init_repo(path):' | |||
|
74 | 75 | cd(here) |
|
75 | 76 | |
|
76 | 77 | |
|
77 | def render_htmlindex(fname, tag): | |
|
78 | rel = '<li> Release: <a href="{t}/index.html">{t}</a>'.format(t=tag) | |
|
78 | def render_htmlindex(fname, tag, desc=None): | |
|
79 | if desc is None: | |
|
80 | desc = tag | |
|
81 | ||
|
82 | rel = '<li>{d}: <a href="{t}/index.html">HTML</a> and <a href="{t}/ipython.pdf">PDF</a>'.format(t=tag,d=desc) | |
|
79 | 83 | rep = re.compile('<!-- RELEASE -->') |
|
80 | 84 | out = [] |
|
81 | 85 | with file(fname) as f: |
|
82 | for line in f: | |
|
86 | contents = f.read() | |
|
87 | lines = contents.splitlines() | |
|
88 | if rel in contents: | |
|
89 | out = lines | |
|
90 | else: | |
|
91 | for line in lines: | |
|
83 | 92 | out.append(line) |
|
84 | 93 | if rep.search(line): |
|
85 | 94 | out.append(rep.sub(rel, line)) |
|
86 | return ''.join(out) | |
|
95 | return '\n'.join(out)+'\n' | |
|
87 | 96 | |
|
88 | 97 | |
|
89 | def new_htmlindex(fname, tag): | |
|
90 | new_page = render_htmlindex(fname, tag) | |
|
98 | def new_htmlindex(fname, tag, desc=None): | |
|
99 | new_page = render_htmlindex(fname, tag, desc) | |
|
91 | 100 | os.rename(fname, fname+'~') |
|
92 | 101 | with file(fname, 'w') as f: |
|
93 | 102 | f.write(new_page) |
@@ -103,6 +112,11 b" if __name__ == '__main__':" | |||
|
103 | 112 | except IndexError: |
|
104 | 113 | tag = sh2('git describe') |
|
105 | 114 | |
|
115 | try: | |
|
116 | desc = sys.argv[2] | |
|
117 | except IndexError: | |
|
118 | desc="Release (%s)"%tag | |
|
119 | ||
|
106 | 120 | startdir = os.getcwd() |
|
107 | 121 | if not os.path.exists(pages_dir): |
|
108 | 122 | init_repo(pages_dir) |
@@ -116,6 +130,7 b" if __name__ == '__main__':" | |||
|
116 | 130 | # directory, and then copy the html tree in there |
|
117 | 131 | shutil.rmtree(dest, ignore_errors=True) |
|
118 | 132 | shutil.copytree(html_dir, dest) |
|
133 | shutil.copy(pjoin(pdf_dir, 'ipython.pdf'), pjoin(dest, 'ipython.pdf')) | |
|
119 | 134 | |
|
120 | 135 | try: |
|
121 | 136 | cd(pages_dir) |
@@ -128,7 +143,7 b" if __name__ == '__main__':" | |||
|
128 | 143 | raise RuntimeError(e) |
|
129 | 144 | |
|
130 | 145 | sh('git add %s' % tag) |
|
131 | new_htmlindex('index.html', tag) | |
|
146 | new_htmlindex('index.html', tag, desc) | |
|
132 | 147 | sh('git add index.html') |
|
133 | 148 | sh('git commit -m"Created new doc release, named: %s"' % tag) |
|
134 | 149 |
|
1 | NO CONTENT: file renamed from docs/source/interactive/figs/colors.dark.png to docs/source/interactive/figs/colors_dark.png |
@@ -120,7 +120,7 b' styles associated with each ``--colors`` option.' | |||
|
120 | 120 | Screenshot of ``ipython-qtconsole --colors dark``, which uses the 'monokai' theme by |
|
121 | 121 | default: |
|
122 | 122 | |
|
123 |
.. image:: figs/colors |
|
|
123 | .. image:: figs/colors_dark.png | |
|
124 | 124 | :width: 627px |
|
125 | 125 | |
|
126 | 126 | .. Note:: |
General Comments 0
You need to be logged in to leave comments.
Login now