DRMacIver-gourmand 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,26 +1,19 @@
1
1
  ## Gourmand
2
2
 
3
- Gourmand automatically imports links you've up voted on reddit and other social bookmarking sites into delicious. You simply provide it with your account details on each and set up a cron job to run it regularly. It takes care of the rest.
3
+ Gourmand automatically imports links from other sites you use into delicious. You simply provide it with your account details on each and set up a cron job to run it regularly. It takes care of the rest.
4
4
 
5
- ### Notes on behaviour:
5
+ ### Notes on behaviour
6
6
 
7
- * Despite the name, reddilicous actually imports from a bunch of different sites. Currently only twitter, reddit and stumbleupon, but that's purely a function of the fact that those are the ones I use at the moment.
8
- * Links are tagged with via:source, plus any tags that can be obtained from there.
7
+ * Gourmand currently imports twitter, reddit and stumbleupon, but that's purely a function of the fact that those are the ones I use at the moment. It could easily do more.
8
+ * Links are tagged with via:source, plus any tags that can be obtained from there. They are tagged imported_by:gourmand if you don't already have a bookmark of that name.
9
9
  * The date on the link will be set to that at which the URL was initially posted on the source site, not the time you imported it (which plays badly with historical data) or the time you up voted it (which doesn't seem to be available information everywhere).
10
- * It will import all your histories, so the initial run will take a while.
11
- * This is very slow. There's a mixture of reasons for this - it's written in Ruby, it generate a fair bit of HTTP traffic and it deliberately rate limits itself in a lot of cases. The single biggest reason though is that I don't particularly care and I haven't optimised it. It's intended to be run a couple times an hour by an automated task, and you have to hit pretty damn heavy traffic before it's too slow for that.
10
+ * It will import all your history, so the initial run will take a while.
11
+ * It's still rather slow. There's a mixture of reasons for this - it's written in Ruby, it generate a fair bit of HTTP traffic and it deliberately rate limits itself in a lot of cases. The single biggest reason though is that I don't particularly care and I haven't optimised it. It's intended to be run a couple times an hour by an automated task, and you have to hit pretty damn heavy traffic before it's too slow for that.
12
12
  * Twitter support will pull in any URLs mentioned on your friends time-line, automatically tagging them based on delicious suggestions and tagging them with information about who it was to and from.
13
13
 
14
14
 
15
- ### Some general comments:
15
+ ### General comments
16
16
 
17
17
  * The code is currently a bit grim in places. Some of this is inevitable - site scraping is never going to look pretty - some of it will probably be cleaned up at various points.
18
18
  * Patches are *exceedingly* welcome. There are a pile of sites this could reasonably import from, and I don't use so much as a tenth of them. If you want this to handle your favourite social bookmarking or similar site, please feel free to submit a patch.
19
19
  * I'm currently changing the internal format on a semi regular basis as I figure things out. Once I've got an actual release out I'll have a proper versioning system for upgrades, etc. but I don't yet.
20
-
21
- ### Dependencies
22
-
23
- * [json](http://json.rubyforge.org/)
24
- * [nokogiri](http://github.com/tenderlove/nokogiri/tree/master)
25
- * [httparty](http://github.com/jnunemaker/httparty/tree/master)
26
- * [mechanize](http://mechanize.rubyforge.org/mechanize/) (for stumbleupon)
data/Rakefile CHANGED
@@ -9,5 +9,9 @@ Jeweler::Tasks.new do |gem|
9
9
  gem.homepage = "http://github.com/DRMacIver/gourmand"
10
10
  gem.authors = ["David R. MacIver"]
11
11
 
12
+ gem.add_dependency("nokogiri")
13
+ gem.add_dependency("json_pure")
14
+ gem.add_dependency("mechanize")
15
+ gem.add_dependency("httparty")
12
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
17
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/gourmand CHANGED
@@ -16,7 +16,7 @@ def usage
16
16
  exit(1)
17
17
  end
18
18
 
19
- dir=ENV["REDDILICIOUS_HOME"] || File.join(ENV["HOME"], ".gourmand")
19
+ dir=ENV["GOURMAND_HOME"] || File.join(ENV["HOME"], ".gourmand")
20
20
  gourmand = Reddilicious.new(dir)
21
21
 
22
22
  if !File.directory?(dir)
data/gourmand.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gourmand}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["David R. MacIver"]
9
- s.date = %q{2009-07-16}
9
+ s.date = %q{2009-07-17}
10
10
  s.default_executable = %q{gourmand}
11
11
  s.email = %q{david.maciver@gmail.com}
12
12
  s.executables = ["gourmand"]
@@ -41,8 +41,20 @@ Gem::Specification.new do |s|
41
41
  s.specification_version = 3
42
42
 
43
43
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
45
+ s.add_runtime_dependency(%q<json_pure>, [">= 0"])
46
+ s.add_runtime_dependency(%q<mechanize>, [">= 0"])
47
+ s.add_runtime_dependency(%q<httparty>, [">= 0"])
44
48
  else
49
+ s.add_dependency(%q<nokogiri>, [">= 0"])
50
+ s.add_dependency(%q<json_pure>, [">= 0"])
51
+ s.add_dependency(%q<mechanize>, [">= 0"])
52
+ s.add_dependency(%q<httparty>, [">= 0"])
45
53
  end
46
54
  else
55
+ s.add_dependency(%q<nokogiri>, [">= 0"])
56
+ s.add_dependency(%q<json_pure>, [">= 0"])
57
+ s.add_dependency(%q<mechanize>, [">= 0"])
58
+ s.add_dependency(%q<httparty>, [">= 0"])
47
59
  end
48
60
  end
data/lib/twitter.rb CHANGED
@@ -54,7 +54,7 @@ module Twitter
54
54
  post.tags
55
55
  ].compact.flatten.join(" ").strip
56
56
 
57
- post.extended = "Imported from http://twitter.com/#{res["user"]["screen_name"]}/status/#{res["id"]}\n\n#{res["text"]}"
57
+ post.extended = "@#{res["user"]["screen_name"]}: \"#{res["text"]}\" \n (from http://twitter.com/#{res["user"]["screen_name"]}/status/#{res["id"]})"
58
58
  post.dt = date(res).strftime("%Y-%m-%dT%H:%M:%SZ")
59
59
 
60
60
  post
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DRMacIver-gourmand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David R. MacIver
@@ -9,10 +9,49 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-16 00:00:00 -07:00
12
+ date: 2009-07-17 00:00:00 -07:00
13
13
  default_executable: gourmand
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: nokogiri
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: json_pure
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: mechanize
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: httparty
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
16
55
  description:
17
56
  email: david.maciver@gmail.com
18
57
  executables: