switch to Git; update build files and feed links; update copyright year

This commit is contained in:
Mark Pilgrim
2011-05-18 20:31:03 -04:00
parent 8da551bda9
commit 85be3148de
28 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -23,5 +23,5 @@ abbr{font-variant:none;text-transform:none;letter-spacing:0}
<p>Corrections and feedback to <a href=mailto:mark@diveintomark.org>mark@diveintomark.org</a>
</div>
</div>
<p class=c>&copy; 2001&ndash;10 <a href=colophon.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=colophon.html>Mark Pilgrim</a>
<!--[if IE]><script src=j/html5.js></script><![endif]-->
+1 -1
View File
@@ -642,7 +642,7 @@ NameError: name '__import__' is not defined</samp></pre>
<p class=v><a href=iterators.html rel=prev title='back to &#8220;Classes &amp; Iterators&#8221;'><span class=u>&#x261C;</span></a> <a href=unit-testing.html rel=next title='onward to &#8220;Unit Testing&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -749,7 +749,7 @@ tests\EUC-JP\arclamp.jp.xml EUC-JP with confide
</ol>
<p class=v><a rel=prev href=http-web-services.html title='back to &#8220;HTTP Web Services&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=packaging.html title='onward to &#8220;Packaging Python Libraries&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -81,7 +81,7 @@ h1:before,h2:before{content:''}
<li><a href=http://optipng.sourceforge.net/>OptiPNG</a>
</ul>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/dip3.js></script>
<!--[if IE]><script src=j/html5.js></script><![endif]-->
+1 -1
View File
@@ -376,7 +376,7 @@ TypeError: unhashable type: 'list'</samp></pre>
<li><a href=http://docs.python.org/3.1/tutorial/datastructures.html#looping-techniques>Looping techniques</a>
</ul>
<p class=v><a href=native-datatypes.html rel=prev title='back to &#8220;Native Datatypes&#8221;'><span class=u>&#x261C;</span></a> <a href=strings.html rel=next title='onward to &#8220;Strings&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -601,7 +601,7 @@ print('C')</code></pre>
<p class=v><a href=refactoring.html rel=prev title='back to &#8220;Refactoring&#8221;'><span class=u>&#x261C;</span></a> <a href=xml.html rel=next title='onward to &#8220;XML&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -412,7 +412,7 @@ def plural(noun, rules_filename='plural5-rules.txt'):
<p class=v><a href=regular-expressions.html rel=prev title='back to &#8220;Regular Expressions&#8221;'><span class=u>&#x261C;</span></a> <a href=iterators.html rel=next title='onward to &#8220;Classes &amp; Iterators&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -997,7 +997,7 @@ user-agent: Python-httplib2/$Rev: 259 $
</ul>
<p class=v><a rel=prev href=serializing.html title='back to &#8220;Serializing Python Objects&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=case-study-porting-chardet-to-python-3.html title='onward to &#8220;Case Study: Porting chardet to Python 3&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+4 -4
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Dive Into Python 3</title>
<link rel=alternate type=application/atom+xml href=http://hg.diveintopython3.org/atom-log>
<link rel=alternate type=application/atom+xml href=https://github.com/diveintomark/diveintopython3/commits/master.atom>
<link rel=stylesheet href=dip3.css>
<style>
h1:before,h2:before{content:''}
@@ -53,10 +53,10 @@ h1:before,h2:before{content:''}
</ol>
<!-- /toc -->
<p>The book is freely licensed under the <a rel=license href=http://creativecommons.org/licenses/by-sa/3.0/>Creative Commons Attribution Share-Alike</a> license. You can download it as <a href=d/diveintopython3-html-latest.zip><abbr>HTML</abbr></a> or <a href=d/diveintopython3-pdf-latest.zip><abbr>PDF</abbr></a>. &Uuml;ber-geeks can also clone the Mercurial repository:
<p>The book is freely licensed under the <a rel=license href=http://creativecommons.org/licenses/by-sa/3.0/>Creative Commons Attribution Share-Alike</a> license. You can download it as <a href=d/diveintopython3-html-latest.zip><abbr>HTML</abbr></a> or <a href=d/diveintopython3-pdf-latest.zip><abbr>PDF</abbr></a>. &Uuml;ber-geeks can also clone the Git repository:
<pre><samp class=p>you@localhost:~$ </samp><kbd>hg clone <a href=http://hg.diveintopython3.org/>http://hg.diveintopython3.org/</a> diveintopython3</kbd></pre>
<pre><samp class=p>you@localhost:~$ </samp><kbd>git clone <a href=https://github.com/diveintomark/diveintopython3>git://github.com/diveintomark/diveintopython3.git</a></kbd></pre>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<p class=c>Translations: <a href=http://code.google.com/p/inmersionenpython3/ lang=es hreflang=es>en espa&ntilde;ol</a>, <a href=http://gpiancastelli.altervista.org/dip3-it/ lang=it hreflang=it>in italiano</a>, <a href="http://ru.wikisource.org/wiki/%D0%9F%D0%BE%D0%B3%D1%80%D1%83%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_Python_3_(%D0%9F%D0%B8%D0%BB%D0%B3%D1%80%D0%B8%D0%BC)" lang=ru hreflang=ru>на русском языке</a>, <a href=http://www.diveintopython3.ir/ lang=fa hreflang=fa dir=rtl>به پارسی</a>
+1 -1
View File
@@ -357,7 +357,7 @@ has the same effect as typing a particular string at the help> prompt.</samp>
<p class=v><a href=whats-new.html rel=prev title='back to &#8220;What&#8217;s New In Dive Into Python 3&#8221;'><span class=u>&#x261C;</span></a> <a href=your-first-python-program.html rel=next title='onward to &#8220;Your First Python Program&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -388,7 +388,7 @@ rules = LazyRules()</code></pre>
<p class=v><a href=generators.html rel=prev title='back to &#8220;Closures &amp; Generators&#8221;'><span class=u>&#x261C;</span></a> <a href=advanced-iterators.html rel=next title='onward to &#8220;Advanced Iterators&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -955,7 +955,7 @@ KeyError: 'db.diveintopython3.org'</samp></pre>
<li><a href=http://www.python.org/dev/peps/pep-0238/><abbr>PEP</abbr> 238: Changing the Division Operator</a>
</ul>
<p class=v><a href=your-first-python-program.html rel=prev title='back to &#8220;Your First Python Program&#8221;'><span class=u>&#x261C;</span></a> <a href=comprehensions.html rel=next title='onward to &#8220;Comprehensions&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -571,7 +571,7 @@ I can store your PyPI login so future submissions will be faster.
</ul>
<p class=v><a rel=prev href=case-study-porting-chardet-to-python-3.html title='back to &#8220;Case Study: Porting chardet to Python 3&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=porting-code-to-python-3-with-2to3.html title='onward to &#8220;Porting Code to Python 3 with 2to3&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -1342,7 +1342,7 @@ do_stuff(a_list)</code></pre>
</table>
<p class=v><a href=packaging.html rel=prev title='back to &#8220;Packaging Python Libraries&#8221;'><span class=u>&#x261C;</span></a> <a href=special-method-names.html rel=next title='onward to &#8220;Special Method Names&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+6 -6
View File
@@ -10,7 +10,7 @@ echo "started build"
# build table of contents
python3 util/buildtoc.py
revision=`hg tip | grep changeset|cut -d":" -f2|cut -d" " -f4`
revision=`git rev-parse --short HEAD`
today=`date +"%Y-%m-%d"`
# make build directory and copy original files there for preflighting
@@ -73,13 +73,13 @@ mv build/single.html build/single.html.bak
echo "adding per-page dates"
for f in *.html; do
cp "$f" build/tmp/
log=`hg log "$f" | grep ^date`
log=`git log "$f" | grep "^Date"`
num_changes=`echo "$log" | wc -l`
lastmodified=`echo "$log" | head -1 | cut -d":" -f2- | cut -d" " -f9-13`
lastmodified=`echo "$log" | head -1 | cut -d":" -f2- | cut -d" " -f4-8`
lastmodified_pretty=`python3 -c "import time; print(time.strftime('%B %d, %Y', time.strptime('$lastmodified')).replace(' 0', ' '))"`
firstmodified=`echo "$log" | tail -1 | cut -d":" -f2- | cut -d" " -f9-13`
firstmodified=`echo "$log" | tail -1 | cut -d":" -f2- | cut -d" " -f4-8`
firstmodified_pretty=`python3 -c "import time; print(time.strftime('%B %d, %Y', time.strptime('$firstmodified')).replace(' 0', ' '))"`
sed -i -e "s|<p id=level>|<p id=level>Updated <a title='$num_changes changes since $firstmodified_pretty' href=http://hg.diveintopython3.org/hgweb.cgi/log/tip/$f>$lastmodified_pretty</a> \&bull; |" build/tmp/"$f"
sed -i -e "s|<p id=level>|<p id=level>Updated <a title='$num_changes changes since $firstmodified_pretty' href=https://github.com/diveintomark/diveintopython3/blob/master/$f>$lastmodified_pretty</a> \&bull; |" build/tmp/"$f"
done
echo "minimizing HTML"
@@ -125,7 +125,7 @@ for f in build/*.html; do
sed -i -e "s|<link rel=stylesheet href=dip3.css>|<style>${css}</style>|g" -e "s|<link rel=stylesheet media='only screen and (max-device-width: 480px)' href=mobile.css>|<style>@media screen and (max-device-width:480px){${mobilecss}}</style>|g" -e "s|<link rel=stylesheet media=print href=print.css>|<style>@media print{${printcss}}</style>|g" -e "s|</style><style>||g" -e "s|href=index.html|href=/|g" -e "s|</style>|</style>${ga}|g" -e "s|<p id=toc>|${plug}<p id=toc>|g" "$f" || die "Failed to inline CSS"
done
# set file permissions (hg resets these, don't know why)
# set file permissions
chmod 755 build/examples build/j build/i build/d && \
chmod 644 build/*.html build/*.css build/*.txt build/*.zip build/examples/* build/examples/.htaccess build/j/* build/j/.htaccess build/i/* build/i/.htaccess build/d/.htaccess build/.htaccess || die "Failed to reset file permissions"
+1 -1
View File
@@ -471,7 +471,7 @@ OK</samp></pre>
</ul>
<p class=v><a rel=prev href=unit-testing.html title='back to &#8220;Unit Testing&#8221;'><span class=u>&#x261C;</span></a> <a href=files.html rel=next title='onward to &#8220;Files&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -434,7 +434,7 @@ AttributeError: 'NoneType' object has no attribute 'groups'</samp></pre>
</ul>
<p>Regular expressions are extremely powerful, but they are not the correct solution for every problem. You should learn enough about them to know when they are appropriate, when they will solve your problems, and when they will cause more problems than they solve.
<p class=v><a href=strings.html rel=prev title='back to &#8220;Strings&#8221;'><span class=u>&#x261C;</span></a> <a href=generators.html rel=next title='onward to &#8220;Closures &amp; Generators&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -655,7 +655,7 @@ NameError: name 'entry' is not defined</samp>
</ul>
<p class=v><a rel=prev href=xml.html title='back to &#8220;XML&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=http-web-services.html title='onward to &#8220;HTTP Web Services&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -838,7 +838,7 @@ def __exit__(self, *args):
</ul>
<p class=v><a href=porting-code-to-python-3-with-2to3.html rel=prev title='back to &#8220;Porting code to Python 3 with 2to3&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=where-to-go-from-here.html title='onward to &#8220;Where To Go From Here&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -458,7 +458,7 @@ TypeError: Can't convert 'bytes' object to str implicitly</samp>
<p class=v><a href=comprehensions.html rel=prev title='back to &#8220;Comprehensions&#8221;'><span class=u>&#x261C;</span></a> <a href=regular-expressions.html rel=next title='onward to &#8220;Regular Expressions&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -448,5 +448,5 @@ li ol{font-weight:normal}
</ol>
</ol>
<!-- /toc -->
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<!--[if IE]><script src=j/html5.js></script><![endif]-->
+1 -1
View File
@@ -71,6 +71,6 @@ Type "help", "copyright", "credits" or "license" for more information.
<p class=v><a rel=prev href=where-to-go-from-here.html title='back to &#8220;Where To Go From Here&#8221;'><span class=u>&#x261C;</span></a> <a href=blank.html rel=next><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -821,7 +821,7 @@ OK</samp></pre>
<p>And the anticlimax award of the year goes to&hellip; the word &#8220;<code>OK</code>&#8221;, which is printed by the <code>unittest</code> module when all the tests pass.
<p class=v><a href=advanced-iterators.html rel=prev title='back to &#8220;Advanced Iterators&#8221;'><span class=u>&#x261C;</span></a> <a href=refactoring.html rel=next title='onward to &#8220;Refactoring&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -55,5 +55,5 @@ with open(output_file, 'w', encoding="utf-8") as _out, open(input_file, encoding
else:
_out.write(g)
if g.lower() == '<!doctype html>':
_out.write('\n<!-- readable source @ http://hg.diveintopython3.org/hgweb.cgi/file/tip/{0} -->\n'.format(os.path.basename(input_file)))
_out.write('\n<!-- readable source @ https://github.com/diveintomark/diveintopython3/blob/master/{0} -->\n'.format(os.path.basename(input_file)))
+1 -1
View File
@@ -46,4 +46,4 @@ h3:before{content:''}
<p>Also new in Python&nbsp;&mdash;&nbsp;not in the language but in the community&nbsp;&mdash;&nbsp;is the emergence of code repositories like <a href=http://pypi.python.org/>The Python Package Index</a> (PyPI). Python comes with utilities to package your code in standard formats and distribute those packages on PyPI. Read <a href=packaging.html>Packaging Python Libraries</a> for details.
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
+1 -1
View File
@@ -81,6 +81,6 @@
<p class=v><a rel=prev href=special-method-names.html title='back to &#8220;Special Method Names&#8221;'><span class=u>&#x261C;</span></a> <a href=troubleshooting.html rel=next title='onward to &#8220;Troubleshooting&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -670,7 +670,7 @@ lxml.etree.XMLSyntaxError: Entity 'hellip' not defined, line 3, column 28</samp>
</ul>
<p class=v><a rel=prev href=files.html title='back to &#8220;Files&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=serializing.html title='onward to &#8220;Serializing Python Objects&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>
+1 -1
View File
@@ -383,7 +383,7 @@ if __name__ == '__main__':
<li><a href=http://docs.python.org/3.1/reference/><cite>Python Reference Manual</cite></a> explains what it means to say that <a href=http://docs.python.org/3.1/reference/datamodel.html#objects-values-and-types>everything in Python is an object</a>, because some people are <a href=http://www.douglasadams.com/dna/pedants.html>pedants</a> and like to discuss that sort of thing at great length.
</ul>
<p class=v><a rel=prev href=installing-python.html title='back to &#8220;Installing Python&#8221;'><span class=u>&#x261C;</span></a> <a rel=next href=native-datatypes.html title='onward to &#8220;Native Datatypes&#8221;'><span class=u>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;10 <a href=about.html>Mark Pilgrim</a>
<p class=c>&copy; 2001&ndash;11 <a href=about.html>Mark Pilgrim</a>
<script src=j/jquery.js></script>
<script src=j/prettify.js></script>
<script src=j/dip3.js></script>