feed_torrents 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21ad154668a255b8742ae6691d8eeebd9c813f84
4
- data.tar.gz: 30a05e1c55e1e64f0f9950560e1c45781ef195b1
3
+ metadata.gz: cf83fb778aefc240479941d0dcecfbfe9b95a6dc
4
+ data.tar.gz: 8b9816f8fdb7847acc646b86b536f1149651a4d1
5
5
  SHA512:
6
- metadata.gz: dbdaf34b46c0cee3e7e25b7254381a98408764e6df4df76ee16b1ae17b2f9ac9873b47b671f084afebc029cc9a3162ac3e63e8fd2e2f0a2569a736837ad52bcd
7
- data.tar.gz: ee43832d7c5f93862dfe0ca7cce7c62649a6393327f12aa6d8bd86eb9ab4325cef016a1952300a0234cd635d56f617f9c25f0a0dceb395ea2a0d57f57b289208
6
+ metadata.gz: ee95f2a04e4a01254b521306f1634f986bcaa87b5d583e6ee5fcbe9c9188867e829887777b8e989e2d6c7d9b1d42063024ead27ee0c7bbf5cabb48f91bbcd38f
7
+ data.tar.gz: 4ccaf70f894a93fb19121de46a359519c8e38cdc70696ca1d5a2fc04e77e2a2df1e460a8b5fecb48252a3b9a20ceb4aff442b519eef765ad1233f05a64e13f23
data/README.md CHANGED
@@ -15,12 +15,28 @@ Create a configuration file: /tmp/feed_torrents.yml
15
15
  log:
16
16
  :out: STDOUT # or some file path
17
17
  :rotate: 5
18
- :size: 1048576 # 1MB
19
- :level: DEBUG
18
+ :size: 10485760 # 10MB
19
+ :level: INFO
20
20
  :format: '%Y-%m-%d %H:%M:%S'
21
21
 
22
22
  datastore: /tmp/feed_torrents.store
23
23
 
24
+ email:
25
+ :enabled: true
26
+ :to: john.doe@example.com
27
+ :from: feed_torrents@example.com
28
+ :delivery_method:
29
+ :smtp: true
30
+ :address: smtp.example.com
31
+ :port: 25
32
+
33
+ # alternative methods, check: https://github.com/mikel/mail
34
+ # :delivery_method:
35
+ # :sendmail: true
36
+ # :delivery_method:
37
+ # :exim: true
38
+ # :location: "/usr/bin/exim"
39
+
24
40
  # Default configuration items for a feed
25
41
  default_feed: &default_feed
26
42
  :enabled: true
@@ -38,7 +54,7 @@ feeds:
38
54
  :interval: 900
39
55
  :enabled: true
40
56
 
41
- nyaa:
57
+ tokyo_ghoul_s2:
42
58
  <<: *default_feed
43
59
  :url: 'http://www.nyaa.se/?page=rss&cats=1_37'
44
60
  :interval: 1800
@@ -51,49 +67,110 @@ feeds:
51
67
 
52
68
  Now simply start the application:
