Skip to content

Commit

Permalink
Release 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
ttscoff committed Nov 30, 2014
1 parent 380718c commit 2dc5444
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 5 deletions.
40 changes: 40 additions & 0 deletions PoorText.popclipext/Config.plist
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>
4 changes: 4 additions & 0 deletions PoorText.popclipext/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Poor Text
===

Make rich text go broke. (It strips formatting.)
Binary file added PoorText.popclipext/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions PoorText.popclipext/script.sh
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 $?
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17
1.18
39 changes: 35 additions & 4 deletions build.sh
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

0 comments on commit 2dc5444

Please sign in to comment.