mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
build fiddling
--HG-- rename : dip3.js => j/dip3.js rename : ga.js => j/ga.js rename : jquery.js => j/jquery.js rename : jquery.min.js => j/jquery.min.js
This commit is contained in:
@@ -165,5 +165,5 @@ class OrderedDict(dict, collections.MutableMapping):
|
||||
|
||||
<p class=nav><a rel=prev class=todo><span>☜</span></a> <a rel=next class=todo><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -594,5 +594,5 @@ NameError: name '__import__' is not defined</samp></pre>
|
||||
<p class=nav><a rel=prev href=iterators.html title="back to “Iterators”"><span>☜</span></a> <a rel=next href=unit-testing.html title="onward to “Unit Testing”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -1194,5 +1194,5 @@ tests\EUC-JP\arclamp.jp.xml EUC-JP with confide
|
||||
|
||||
<p class=nav><a rel=prev class=todo><span>☜</span></a> <a rel=next href=where-to-go-from-here.html title="onward to “Where To Go From Here”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -29,5 +29,5 @@ OK, so a string is a sequence of Unicode characters. But a file on disk is not a
|
||||
<p class=nav><a rel=prev href=advanced-classes.html title="back to “Advanced Classes”"><span>☜</span></a> <a rel=next href=xml.html title="onward to “XML”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -409,5 +409,5 @@ def plural(noun):
|
||||
<p class=nav><a rel=prev href=regular-expressions.html title="back to “Regular Expressions”"><span>☜</span></a> <a rel=next href=iterators.html title="onward to “Iterators”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -628,5 +628,5 @@ reply: 'HTTP/1.1 301 Moved Permanently'</samp>
|
||||
</ul>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -73,5 +73,5 @@ h1:before{counter-increment:h1;content:""}
|
||||
-->
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -377,5 +377,5 @@ rules = LazyRules()</code></pre>
|
||||
<p class=nav><a rel=prev href=generators.html title="back to “Generators”"><span>☜</span></a> <a rel=next href=advanced-iterators.html title="onward to “Advanced Iterators”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
Vendored
Vendored
@@ -476,5 +476,5 @@ KeyError: 'db.diveintopython3.org'</samp></pre>
|
||||
</ul>
|
||||
<p class=nav><a rel=prev href=your-first-python-program.html title="back to “Your First Python Program”"><span>☜</span></a> <a rel=next href=strings.html title="onward to “Strings”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -1121,5 +1121,5 @@ do_stuff(a_list)</code></pre>
|
||||
|
||||
<p class=nav><a rel=prev href=where-to-go-from-here.html title="back to “Where To Go From Here”"><span>☜</span></a> <a rel=next href=special-method-names.html title="onward to “Special Method Names”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -5,7 +5,7 @@ echo "started build"
|
||||
# make build directory and copy original files there for preflighting
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cp robots.txt *.js *.css build/
|
||||
cp robots.txt *.css build/
|
||||
cp -R j build/
|
||||
rm -f examples/*.pyc
|
||||
cp -R examples build/
|
||||
@@ -24,20 +24,20 @@ echo "adding evil tracking code"
|
||||
|
||||
# add Google Analytics script
|
||||
for f in build/*.html; do
|
||||
cat "$f" ga.js > build/tmp
|
||||
cat "$f" j/ga.js > build/tmp
|
||||
mv build/tmp "$f"
|
||||
done
|
||||
|
||||
# minimize JS and CSS
|
||||
echo "minimizing JS"
|
||||
revision=`hg log|grep changeset|cut -d":" -f3|head -1`
|
||||
java -jar yuicompressor-2.4.2.jar build/dip3.js > build/dip3-$revision.js
|
||||
java -jar yuicompressor-2.4.2.jar build/j/dip3.js > build/j/dip3-$revision.js
|
||||
|
||||
# combine jQuery and our script
|
||||
echo "combining JS"
|
||||
cat jquery.min.js build/dip3-$revision.js > build/$revision.js
|
||||
rm build/dip3-$revision.js
|
||||
sed -i -e "s|<script src=jquery.js></script>||g" build/*.html
|
||||
cat build/j/jquery.min.js build/j/dip3-$revision.js > build/j/$revision.js
|
||||
sed -i -e "s|<script src=j/jquery.js></script>||g" build/*.html
|
||||
sed -i -e "s|<script src=j/dip3.js>|<script src=j/${revision}.js>|g" build/*.html
|
||||
|
||||
echo "minimizing CSS"
|
||||
java -jar yuicompressor-2.4.2.jar build/dip3.css > build/$revision.css
|
||||
@@ -60,26 +60,16 @@ for f in build/*.html; do
|
||||
python2.6 util/lesscss.py "$f"
|
||||
done
|
||||
|
||||
## secondary stylesheets will be served from a separate domain
|
||||
#echo "fixing hrefs"
|
||||
#sed -i -e "s|href=mobile.css|href=http://wearehugh.com/dip3/m-${revision}.css|g" build/*.html
|
||||
#sed -i -e "s|href=print.css|href=http://wearehugh.com/dip3/p-${revision}.css|g" build/*.html
|
||||
|
||||
# JS will be served from a separate domain
|
||||
sed -i -e "s|dip3\.js|http://wearehugh.com/dip3/${revision}.js|g" build/*.html
|
||||
|
||||
# images would be served from a separate domain if we had any, which we currently don't
|
||||
#sed -i -e "s|bsb.png|http://wearehugh.com/dip3/bsb.png|g" build/*.html
|
||||
|
||||
# minimize URLs
|
||||
echo "minimizing URLs"
|
||||
sed -i -e "s|=http:|=|g" build/*.html
|
||||
sed -i -e "s|href=index.html|href=/|g" build/*.html
|
||||
|
||||
# set file permissions (hg resets these, don't know why)
|
||||
chmod 644 build/*.html build/*.css build/*.js build/examples/*.py build/examples/*.txt build/*.txt
|
||||
chmod 755 build/j
|
||||
chmod 644 build/*.html build/*.css build/*.js build/examples/*.py build/examples/*.txt build/*.txt build/j/*.js
|
||||
|
||||
# ship it!
|
||||
echo "publishing"
|
||||
rsync -essh -avzP build/$revision.js diveintomark.org:~/web/wearehugh.com/dip3/
|
||||
rsync -essh -avzP build/*.html build/examples build/*.txt j diveintomark.org:~/web/diveintopython3.org/
|
||||
rsync -essh -avzP build/j/$revision.js build/j/html5.js build/j/.htaccess diveintomark.org:~/web/diveintopython3.org/j/
|
||||
rsync -essh -avzP build/*.html build/examples build/*.txt diveintomark.org:~/web/diveintopython3.org/
|
||||
|
||||
+2
-2
@@ -474,5 +474,5 @@ OK</samp></pre>
|
||||
</ul>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -435,5 +435,5 @@ body{counter-reset:h1 4}
|
||||
<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=nav><a rel=prev href=strings.html title="back to “Strings”"><span>☜</span></a> <a rel=next href=generators.html title="onward to “Generators”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -819,5 +819,5 @@ def __exit__(self, *args) -> None:
|
||||
|
||||
<p class=nav><a rel=prev href=porting-code-to-python-3-with-2to3.html title="back to “Porting code to Python 3 with 2to3”"><span>☜</span></a> <a rel=next href=further-further-reading.html title="onward to “Further Further Reading”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -435,5 +435,5 @@ TypeError: Can't convert 'bytes' object to str implicitly</samp>
|
||||
<p class=nav><a rel=prev href=native-datatypes.html title="back to “Native Datatypes”"><span>☜</span></a> <a rel=next href=regular-expressions.html title="onward to “Regular Expressions”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -568,5 +568,5 @@ For instance, the <code>testFromRomanCase</code> method (“<code>from_roman
|
||||
-->
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
+2
-2
@@ -40,5 +40,5 @@ h3:before{content:""}
|
||||
<p>That’s it for now; the book’s not finished yet! The file I/O subsystem is totally different now; I hope to write about that soon.
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -66,5 +66,5 @@ body{counter-reset:h1 20}
|
||||
<p class=nav><a rel=prev href=case-study-porting-chardet-to-python-3.html title="back to “Case Study: Porting chardet to Python 3”"><span>☜</span></a> <a rel=next href=porting-code-to-python-3-with-2to3.html title="onward to “Porting Code to Python 3 with 2to3”"><span>☞</span></a>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -641,5 +641,5 @@ lxml.etree.XMLSyntaxError: Entity 'hellip' not defined, line 3, column 28</samp>
|
||||
</ul>
|
||||
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
@@ -282,5 +282,5 @@ if __name__ == "__main__":
|
||||
</ul>
|
||||
<p class=nav><a rel=prev class=todo><span>☜</span></a> <a rel=next href=native-datatypes.html title="onward to “Native Datatypes”"><span>☞</span></a>
|
||||
<p class=c>© 2001–9 <a href=about.html>Mark Pilgrim</a>
|
||||
<script src=jquery.js></script>
|
||||
<script src=dip3.js></script>
|
||||
<script src=j/jquery.js></script>
|
||||
<script src=j/dip3.js></script>
|
||||
|
||||
Reference in New Issue
Block a user