53
69
  ```bash
54
- feed_torrents /tmp/feed_torrents.yml
55
- I, [2015-01-10T20:32:24.171075 #21457] INFO -- : FeedTorrents::Reactor#initialize: Initialize new Reactor version 0.1.0
56
- I, [2015-01-10T20:32:24.171184 #21457] INFO -- : FeedTorrents::Reactor#start: Starting eventmachine loop
57
- I, [2015-01-10T20:32:24.171450 #21457] INFO -- : FeedTorrents::Feed::List#initialize: showrss (enabled: true interval: 900 link: http://showrss.info/rss.php?user_id=0000)
58
- I, [2015-01-10T20:32:24.171484 #21457] INFO -- : FeedTorrents::Feed::List#initialize: nyaa (enabled: true interval: 1800 link: http://www.nyaa.se/?page=rss&cats=1_37)
59
- I, [2015-01-10T20:32:24.171540 #21457] INFO -- : FeedTorrents::Feed::List#download_new_items: feed showrss
60
- I, [2015-01-10T20:32:24.182937 #21457] INFO -- : FeedTorrents::Feed::List#download_new_items: feed nyaa
61
- I, [2015-01-10T20:32:24.321911 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: American Horror Story 4x11 Magical Thinking 720p
62
- I, [2015-01-10T20:32:24.322063 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'American Horror Story 4x11 Magical Thinking 720p' (http://reflektor.karmorra.info/torrent/54D7C99225897595AF1E4F85B5B317FEEF0119C5.torrent)
63
- I, [2015-01-10T20:32:24.352748 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: American Horror Story 4x10 Orphans 720p
64
- I, [2015-01-10T20:32:24.352990 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'American Horror Story 4x10 Orphans 720p' (http://reflektor.karmorra.info/torrent/CA85592A0850E361AC0840ED510A036FA2A1828C.torrent)
65
- I, [2015-01-10T20:32:24.971696 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Tokyo Ghoul √A - 01 [720p][AAC].mp4
66
- I, [2015-01-10T20:32:24.971757 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Tokyo Ghoul √A - 01 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=643972)
67
- I, [2015-01-10T20:32:24.987967 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [HorribleSubs] Magic Kaito 1412 - 06 [1080p].mkv
68
- I, [2015-01-10T20:32:24.988158 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[HorribleSubs] Magic Kaito 1412 - 06 [1080p].mkv' (http://www.nyaa.se/?page=download&tid=643846)
69
- I, [2015-01-10T20:32:25.003946 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [HorribleSubs] Magic Kaito 1412 - 05 [1080p].mkv
70
- I, [2015-01-10T20:32:25.004167 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[HorribleSubs] Magic Kaito 1412 - 05 [1080p].mkv' (http://www.nyaa.se/?page=download&tid=643845)
71
- I, [2015-01-10T20:32:25.019271 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [HorribleSubs] Magic Kaito 1412 - 13 [1080p].mkv
72
- I, [2015-01-10T20:32:25.019460 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[HorribleSubs] Magic Kaito 1412 - 13 [1080p].mkv' (http://www.nyaa.se/?page=download&tid=643830)
73
- I, [2015-01-10T20:32:25.032232 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [HorribleSubs] Magic Kaito 1412 - 12 [1080p].mkv
74
- I, [2015-01-10T20:32:25.032379 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[HorribleSubs] Magic Kaito 1412 - 12 [1080p].mkv' (http://www.nyaa.se/?page=download&tid=643758)
75
- I, [2015-01-10T20:32:25.047954 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Beast Saga - 23 [720p][AAC].mp4
76
- I, [2015-01-10T20:32:25.048285 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Beast Saga - 23 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=643723)
77
- I, [2015-01-10T20:32:25.061514 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Fairy Tail &#40;2014&#41; - 40 [720p][AAC].mp4
78
- I, [2015-01-10T20:32:25.061733 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Fairy Tail &#40;2014&#41; - 40 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=643722)
79
- I, [2015-01-10T20:32:25.094340 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [HorribleSubs] Fairy Tail S2 - 40 [720p].mkv
80
- I, [2015-01-10T20:32:25.094561 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[HorribleSubs] Fairy Tail S2 - 40 [720p].mkv' (http://www.nyaa.se/?page=download&tid=643668)
81
- I, [2015-01-10T20:32:25.108556 #21457] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Military! - 01v2 [720p][AAC].mp4
82
- I, [2015-01-10T20:32:25.108750 #21457] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Military! - 01v2 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=643646)
83
- I, [2015-01-10T20:32:25.275709 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for American Horror Story 4x10 Orphans 720p completed
84
- I, [2015-01-10T20:32:25.289581 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Beast Saga - 23 [720p][AAC].mp4 completed
85
- I, [2015-01-10T20:32:25.337757 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Military! - 01v2 [720p][AAC].mp4 completed
86
- I, [2015-01-10T20:32:25.345284 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Tokyo Ghoul √A - 01 [720p][AAC].mp4 completed
87
- I, [2015-01-10T20:32:25.394842 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Fairy Tail &#40;2014&#41; - 40 [720p][AAC].mp4 completed
88
- I, [2015-01-10T20:32:25.413424 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [HorribleSubs] Fairy Tail S2 - 40 [720p].mkv completed
89
- I, [2015-01-10T20:32:25.441256 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [HorribleSubs] Magic Kaito 1412 - 06 [1080p].mkv completed
90
- I, [2015-01-10T20:32:25.445882 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [HorribleSubs] Magic Kaito 1412 - 13 [1080p].mkv completed
91
- I, [2015-01-10T20:32:25.468350 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [HorribleSubs] Magic Kaito 1412 - 05 [1080p].mkv completed
92
- I, [2015-01-10T20:32:25.475861 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [HorribleSubs] Magic Kaito 1412 - 12 [1080p].mkv completed
93
- I, [2015-01-10T20:32:30.767287 #21457] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for American Horror Story 4x11 Magical Thinking 720p completed
70
+ $ bin/feed_torrents examples/config.yml
71
+ I, [2015-01-22T22:53:06.531022 #6424] INFO -- : FeedTorrents::Reactor#initialize: Initialize new Reactor version 0.2.0
72
+ I, [2015-01-22T22:53:06.531130 #6424] INFO -- : FeedTorrents::Reactor#start: Starting eventmachine loop
73
+ I, [2015-01-22T22:53:06.531376 #6424] INFO -- : FeedTorrents::Feed::List#initialize: showrss (enabled: true interval: 900 link: http://showrss.info/rss.php?user_id=0000)
74
+ I, [2015-01-22T22:53:06.531474 #6424] INFO -- : FeedTorrents::Feed::List#initialize: tokyo_ghoul_s2 (enabled: true interval: 1800 link: http://www.nyaa.se/?page=rss&cats=1_37)
75
+ I, [2015-01-22T22:53:06.531568 #6424] INFO -- : FeedTorrents::Feed::List#download_new_items: feed showrss
76
+ I, [2015-01-22T22:53:06.542897 #6424] INFO -- : FeedTorrents::Feed::List#download_new_items: feed tokyo_ghoul_s2
77
+ I, [2015-01-22T22:53:06.687179 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: American Horror Story 4x13 Curtain Call 720p
78
+ I, [2015-01-22T22:53:06.687365 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'American Horror Story 4x13 Curtain Call 720p' (http://reflektor.karmorra.info/torrent/E7F50A63ADEE23241B79C2716F42F31C10F68DF7.torrent)
79
+ I, [2015-01-22T22:53:06.710212 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Criminal Minds 10x12 Anonymous 720p
80
+ I, [2015-01-22T22:53:06.710414 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Criminal Minds 10x12 Anonymous 720p' (http://reflektor.karmorra.info/torrent/87E02D33B7E2CEAF276088431B0E90A22ED39DEE.torrent)
81
+ I, [2015-01-22T22:53:06.721271 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Banshee 3x02 The Fire Trials 720p
82
+ I, [2015-01-22T22:53:06.721435 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Banshee 3x02 The Fire Trials 720p' (http://reflektor.karmorra.info/torrent/3FF2FB913F01EAA6D7BC1090942165A78547936F.torrent)
83
+ I, [2015-01-22T22:53:06.758742 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: American Horror Story 4x12 Show Stoppers 720p
84
+ I, [2015-01-22T22:53:06.758910 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'American Horror Story 4x12 Show Stoppers 720p' (http://reflektor.karmorra.info/torrent/1A116B745BEBFA3F3DD2F52905097C2A2ECEC525.torrent)
85
+ I, [2015-01-22T22:53:06.794403 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Modern Family 6x12 The Big Guns 720p REPACK
86
+ I, [2015-01-22T22:53:06.794646 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Modern Family 6x12 The Big Guns 720p REPACK' (http://reflektor.karmorra.info/torrent/1C4574B1AD6DC3388944262B54CBD652049AA3ED.torrent)
87
+ I, [2015-01-22T22:53:06.805547 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Criminal Minds 10x11 The Forever People 720p
88
+ I, [2015-01-22T22:53:06.805749 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Criminal Minds 10x11 The Forever People 720p' (http://reflektor.karmorra.info/torrent/5321CF7A773A7E611C1FB001D0D6F31988132E71.torrent)
89
+ I, [2015-01-22T22:53:06.816308 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Modern Family 6x12 The Big Guns 720p
90
+ I, [2015-01-22T22:53:06.816481 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Modern Family 6x12 The Big Guns 720p' (http://reflektor.karmorra.info/torrent/4BD097B6813575DE4D22C834B1C3710F3529A991.torrent)
91
+ I, [2015-01-22T22:53:06.826807 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Pretty Little Liars 5x15 Fresh Meat 720p
92
+ I, [2015-01-22T22:53:06.827014 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Pretty Little Liars 5x15 Fresh Meat 720p' (http://reflektor.karmorra.info/torrent/0C7C93C8787576C2B4C094C6183B2778EC910AFA.torrent)
93
+ I, [2015-01-22T22:53:06.838061 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Girls 4x01 Iowa 720p
94
+ I, [2015-01-22T22:53:06.838247 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Girls 4x01 Iowa 720p' (http://reflektor.karmorra.info/torrent/F993F4C5D9A7373D563F60AC4AC77CA9F53B0813.torrent)
95
+ I, [2015-01-22T22:53:06.848419 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Banshee 3x01 Snakes and Whatnot 720p
96
+ I, [2015-01-22T22:53:06.848557 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Banshee 3x01 Snakes and Whatnot 720p' (http://reflektor.karmorra.info/torrent/CC3A360BB69B64B74332A47E30B0E88B191BFE90.torrent)
97
+ I, [2015-01-22T22:53:06.858397 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Shameless (US) 5x01 Milk of the Gods 720p
98
+ I, [2015-01-22T22:53:06.858560 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Shameless (US) 5x01 Milk of the Gods 720p' (http://reflektor.karmorra.info/torrent/3D8D9408C4E3C5E030865998A1204F230AAA1F88.torrent)
99
+ I, [2015-01-22T22:53:06.871403 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: The Big Bang Theory 8x12 The Space Probe Disintegration 720p
100
+ I, [2015-01-22T22:53:06.871545 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'The Big Bang Theory 8x12 The Space Probe Disintegration 720p' (http://reflektor.karmorra.info/torrent/33E433D1DCF1B4688652DD347EB3EFE5EF37D976.torrent)
101
+ I, [2015-01-22T22:53:06.881819 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: American Horror Story 4x11 Magical Thinking 720p
102
+ I, [2015-01-22T22:53:06.881963 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'American Horror Story 4x11 Magical Thinking 720p' (http://reflektor.karmorra.info/torrent/54D7C99225897595AF1E4F85B5B317FEEF0119C5.torrent)
103
+ I, [2015-01-22T22:53:06.892960 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: Modern Family 6x11 The Day We Almost Died 720p
104
+ I, [2015-01-22T22:53:06.893158 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for 'Modern Family 6x11 The Day We Almost Died 720p' (http://reflektor.karmorra.info/torrent/E268F07BBDACDDBEA2E1EB960F22397E785658D2.torrent)
105
+ I, [2015-01-22T22:53:06.964191 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for American Horror Story 4x12 Show Stoppers 720p completed
106
+ I, [2015-01-22T22:53:06.965691 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent American Horror Story 4x12 Show Stoppers 720p"
107
+ I, [2015-01-22T22:53:07.759406 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Naruto Shippuuden - 396 [720p][AAC].mp4
108
+ I, [2015-01-22T22:53:07.759496 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Naruto Shippuuden - 396 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647909)
109
+ I, [2015-01-22T22:53:07.770160 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Saenai Heroine no Sodatekata - 01v2 [720p][AAC].mp4
110
+ I, [2015-01-22T22:53:07.770264 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Saenai Heroine no Sodatekata - 01v2 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647906)
111
+ I, [2015-01-22T22:53:07.781354 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Pri Para - 25 [720p][AAC].mp4
112
+ I, [2015-01-22T22:53:07.781460 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Pri Para - 25 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647762)
113
+ I, [2015-01-22T22:53:07.793017 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Aikatsu! 3 - 15 [720p][AAC].mp4
114
+ I, [2015-01-22T22:53:07.793111 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Aikatsu! 3 - 15 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647752)
115
+ I, [2015-01-22T22:53:07.803203 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Magic Kaito 1412 - 14 [720p][AAC].mp4
116
+ I, [2015-01-22T22:53:07.803273 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Magic Kaito 1412 - 14 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647746)
117
+ I, [2015-01-22T22:53:07.813816 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Lady Jewelpet - 40 [720p][AAC].mp4
118
+ I, [2015-01-22T22:53:07.813925 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Lady Jewelpet - 40 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647744)
119
+ I, [2015-01-22T22:53:07.825975 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Kantai Collection: KanColle - 03 [720p][AAC].mp4
120
+ I, [2015-01-22T22:53:07.826071 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Kantai Collection: KanColle - 03 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647736)
121
+ I, [2015-01-22T22:53:07.836936 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Shirobako - 14 [720p][AAC].mp4
122
+ I, [2015-01-22T22:53:07.837000 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Shirobako - 14 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647632)
123
+ I, [2015-01-22T22:53:07.847978 #6424] INFO -- : FeedTorrents::Feed::List#process: Processing: [DeadFish] Military! - 03 [720p][AAC].mp4
124
+ I, [2015-01-22T22:53:07.848086 #6424] INFO -- : FeedTorrents::Feed::Download#process: Downloading torrent for '[DeadFish] Military! - 03 [720p][AAC].mp4' (http://www.nyaa.se/?page=download&tid=647622)
125
+ I, [2015-01-22T22:53:07.858415 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Banshee 3x02 The Fire Trials 720p completed
126
+ I, [2015-01-22T22:53:07.858795 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Banshee 3x02 The Fire Trials 720p"
127
+ I, [2015-01-22T22:53:08.417662 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Shirobako - 14 [720p][AAC].mp4 completed
128
+ I, [2015-01-22T22:53:08.418242 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Shirobako - 14 [720p][AAC].mp4"
129
+ I, [2015-01-22T22:53:08.787704 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Naruto Shippuuden - 396 [720p][AAC].mp4 completed
130
+ I, [2015-01-22T22:53:08.788221 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Naruto Shippuuden - 396 [720p][AAC].mp4"
131
+ I, [2015-01-22T22:53:09.142041 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Saenai Heroine no Sodatekata - 01v2 [720p][AAC].mp4 completed
132
+ I, [2015-01-22T22:53:09.142926 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Saenai Heroine no Sodatekata - 01v2 [720p][AAC].mp4"
133
+ I, [2015-01-22T22:53:09.534063 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Pri Para - 25 [720p][AAC].mp4 completed
134
+ I, [2015-01-22T22:53:09.534611 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Pri Para - 25 [720p][AAC].mp4"
135
+ I, [2015-01-22T22:53:09.930719 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Aikatsu! 3 - 15 [720p][AAC].mp4 completed
136
+ I, [2015-01-22T22:53:09.931277 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Aikatsu! 3 - 15 [720p][AAC].mp4"
137
+ I, [2015-01-22T22:53:10.314165 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Magic Kaito 1412 - 14 [720p][AAC].mp4 completed
138
+ I, [2015-01-22T22:53:10.314981 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Magic Kaito 1412 - 14 [720p][AAC].mp4"
139
+ I, [2015-01-22T22:53:10.706277 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Lady Jewelpet - 40 [720p][AAC].mp4 completed
140
+ I, [2015-01-22T22:53:10.707293 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Lady Jewelpet - 40 [720p][AAC].mp4"
141
+ I, [2015-01-22T22:53:11.088947 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Kantai Collection: KanColle - 03 [720p][AAC].mp4 completed
142
+ I, [2015-01-22T22:53:11.089470 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Kantai Collection: KanColle - 03 [720p][AAC].mp4"
143
+ I, [2015-01-22T22:53:11.455801 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for [DeadFish] Military! - 03 [720p][AAC].mp4 completed
144
+ I, [2015-01-22T22:53:11.456544 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent [DeadFish] Military! - 03 [720p][AAC].mp4"
145
+ I, [2015-01-22T22:53:11.832191 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for American Horror Story 4x13 Curtain Call 720p completed
146
+ I, [2015-01-22T22:53:11.832747 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent American Horror Story 4x13 Curtain Call 720p"
147
+ I, [2015-01-22T22:53:12.206463 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Criminal Minds 10x12 Anonymous 720p completed
148
+ I, [2015-01-22T22:53:12.207347 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Criminal Minds 10x12 Anonymous 720p"
149
+ I, [2015-01-22T22:53:12.590551 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Modern Family 6x12 The Big Guns 720p REPACK completed
150
+ I, [2015-01-22T22:53:12.591390 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Modern Family 6x12 The Big Guns 720p REPACK"
151
+ I, [2015-01-22T22:53:12.967428 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Criminal Minds 10x11 The Forever People 720p completed
152
+ I, [2015-01-22T22:53:12.968011 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Criminal Minds 10x11 The Forever People 720p"
153
+ I, [2015-01-22T22:53:13.351581 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Modern Family 6x12 The Big Guns 720p completed
154
+ I, [2015-01-22T22:53:13.352268 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Modern Family 6x12 The Big Guns 720p"
155
+ I, [2015-01-22T22:53:13.719454 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Pretty Little Liars 5x15 Fresh Meat 720p completed
156
+ I, [2015-01-22T22:53:13.720047 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Pretty Little Liars 5x15 Fresh Meat 720p"
157
+ I, [2015-01-22T22:53:14.104754 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Girls 4x01 Iowa 720p completed
158
+ I, [2015-01-22T22:53:14.105347 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Girls 4x01 Iowa 720p"
159
+ I, [2015-01-22T22:53:14.478242 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Banshee 3x01 Snakes and Whatnot 720p completed
160
+ I, [2015-01-22T22:53:14.478855 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Banshee 3x01 Snakes and Whatnot 720p"
161
+ I, [2015-01-22T22:53:14.862579 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Shameless (US) 5x01 Milk of the Gods 720p completed
162
+ I, [2015-01-22T22:53:14.863374 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Shameless (US) 5x01 Milk of the Gods 720p"
163
+ I, [2015-01-22T22:53:15.227231 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for The Big Bang Theory 8x12 The Space Probe Disintegration 720p completed
164
+ I, [2015-01-22T22:53:15.227845 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent The Big Bang Theory 8x12 The Space Probe Disintegration 720p"
165
+ I, [2015-01-22T22:53:15.603801 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for American Horror Story 4x11 Magical Thinking 720p completed
166
+ I, [2015-01-22T22:53:15.605038 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent American Horror Story 4x11 Magical Thinking 720p"
167
+ I, [2015-01-22T22:53:15.987290 #6424] INFO -- : FeedTorrents::Feed::Download#block in process: Downloading torrent for Modern Family 6x11 The Day We Almost Died 720p completed
168
+ I, [2015-01-22T22:53:15.988901 #6424] INFO -- : FeedTorrents::Mail#mail: Sending an email to "john.doe@example.com" with subject: "[FeedTorrents] Downloaded torrent Modern Family 6x11 The Day We Almost Died 720p"
94
169
  ```
95
170
 
96
- My qbittorrent-nox headless torrent client with webui loves this!
171
+ You can also call the executable with --test-email for sending a test email or with --test-filters to print what would be downloaded and which filter matches.
172
+
173
+ This works great with my qbittorrent-nox headless torrent client with webui!
97
174
 
98
175
  ## Upstart script
99
176
 
@@ -16,12 +16,14 @@ end
16
16
  require 'feed_torrents'
17
17
 
18
18
  FeedTorrents.configuration.filter_testing = true if ARGV.delete('--test-filters')
19
+ send_test_email = ARGV.delete('--test-email')
19
20
 
20
21
  if ARGV.length != 1
21
22
  puts "Usage: #{$0} <configfile> [--test-filters]"
22
23
  puts "Retrieves rss lists every interval and downloads new torrents from torrent or magnet links"
23
24
  puts
24
25
  puts " --test-filters Prints all matches to STDOUT and won't do anything else"
26
+ puts " --test-email Send a test email"
25
27
  puts
26
28
  puts "Report bugs at: https://github.com/TvL2386/feed_torrents/issues"
27
29
  exit 1
@@ -29,6 +31,11 @@ else
29
31
  FeedTorrents.configuration.yaml_from_file ARGV[0]
30
32
  end
31
33
 
