graybook 1.0.24 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/{CHANGES.md → CHANGELOG} +13 -2
  2. data/README +94 -0
  3. data/Rakefile +3 -22
  4. data/VERSION +1 -1
  5. data/VERSION.yml +2 -2
  6. data/VERSION_NAME +1 -1
  7. data/lib/graybook/importer/aol.rb +11 -11
  8. data/lib/graybook/importer/gmail.rb +20 -20
  9. data/lib/graybook/importer/hotmail.rb +2 -4
  10. data/lib/graybook/importer/page_scraper.rb +4 -2
  11. data/lib/graybook/importer/yahoo.rb +12 -12
  12. data/lib/graybook.rb +20 -21
  13. metadata +9 -102
  14. data/README.md +0 -66
  15. data/debug_graybook.rb +0 -10
  16. data/lib/graybook/exporter/vcf.rb +0 -45
  17. data/lib/graybook/exporter/xml.rb +0 -28
  18. data/lib/graybook/importer/csv.rb +0 -74
  19. data/lib/graybook/importer/freenet.rb +0 -62
  20. data/lib/graybook/importer/gmx.rb +0 -68
  21. data/lib/graybook/importer/web.de.rb +0 -67
  22. data/test/config/credentials.yml.example +0 -9
  23. data/test/fixtures/aol_application_page.html +0 -566
  24. data/test/fixtures/aol_bad_login_response_stage_3.html +0 -565
  25. data/test/fixtures/aol_contacts.html +0 -102
  26. data/test/fixtures/aol_login_response_stage_1.html +0 -158
  27. data/test/fixtures/aol_login_response_stage_2.html +0 -559
  28. data/test/fixtures/aol_login_response_stage_3.html +0 -48
  29. data/test/fixtures/aol_login_response_stage_4.html +0 -404
  30. data/test/fixtures/aol_login_response_stage_5.html +0 -404
  31. data/test/fixtures/aol_new_contacts.html +0 -431
  32. data/test/fixtures/gmail.csv +0 -3
  33. data/test/fixtures/gmail_bad_login_response_stage_2.html +0 -560
  34. data/test/fixtures/gmail_contacts.html +0 -228
  35. data/test/fixtures/gmail_login_response_stage_1.html +0 -556
  36. data/test/fixtures/gmail_login_response_stage_2.html +0 -1
  37. data/test/fixtures/gmail_login_response_stage_2a.html +0 -1
  38. data/test/fixtures/gmail_login_response_stage_3.html +0 -249
  39. data/test/fixtures/gmail_redirect_body.html +0 -10
  40. data/test/fixtures/hotmail_bad_login_response_stage_2.html +0 -31
  41. data/test/fixtures/hotmail_contacts.html +0 -262
  42. data/test/fixtures/hotmail_login_response_stage_1.html +0 -31
  43. data/test/fixtures/hotmail_login_response_stage_2.html +0 -1
  44. data/test/fixtures/hotmail_login_response_stage_3.html +0 -519
  45. data/test/fixtures/hotmail_scrape_first_page.html +0 -77
  46. data/test/fixtures/hotmail_scrape_response_stage_1.html +0 -90
  47. data/test/fixtures/hotmail_scrape_response_stage_2.html +0 -77
  48. data/test/fixtures/hotmail_scrape_response_stage_3.html +0 -0
  49. data/test/fixtures/yahoo_bad_login_response_stage_2.html +0 -443
  50. data/test/fixtures/yahoo_contacts.csv +0 -3
  51. data/test/fixtures/yahoo_contacts_not_logged_in.html +0 -432
  52. data/test/fixtures/yahoo_contacts_stage_1.html +0 -399
  53. data/test/fixtures/yahoo_login_response_stage_1.html +0 -433
  54. data/test/fixtures/yahoo_login_response_stage_2.html +0 -16
  55. data/test/fixtures/yahoo_no_user_response_stage_2.html +0 -574
  56. data/test/freenet_importer_test.rb +0 -53
  57. data/test/gmx_importer_test.rb +0 -53
  58. data/test/scripts/live_test.rb +0 -25
  59. data/test/test_graybook.rb +0 -60
  60. data/test/test_graybook_exporter_base.rb +0 -16
  61. data/test/test_graybook_exporter_vcf.rb +0 -52
  62. data/test/test_graybook_exporter_xml.rb +0 -16
  63. data/test/test_graybook_importer_aol.rb +0 -108
  64. data/test/test_graybook_importer_base.rb +0 -24
  65. data/test/test_graybook_importer_csv.rb +0 -60
  66. data/test/test_graybook_importer_gmail.rb +0 -116
  67. data/test/test_graybook_importer_hotmail.rb +0 -165
  68. data/test/test_graybook_importer_page_scraper.rb +0 -51
  69. data/test/test_graybook_importer_yahoo.rb +0 -137
  70. data/test/test_helper.rb +0 -71
  71. data/test/web.de_importer_test.rb +0 -53
  72. data/vendor/plugins/graybook/lib/autotest/discover.rb +0 -3
  73. data/vendor/plugins/graybook/lib/autotest/graybook.rb +0 -27
