summaryrefslogtreecommitdiff
path: root/scripts/convert_pa.rb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/convert_pa.rb')
-rwxr-xr-xscripts/convert_pa.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/convert_pa.rb b/scripts/convert_pa.rb
new file mode 100755
index 0000000..00b4831
--- /dev/null
+++ b/scripts/convert_pa.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+while STDIN.gets
+ tokens = $_.chomp.encode("UTF-8", {:invalid => :replace, :undef => :replace}).split(";")
+ begin
+ #puts "\"#{tokens[0]}\",\"#{tokens.last}\"" if tokens[3]
+ puts "#{tokens[0]},#{tokens.last}" if tokens[3]
+ #puts tokens.last if tokens[3]
+ rescue
+ end
+end