34
+ if send_test_email
35
+ FeedTorrents::Mail.new.send_test_email
36
+ exit 0
37
+ end
38
+
32
39
  if FeedTorrents.configuration.filter_testing?
33
40
  puts 'Filter testing enabled. Please press CTRL+C when you are done'.yellow.bold
34
41
  puts
@@ -7,6 +7,22 @@ log:
7
7
 
8
8
  datastore: /tmp/feed_torrents.store
9
9
 
10
+ email:
11
+ :enabled: true
12
+ :to: john.doe@example.com
13
+ :from: feed_torrents@example.com
14
+ :delivery_method:
15
+ :smtp: true
16
+ :address: smtp.example.com
17
+ :port: 25
18
+
19
+ # alternative methods, check: https://github.com/mikel/mail
20
+ # :delivery_method:
21
+ # :sendmail: true
22
+ # :delivery_method:
23
+ # :exim: true
24
+ # :location: "/usr/bin/exim"
25
+
10
26
  # Default configuration items for a feed
11
27
  default_feed: &default_feed
12
28
  :enabled: true
@@ -19,6 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.add_dependency 'simple-rss', '~> 1.3'
20
20
  gem.add_dependency 'em-http-request', '~> 1.1'
21
21
  gem.add_dependency 'term-ansicolor', '~> 1.3'
