This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BeautifulSoup import BeautifulSoup | |
def _remove_attrs(soup): | |
for tag in soup.findAll(True): | |
tag.attrs = None | |
return soup | |
def example(): | |
doc = '<html><head><title>test</title></head><body id="foo" onload="whatever"><p class="whatever">junk</p><div style="background: yellow;" id="foo" class="blah">blah</div></body></html>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn status | grep '?' | sed 's/^.* /svn add /' | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn add `svn status .|grep "^?"|awk '{print $2}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Requires ImageMagick | |
# Updates ImageInfo.plist -- plist file should already exist | |
# and initialized as /usr/libexec/PlistBuddy -c "Clear array" ImageInfo.plist | |
IMAGEINFOFILE="ImageInfo.plist" | |
/usr/libexec/PlistBuddy -c "Clear array" $IMAGEINFOFILE | |
INDEX=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d ./png ]; then mkdir ./png; fi; | |
# convert Adobe Illustrator to pngs | |
# uses ImageMagick | |
for f in *.ai; | |
do | |
echo "Processing $f" | |
convert -density 300 $f ./png/${f/.ai}_raw.png |
NewerOlder