This file contains hidden or 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
""" | |
A quick utility script I threw together to find some files that had been | |
committed as `UTF-8 With BOM`. I also had the script open the files in BBEdit | |
so I could quickly change the files to plain UTF-8 (no byte-order mark). | |
There may be a way to do this safely within Python, but... meh. | |
""" | |
from __future__ import print_function | |
import codecs | |
import os |
This file contains hidden or 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
tell application "BBEdit" | |
set x to startLine of selection | |
tell text 1 of window 1 | |
if x = 1 then return | |
set myline to line x | |
set title_line to line (x - 1) | |
set underline_char to contents of first character of myline | |
set underline_str to "" | |
repeat (length of title_line) times | |
set underline_str to underline_str & underline_char |
This file contains hidden or 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
#!/usr/bin/env python2.6 | |
""" | |
A quick script to install into your `Application Support/BBEdit/Scripts` folder. | |
This runs PyFlakes (requires PyFlakes to be installed at `/usr/local/bin` - | |
try ``/usr/bin/easy_install-2.6 pyflakes==0.4.0``) and reformats the results | |
so that they show up in BBEdit's search results / error / warnings window. Then | |
the errors can be stepped through one at a time. | |
I've bound this to control-shift-V. You must save your Python file first before | |
running the check. |