22
+ gem.add_dependency 'mail', '~> 2.6'
22
23
 
23
24
  gem.add_development_dependency 'bundler', '~> 1.5'
24
25
  gem.add_development_dependency 'rake', '~> 10.4'
@@ -1,6 +1,8 @@
1
1
  require 'term/ansicolor'
2
2
  include Term::ANSIColor
3
3
 
4
+ require 'mail'
5
+
4
6
  require 'feed_torrents/log_functions'
5
7
  require 'feed_torrents/configuration'
6
8
 
@@ -12,3 +14,5 @@ require 'feed_torrents/feed/factory'
12
14
  require 'feed_torrents/feed/list'
13
15
  require 'feed_torrents/feed/download'
14
16
  require 'feed_torrents/feed/magnet-uri'
17
+
18
+ require 'feed_torrents/mail'
@@ -29,6 +29,8 @@ module FeedTorrents
29
29
  info "Downloading torrent for #{@title} completed"
30
30
  fh.close
31
31
  FeedTorrents.store.persist(@link)
32
+
33
+ FeedTorrents::Mail.new.send_email("Downloaded torrent #{@title}")
32
34
  end
33
35
  end
34
36
  end
@@ -0,0 +1,54 @@
1
+ module FeedTorrents
2
+ class Mail
3
+ include LogFunctions
4
+
5
+ PREFIX = "[FeedTorrents] "
6
+
7
+ def send_test_email
8
+ mail(subject: "#{PREFIX}Test email", body: 'test email')
9
+ end
10
+
11
+ def send_email(subject)
12
+ return unless FeedTorrents.configuration.email[:enabled]
13
+
14
+ mail(subject: "#{PREFIX}#{subject}", body: 'See subject! :-)')
15
+ end
16
+
17
+ private
18
+
19
+ def to
20
+ FeedTorrents.configuration.email[:to]
21
+ end
22
+
23
+ def mail(args)
24
+ obj = ::Mail.new
25
+
26
+ options = {
27
+ to: FeedTorrents.configuration.email[:to],
28
+ from: FeedTorrents.configuration.email[:from]
29
+ }.merge(args)
30
+
31
+ options.each { |k,v| obj[k] = v}
32
+
33
+ obj.delivery_method delivery_method, delivery_arguments
34
+
35
+ info "Sending an email to #{options[:to].inspect} with subject: #{options[:subject].inspect}"
36
+
37
+ obj.deliver
38
+ end
39
+
40
+ def delivery_method
41
+ [:smtp, :sendmail, :exim].each do |sym|
42
+ return sym if FeedTorrents.configuration.email[:delivery_method][sym]
43
+ end
44
+
45
+ raise ArgumentError, 'Unknown delivery method'
46
+ end
47
+
48
+ def delivery_arguments
49
+ args = FeedTorrents.configuration.email[:delivery_method].dup
50
+ args.delete(delivery_method)
51
+ args
52
+ end
53
+ end
54
+ end
@@ -1,3 +1,3 @@
1
1
  module FeedTorrents
2
- VERSION = '0.1.5'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feed_torrents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom van Leeuwen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-21 00:00:00.000000000 Z
11
+ date: 2015-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mail
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.6'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.6'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -162,6 +176,7 @@ files:
162
176
  - lib/feed_torrents/feed/list.rb
163
177
  - lib/feed_torrents/feed/magnet-uri.rb
164
178
  - lib/feed_torrents/log_functions.rb
179
+ - lib/feed_torrents/mail.rb
165
180
  - lib/feed_torrents/reactor.rb
166
181
  - lib/feed_torrents/store.rb
167
182
  - lib/feed_torrents/version.rb