@@ -1,399 +0,0 @@
1
- <!DOCTYPE html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
- <html>
3
- <head>
4
- <style>
5
- body {font:84.5% tahoma,arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}
6
- </style>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8
- <link rel="stylesheet" type="text/css" media="all" href="http://l.yimg.com/us.yimg.com/lib/pim/r/abook/yab3/16_0/all/yab_grayorg.css" />
9
-
10
-
11
- <title>Yahoo! Address Book - mike_mondragon</title>
12
- <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://address.yahoo.com/yab/us" r ( nz 0 vz 0 lz 0 oz 0 ca 1))'>
13
- <script type="text/javascript" language="JavaScript">
14
- <!-- // <![CDATA[
15
- if(typeof document.charset != "undefined" &&
16
- document.charset != "UTF-8" &&
17
- document.charset != "utf-8") {
18
- document.charset = "UTF-8";
19
- }
20
- // ]]> -->
21
- </script>
22
-
23
- </head>
24
- <body> <div id="masthead">
25
- <!-- SpaceID=0 robot -->
26
- <!-- SpaceID=0 robot -->
27
- <form name="yhdr_form" id="masthead_form"
28
- action="http://search.yahoo.com/search"
29
- target="_blank" accept-charset="utf-8">
30
- <div id="ygma">
31
- <input type="hidden" name="fr" value="ush1-add"/>
32
- <input type="hidden" name="ei" value="utf-8"/>
33
-
34
- <div id="masthead_row1">
35
- <span class="masthead_search">
36
- <img src="http://us.i1.yimg.com/us.yimg.com/i/us/hdr/el/uh_crn2.gif"
37
- id="img_crnr" border="0" height="14" width="13" align="bottom" alt=""
38
- /><img src="http://us.i1.yimg.com/us.yimg.com/i/us/nt/hdr/stw.gif" width="34" height="17" alt="Search the web">
39
- <input type="text" name="p" size="12" title="Enter search terms here" maxlength="100"/>
40
- <input class="ygbt" type="submit" value="Search" title="Search"/>
41
- </span>
42
- <span class="masthead_link"><a href="http://www.yahoo.com" target="_top">Yahoo!</a></span>
43
- <span class="masthead_link"><a href="http://my.yahoo.com" target="_top">My Yahoo!</a></span>
44
- <span class="masthead_link"><a href="http://mail.yahoo.com" target="_top">Mail</a></span>
45
- <span class="masthead_link"><a href="http://www.yahoo.com/bin/set" target="_top">Make Yahoo! your home page</a></span>
46
-
47
- </div>
48
-
49
- <div id="masthead_row2">
50
- <span id="masthead_logo"><a href="http://address.yahoo.com"><img id="ygmalogo" src="http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_ab_1.gif" width="318" height="33" alt="Yahoo! Address Book"></a></span>
51
- <div id="masthead_welcome1">Welcome, <span id="masthead_login">mike_mondragon</span></div>
52
- <div id="masthead_property_links">
53
- <a href="http://address.yahoo.com" target="_top">Address Book Home</a> - <a href="http://help.yahoo.com/l/us/yahoo/addressbook/" target="_top">Help</a>
54
- </div>
55
- <div id="masthead_welcome2">
56
- [<a href="http://login.yahoo.com/config/login?logout=1&.done=http://address.yahoo.com&.src=ab&.intl=us" target="_top">Sign Out</a>, <a href="http://edit.yahoo.com/config/eval_profile?.done=http://address.yahoo.com&.src=ab&.intl=us" target="_top">My Account</a>] </div>
57
- </div>
58
- </div>
59
- </form>
60
- </div> <!-- end masthead -->
61
- <div id="north_ad"><!-- SpaceID=0 robot -->
62
- </div>
63
- <div id="pimnav">
64
- <div>
65
- <ul id="apps">
66
- <li class="first" id="mail"><a href="http://us.rd.yahoo.com/ab_us/pimnav/mail/*http://mail.yahoo.com" class="first">Mail</a></li>
67
- <li id="addresses" class="selected"><a href="?VPC=contact_list&amp;.rand=73586795" class="first" id="qa_abtab1" ><em>Contacts</em></a></li>
68
- <li id="calendar"><a href="http://us.rd.yahoo.com/ab_us/pimnav/mail/*http://calendar.yahoo.com/" class="first">Calendar</a></li>
69
- <li class="last" id="notepad"><a href="http://us.rd.yahoo.com/ab_us/pimnav/mail/*http://notepad.yahoo.com/" class="first">Notepad</a></li>
70
- </ul>
71
- <ul id="misc">
72
- <li class="first"><a href="?1&amp;VPC=sync_info&amp;.rand=73586795" id="qa_sync1" >Sync</a></li>
73
- <li><a href="?1&amp;VPC=import_export&amp;.rand=73586795" id="qa_impexp1" >Import/Export</a></li>
74
- <li class="last"><a href="?1&amp;VPC=options&amp;.rand=73586795" id="qa_options1" >Options</a></li>
75
- </ul>
76
- </div>
77
- </div>
78
-
79
- <!-- this button bar only contains the Done button -->
80
- <div id="topglobalnavigation" class="globalnavigation">
81
- <ul class="first">
82
- <li><a href="?1&amp;VPC=options&amp;.rand=73586795" class="button" id="qa_done1" >Done</a></li>
83
- </ul>
84
- </div>
85
-
86
- <div id="optionsview">
87
-
88
- <!-- main content panel (originally white and grey, with one round corner) -->
89
- <table id="priwrap" cellpadding="0" cellspacing="0" width="100%"><colgroup><col width="1"><col width="*"></colgroup><tbody><tr>
90
- <td id="sec">
91
- <div id="optionsnav" class="simplemodule sidebar">
92
- <div class="shd">
93
- <div class="nw"> </div>
94
- <div class="ne"> </div>
95
- </div>
96
- <div class="sbd">
97
- <div class="label">Options</div>
98
- <ul>
99
- <li><a href="http://mrd.mail.yahoo.com/colors">Colors</a></li>
100
- <li><a href="http://mrd.mail.yahoo.com/options">Mail</a></li>
101
- <li class="selected"><a href="?&amp;VPC=options&amp;.rand=73586795">Address Book</a></li>
102
- <li><a href="http://calendar.yahoo.com/?v=70">Calendar</a></li>
103
- <li><a href="http://notepad.yahoo.com/?v=165">Notepad</a></li>
104
- <li><a href="http://edit.yahoo.com/config/eval_profile?.done=http%3A%2F%2Faddress.yahoo.com%2F%3F%26VPC%3Dimport_export%26.rand%3D73586795">Account Information</a></li>
105
-
106
- </ul>
107
- </div>
108
- <div class="sft">
109
- <div class="sw"> </div>
110
- <div class="se"> </div>
111
- <div class="clearfix"><!-- blank --></div>
112
- </div>
113
- </div>
114
-
115
- </td> <!-- closes sec container -->
116
- <td id="pri">
117
- <div id="nwcnr">&nbsp;</div>
118
-
119
- <!-- the header that says Import and Export (originally white) -->
120
- <h1>Import and Export</h1>
121
-
122
- <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123
-
124
- <!-- the section containing import options (orignally light-grey) -->
125
- <div id="import" class="optioncontainer alternatinga">
126
-
127
- <!-- the section header that says Import -->
128
- <h2>Import</h2>
129
- <div class="formcontainer"> <!-- container for the forms and help -->
130
- <!-- the help box on the right side -->
131
- <div class="help"> <!-- why the extra container? see yab_options.css -->
132
- <div class="simplemodule" id="import_help">
133
- <div class="shd">
134
- <div class="nw"></div>
135
- <div class="ne"></div>
136
- </div>
137
- <div class="sbd">
138
- <!-- here comes help -->
139
- <div id="import_help_header">
140
- Help importing from: </div>
141
- <ul>
142
- <li>
143
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-07.html" id="qa_imphelp1" >Outlook Express</a>
144
- </li>
145
-
146
- <li>
147
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-05.html" id="qa_imphelp2" >Outlook 97/98/2000</a>
148
- </li>
149
-
150
- <li>
151
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-03.html" id="qa_imphelp3" >Outlook 2002 (XP)/2003</a>
152
- </li>
153
-
154
- <li>
155
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-10.html" id="qa_imphelp4" >Palm Desktop</a>
156
- </li>
157
-
158
- <li>
159
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-12.html" id="qa_imphelp5" >Netscape Address Book</a>
160
- </li>
161
-
162
- <li>
163
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-16.html" id="qa_imphelp6" >Yahoo! CSV</a>
164
- </li>
165
- </ul>
166
-
167
- <div id="import_help_warning">
168
- <span id="import_help_warning_label">
169
- Warning: </span>
170
- <span id="import_help_warning_text">
171
- Importing data may cause duplication with existing contacts in your address book. You may wish to consider <a href="?1&amp;VPC=trash_all&amp;.rand=73586795">deleting&nbsp;all&nbsp;contacts</a> from your address book. </span>
172
- </div>
173
- </div>
174
- <div class="sft">
175
- <div class="sw"></div>
176
- <div class="se"></div>
177
- </div>
178
- </div> <!-- closes simplemodule -->
179
- </div> <!-- closes help -->
180
- <div id="maincontent_import_body">
181
-
182
- <form method="POST" enctype="multipart/form-data" action="index.php" accept-charset="utf-8">
183
-
184
- <!-- options, comboboxes, buttons -->
185
- <div id="maincontent_import_left">
186
- <input type="hidden" name=".crumb" id="crumb1" value="wxwncVxsaLY">
187
- <input type="hidden" name="VPC" value="import_export"> <ol>
188
- <!-- 1. -->
189
- <li>
190
- <dl>
191
- <dt>
192
- Choose a program to import contacts from: </dt>
193
- <dd>
194
- <select name="import_format">
195
- <option value="msocsv">Microsoft Outlook (.CSV file)</option>
196
- <option value="ldif">Netscape (.LDIF file)</option>
197
- <option value="ycsv">Yahoo! (.CSV file)</option>
198
- <option value="vcf">vCard (.VCF file)</option>
199
- </select>
200
- </dd>
201
- </dl>
202
- </li>
203
- <!-- 2. -->
204
- <li>
205
- <dl>
206
- <dt>
207
- Go to that program (application) and export the appropriate records. </dt>
208
- <dd class="helptext">
209
- (refer to the Help section on right) </dd>
210
- </dl>
211
- </li>
212
- <!-- 3. -->
213
- <li>
214
- <dl>
215
- <dt>
216
- Specify the file to import: </dt>
217
- <dd>
218
- <input type="file" accept="text" name="file_upload" />
219
- </dd>
220
- </dl>
221
- </li>
222
-
223
- <!-- 4. -->
224
- <li>
225
- <dl>
226
- <dt>
227
- Press Import Now to Import the file: </dt>
228
- <dd>
229
- <input name="submit[action_import_file]" type="submit" value="Import Now" />
230
- </dd>
231
- </dl>
232
- </li>
233
- </ol>
234
- </div><!-- closes yab_maincontent_import_left -->
235
- </form>
236
- </div>
237
-
238
- </div> <!-- closes formcontainer -->
239
- <div class="clearfloats"></div>
240
- </div> <!-- closes the import module -->
241
-
242
- <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
243
-
244
- <!-- the section containing export options (orignally dark-grey) -->
245
- <div id="export" class="optioncontainer alternatingb">
246
- <!-- the section header that says Export -->
247
- <h2 id="maincontent_export_header">Export</h2>
248
-
249
- <!-- the line that instructs the user to pick an option -->
250
- <h3>Choose the program you want to export to and click the corresponding button:</h3>
251
- <!-- the remainder of the export panel -->
252
- <div class="formcontainer">
253
- <!-- the help box on the right side -->
254
- <div class="help">
255
- <div class="simplemodule" id="export_help">
256
- <div class="shd">
257
- <div class="nw"></div>
258
- <div class="ne"></div>
259
- </div>
260
- <div class="sbd">
261
- <!-- here comes help -->
262
- <div id="export_help_header">
263
- Help exporting to: </div>
264
- <ul>
265
- <li>
266
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-08.html" id="qa_exphelp1" >Outlook Express</a>
267
- </li>
268
-
269
- <li>
270
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-06.html" id="qa_exphelp2" >Outlook 97/98/2000</a>
271
- </li>
272
-
273
- <li>
274
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-04.html" id="qa_exphelp3" >Outlook 2002 (XP)/2003</a>
275
- </li>
276
-
277
- <li>
278
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-11.html" id="qa_exphelp4" >Palm Desktop</a>
279
- </li>
280
-
281
- <li>
282
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-13.html" id="qa_exphelp5" >Netscape Address Book</a
283
- </li>
284
-
285
- <li>
286
- <a href="http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-16.html" id="qa_exphelp6" >Yahoo! CSV</a>
287
- </li>
288
- </ul>
289
-
290
- <div id="export_help_warning">
291
- <span id="export_help_warning_label">
292
- Warning: </span>
293
- <span id="export_help_warning_text">
294
- Contacts added from Yahoo! Yellow Pages will not be exported. </span>
295
- </div>
296
- </div> <!-- class bd -->
297
- <div class="sft">
298
- <div class="sw"></div>
299
- <div class="se"></div>
300
- <div class="clearfix"><!--blank--></div>
301
- </div>
302
- </div> <!-- closes help module -->
303
- </div> <!-- closes help container -->
304
- <!-- options, comboboxes, buttons -->
305
- <form method="POST" action="index.php" accept-charset="utf-8">
306
- <input type="hidden" name=".crumb" id="crumb2" value="wxwncVxsaLY">
307
- <input type="hidden" name="VPC" value="import_export"> <div class="propertylist content">
308
- <dl>
309
- <div><dt>Microsoft Outlook:</dt>
310
- <dd>
311
- <!-- depending on the separator we might have one or two options here -->
312
- <input name="submit[action_export_outlook]" type="submit" value="Export Now" />
313
-
314
- </dd></div>
315
-
316
- <div><dt>Netscape/Thunderbird:</dt>
317
- <dd>
318
- <input name="submit[action_export_ldif]" type=submit value="Export Now" />
319
- </dd></div>
320
-
321
- <div><dt>Yahoo! CSV:</dt>
322
- <dd>
323
- <!-- depending on the separator we might have one or two options here -->
324
- <input name="submit[action_export_yahoo]" type="submit" value="Export Now" />
325
- </dd></div>
326
-
327
- <div><dt>vCard Single File:<br />
328
- <small>(recommended for Palm Desktop users)</small> </dt>
329
- <dd>
330
- <input class=fbutton name="submit[action_export_vcard]" type=submit value="Export Now" />
331
- </dd></div>
332
-
333
- <div><dt>vCard, Zip of .VCF files:<br />
334
- <small>(One .VCF file per contact, Outlook compatible)</small>
335
- </dt>
336
- <dd>
337
- <input class=fbutton name="submit[action_export_vcard2]" type=submit value="Export Now" />
338
- </dd></div>
339
- </dl>
340
- </div><!-- closes yab_maincontent_export_left -->
341
- </form>
342
- </div> <!-- closes form / help container -->
343
- <div class="clearfix"><!--blank--></div>
344
- </div> <!-- closes export module -->
345
- </td>
346
- </tr></tbody></table>
347
- </div> <!-- closes optionsview ID module -->
348
-
349
- <div id="bottomglobalnavigation" class="globalnavigation">
350
- <ul class="first">
351
- <li><a href="?1&amp;VPC=options&amp;.rand=73586795" class="button" id="qa_done2" >Done</a></li>
352
- </ul>
353
- </div>
354
-
355
- <div id="footer">
356
- <!-- SpaceID=0 robot -->
357
- <!-- SpaceID=0 robot -->
358
- <!-- SpaceID=0 robot -->
359
- <div id="mastfoot">
360
-
361
- <div id="mastfoot_legal">
362
- <span id="mastfoot_copyright">Copyright &copy; 2008 <a href="http://www.yahoo.com">Yahoo! Inc.</a> All Rights Reserved.</span>
363
- <a target="_top" href="http://docs.yahoo.com/info/terms/">Terms of Service</a> - <a href="http://docs.yahoo.com/info/copyright/copyright.html">Copyright/IP Policy</a> </div>
364
- <div id="mastfoot_privacy">
365
- NOTICE: We collect personal information on this site.<br>To learn more about how we use your information, see our <a target="_top" href="http://privacy.yahoo.com/privacy/us">Privacy Policy</a> </div>
366
-
367
- </div>
368
- <div style="float: right; font-size: 65%; font-color: #333;">
369
- 1.9.1<br></div> </div>
370
- </body>
371
-
372
- <script type="text/javascript" src="http://l.yimg.com/us.yimg.com/lib/pim/r/abook/yab3/16_0/all/yab.js"></script>
373
-
374
-
375
-
376
- <script type="text/javascript">
377
- <!-- <CDATA[[
378
- if(typeof CallDOMLoadedHandlers != "undefined"){
379
- CallDOMLoadedHandlers();
380
- }
381
- // ]]> -->
382
- </script><!--
383
- // TS: 1201392258
384
- // P: 14.69
385
-
386
- // T: 2.65
387
-
388
- // B: 0
389
- // BTX: 0
390
-
391
- // R: 5.84
392
- // U: 5.15
393
- // A: 0.38
394
- // O: 0
395
-
396
- -->
397
-
398
-
399
- <!-- // RPPID:9984 --></html><!-- web245.address.pim.mud.yahoo.com compressed/chunked Sat Jan 26 16:04:18 PST 2008 -->