Permalink
Browse files

Revert "remove ftools dependency"

This reverts commit 824bc50.
  • Loading branch information...
1 parent 824bc50 commit dd12ba4003334e0b63718e2ab946caecd553f107 @ttscoff committed Oct 3, 2011
Showing with 2 additions and 44 deletions.
  1. +0 −13 config.yml
  2. +0 −27 configtest.rb
  3. +2 −4 getpinboard.rb
View
@@ -1,13 +0,0 @@
----
-create_thumbs: true
-always_tag: pinboard
-pdf_location: /Users/ttscoff/Dropbox/Sync/WebPDF
-db_location: /Users/ttscoff/Dropbox/Sync/Bookmark
-gzip_db: false
-pdf_tag: pdfit
-update_tags_db: true
-debug: false
-target: /Users/ttscoff/Dropbox/Sync/Bookmark
-password: pinboardpass
-user: pinboarduser
-tag_method: 1
View
@@ -1,27 +0,0 @@
-#!/usr/bin/ruby -w
-require 'yaml'
-
-configfile = "#{ENV['HOME']}/getpinboard.yaml"
-
-if File.exists? configfile
- conf = open(configfile) {|f| YAML.load(f) }
-else
- config = { "target" => "#{ENV['HOME']}/Dropbox/Sync/Bookmark",
- "user" => "pinboarduser",
- "password" => "pinboardpass",
- "db_location" => "#{ENV['HOME']}/Dropbox/Sync/Bookmark",
- "pdf_location" => "#{ENV['HOME']}/Dropbox/Sync/WebPDF",
- "tag_method" => 1,
- "always_tag" => "pinboard",
- "update_tags_db" => true,
- "create_thumbs" => true,
- "pdf_tag" => 'pdfit',
- "debug" => false,
- "gzip_db" => false
- }
- File.open(configfile, 'w') {|f| YAML.dump(config, f)}
- exit
-end
-
-
-puts conf['user']
View
@@ -94,7 +94,7 @@ def pick_editor
exit
end
-%w[fileutils set net/https zlib rexml/document time base64 cgi stringio yaml].each do |filename|
+%w[fileutils ftools set net/https zlib rexml/document time base64 cgi stringio yaml].each do |filename|
require filename
end
@@ -707,9 +707,7 @@ def read_bookmarks
end
exit
end
-
update = pb.needs_update?
-# update = true
if update
message = "Found #{new_bookmarks.count} unindexed bookmarks"
message += ". Exiting." if new_bookmarks.count == 0
@@ -721,7 +719,7 @@ def read_bookmarks
counter = 0
if $conf['update_tags_db']
tags_db = File.join("#{ENV['HOME']}/Library/Application Support/Tags/Bookmarks.plist")
- # File.copy(tags_db,tags_db+'.bak')
+ File.copy(tags_db,tags_db+'.bak')
plist = Plist::parse_xml(tags_db)
end
new_bookmarks.each {|bookmark|

0 comments on commit dd12ba4

Please sign in to comment.