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:
Mark Pilgrim
2009-06-05 19:30:20 -04:00
parent f6961f7e7e
commit e39bffe2d5
24 changed files with 48 additions and 58 deletions
+2 -2
View File
@@ -165,5 +165,5 @@ class OrderedDict(dict, collections.MutableMapping):
<p class=nav><a rel=prev class=todo><span>&#x261C;</span></a> <a rel=next class=todo><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -594,5 +594,5 @@ NameError: name '__import__' is not defined</samp></pre>
<p class=nav><a rel=prev href=iterators.html title="back to &#8220;Iterators&#8221;"><span>&#x261C;</span></a> <a rel=next href=unit-testing.html title="onward to &#8220;Unit Testing&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -1194,5 +1194,5 @@ tests\EUC-JP\arclamp.jp.xml EUC-JP with confide
<p class=nav><a rel=prev class=todo><span>&#x261C;</span></a> <a rel=next href=where-to-go-from-here.html title="onward to &#8220;Where To Go From Here&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Advanced Classes&#8221;"><span>&#x261C;</span></a> <a rel=next href=xml.html title="onward to &#8220;XML&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -409,5 +409,5 @@ def plural(noun):
<p class=nav><a rel=prev href=regular-expressions.html title="back to &#8220;Regular Expressions&#8221;"><span>&#x261C;</span></a> <a rel=next href=iterators.html title="onward to &#8220;Iterators&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -628,5 +628,5 @@ reply: 'HTTP/1.1 301 Moved Permanently'</samp>
</ul>
<p class=c>&copy; 2001&ndash;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
View File
@@ -73,5 +73,5 @@ h1:before{counter-increment:h1;content:""}
-->
<p class=c>&copy; 2001&ndash;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
View File
@@ -377,5 +377,5 @@ rules = LazyRules()</code></pre>
<p class=nav><a rel=prev href=generators.html title="back to &#8220;Generators&#8221;"><span>&#x261C;</span></a> <a rel=next href=advanced-iterators.html title="onward to &#8220;Advanced Iterators&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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>
View File
View File
View File
View File
+2 -2
View File
@@ -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 &#8220;Your First Python Program&#8221;"><span>&#x261C;</span></a> <a rel=next href=strings.html title="onward to &#8220;Strings&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Where To Go From Here&#8221;"><span>&#x261C;</span></a> <a rel=next href=special-method-names.html title="onward to &#8220;Special Method Names&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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>
+10 -20
View File
@@ -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
View File
@@ -474,5 +474,5 @@ OK</samp></pre>
</ul>
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Strings&#8221;"><span>&#x261C;</span></a> <a rel=next href=generators.html title="onward to &#8220;Generators&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Porting code to Python 3 with 2to3&#8221;"><span>&#x261C;</span></a> <a rel=next href=further-further-reading.html title="onward to &#8220;Further Further Reading&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Native Datatypes&#8221;"><span>&#x261C;</span></a> <a rel=next href=regular-expressions.html title="onward to &#8220;Regular Expressions&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -568,5 +568,5 @@ For instance, the <code>testFromRomanCase</code> method (&#8220;<code>from_roman
-->
<p class=c>&copy; 2001&ndash;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
View File
@@ -40,5 +40,5 @@ h3:before{content:""}
<p>That&#8217;s it for now; the book&#8217;s not finished yet! The file I/O subsystem is totally different now; I hope to write about that soon.
<p class=c>&copy; 2001&ndash;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
View File
@@ -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 &#8220;Case Study: Porting chardet to Python 3&#8221;"><span>&#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>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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
View File
@@ -641,5 +641,5 @@ lxml.etree.XMLSyntaxError: Entity 'hellip' not defined, line 3, column 28</samp>
</ul>
<p class=c>&copy; 2001&ndash;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
View File
@@ -282,5 +282,5 @@ if __name__ == "__main__":
</ul>
<p class=nav><a rel=prev class=todo><span>&#x261C;</span></a> <a rel=next href=native-datatypes.html title="onward to &#8220;Native Datatypes&#8221;"><span>&#x261E;</span></a>
<p class=c>&copy; 2001&ndash;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>