Permalink
Browse files

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

  • Loading branch information...
1 parent 8da551b commit 85be3148de2bac6f3cf82856030d119a7b14ff3a Mark Pilgrim committed May 19, 2011
View
2 about.html
@@ -23,5 +23,5 @@
<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]-->
View
2 advanced-iterators.html
@@ -642,7 +642,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 case-study-porting-chardet-to-python-3.html
@@ -749,7 +749,7 @@ <h2 id=summary>Summary</h2>
</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>
View
2 colophon.html
@@ -81,7 +81,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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]-->
View
2 comprehensions.html
@@ -376,7 +376,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 files.html
@@ -601,7 +601,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 generators.html
@@ -412,7 +412,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 http-web-services.html
@@ -997,7 +997,7 @@ <h2 id=furtherreading>Further Reading</h2>
</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>
View
8 index.html
@@ -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 @@
</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>
View
2 installing-python.html
@@ -357,7 +357,7 @@ <h2 id=editors>Python Editors and IDEs</h2>
<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>
View
2 iterators.html
@@ -388,7 +388,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 native-datatypes.html
@@ -955,7 +955,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 packaging.html
@@ -571,7 +571,7 @@ <h2 id=furtherreading>Further Reading</h2>
</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>
View
2 porting-code-to-python-3-with-2to3.html
@@ -1342,7 +1342,7 @@ <h3 id=idioms>Common idioms (explicit)</h3>
</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>
View
12 publish
@@ -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"
View
2 refactoring.html
@@ -471,7 +471,7 @@ <h2 id=summary>Summary</h2>
</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>
View
2 regular-expressions.html
@@ -434,7 +434,7 @@ <h2 id=summary>Summary</h2>
</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>
View
2 serializing.html
@@ -655,7 +655,7 @@ <h2 id=furtherreading>Further Reading</h2>
</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>
View
2 special-method-names.html
@@ -838,7 +838,7 @@ <h2 id=furtherreading>Further Reading</h2>
</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>
View
2 strings.html
@@ -458,7 +458,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>
View
2 table-of-contents.html
@@ -448,5 +448,5 @@
</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]-->
View
2 troubleshooting.html
@@ -71,6 +71,6 @@ <h2 id=running-python-on-the-command-line>Running Python on the command line</h2
<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>
View
2 unit-testing.html
@@ -821,7 +821,7 @@ <h2 id=romantest6>More Bad Input</h2>
<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>
View
2 util/htmlminimizer.py
@@ -55,5 +55,5 @@
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)))
View
2 whats-new.html
@@ -46,4 +46,4 @@ <h2 id=divingin><i>a.k.a.</i> &#8220;the minus level&#8221;</h2>
<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>
View
2 where-to-go-from-here.html
@@ -81,6 +81,6 @@ <h2 id=code>Where To Look For Python 3-Compatible Code</h2>
<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>
View
2 xml.html
@@ -670,7 +670,7 @@ <h2 id=furtherreading>Further Reading</h2>
</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>
View
2 your-first-python-program.html
@@ -383,7 +383,7 @@ <h2 id=furtherreading>Further Reading</h2>
<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>

0 comments on commit 85be314

Please sign in to comment.