-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Actions</key> | ||
<array> | ||
<dict> | ||
<key>Image File</key> | ||
<string>icon.png</string> | ||
<key>Script Interpreter</key> | ||
<string>/bin/bash</string> | ||
<key>Shell Script File</key> | ||
<string>script.sh</string> | ||
<key>Title</key> | ||
<string>PoorText</string> | ||
<key>After</key> | ||
<string>paste-result</string> | ||
<key>Requirements</key> | ||
<array> | ||
<string>paste</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>Credits</key> | ||
<array> | ||
<key>Name</key> | ||
<string>Brett Terpstra</string> | ||
<key>Link</key> | ||
<string>http://brettterpstra.com</string> | ||
</array> | ||
<key>Extension Description</key> | ||
<string>Strip rich text formatting</string> | ||
<key>Extension Identifier</key> | ||
<string>com.brettterpstra.popclip.extension.poortext</string> | ||
<key>Extension Name</key> | ||
<string>PoorText</string> | ||
<key>Version</key> | ||
<integer>2</integer> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Poor Text | ||
=== | ||
|
||
Make rich text go broke. (It strips formatting.) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
logger "$POPCLIP_TEXT" | ||
|
||
echo -n "$POPCLIP_TEXT"|pbcopy|pbpaste | ||
|
||
logger $? |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.17 | ||
1.18 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
#!/bin/bash | ||
version=$(cat VERSION|tr -d "\n") | ||
newversion=$(echo "$version + .01"|bc) | ||
for file in *.popclipext; do zip ${file}z $file/*; done | ||
zip BrettsPopclipExtensions$newversion.zip *.popclipextz README.md | ||
filename=BrettsPopclipExtensions$newversion.zip | ||
for file in *.popclipext; do zip ${file}z $file/* &> /dev/null; done | ||
zip $filename *.popclipextz README.md &> /dev/null | ||
rm *.popclipextz | ||
echo $newversion > VERSION | ||
[[ $1 == "pub" ]] && git release $newversion | ||
[[ $USER == "ttscoff" ]] && mv BrettsPopclipExtensions$newversion.zip ~/Sites/dev/bt/source/downloads/ | ||
|
||
if [[ $1 == "pub" ]]; then | ||
res=$(/usr/bin/env ruby -rcsv -rfileutils <<EORUBY | ||
csvfile = File.expand_path("~/Sites/dev/bt/downloads.csv") | ||
FileUtils.cp(csvfile, csvfile+".bak") | ||
downloads = CSV.read(csvfile) | ||
t = Time.now | ||
updated = t.strftime("%a %b %d %H:%M:%S %z %Y") | ||
updated_short = t.strftime("%Y-%m-%d") | ||
f = File.open(csvfile,"wb") | ||
downloads.map! {|row| | ||
if row[0] == "78" | ||
answers = {"id" => "78", "version" => "$newversion", "filename" => "$filename"} | ||
row[2] = %Q{/downloads/#{answers["filename"]}} | ||
row[3] = answers["version"] | ||
row[7] = updated | ||
end | ||
f.puts row.to_csv | ||
} | ||
project_file = File.expand_path("~/Sites/dev/bt/source/_projects/bretts-popclip-extensions.md") | ||
project_text = IO.read(project_file) | ||
project_text.sub!(/^updated: [\d\-]+.*$/,"updated: #{updated_short}") | ||
File.open(project_file,'w+') do |f| | ||
f.puts(project_text) | ||
end | ||
puts "OK" | ||
EORUBY | ||
); | ||
[[ $res == "OK" ]] && echo $newversion > VERSION | ||
git release $newversion | ||
fi |