alexandria-book-collection-manager 0.7.5 → 0.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.github/workflows/ruby.yml +72 -0
  4. data/.gitignore +4 -1
  5. data/.rubocop.yml +65 -30
  6. data/.rubocop_todo.yml +49 -165
  7. data/.simplecov +5 -2
  8. data/CHANGELOG.md +64 -0
  9. data/ChangeLog.0 +19 -19
  10. data/INSTALL.md +26 -16
  11. data/README.md +31 -35
  12. data/Rakefile +18 -16
  13. data/alexandria-book-collection-manager.gemspec +35 -29
  14. data/doc/FAQ +2 -2
  15. data/doc/dependency_decisions.yml +22 -3
  16. data/lib/alexandria/about.rb +1 -1
  17. data/lib/alexandria/book_providers/bl_provider.rb +88 -0
  18. data/lib/alexandria/book_providers/douban.rb +2 -2
  19. data/lib/alexandria/book_providers/loc_provider.rb +38 -0
  20. data/lib/alexandria/book_providers/pseudomarc.rb +61 -71
  21. data/lib/alexandria/book_providers/sbn_provider.rb +108 -0
  22. data/lib/alexandria/book_providers/{thalia.rb → thalia_provider.rb} +37 -74
  23. data/lib/alexandria/book_providers/web.rb +2 -2
  24. data/lib/alexandria/book_providers/worldcat.rb +34 -38
  25. data/lib/alexandria/book_providers/z3950_provider.rb +199 -0
  26. data/lib/alexandria/book_providers.rb +48 -65
  27. data/lib/alexandria/default_preferences.rb +2 -1
  28. data/lib/alexandria/execution_queue.rb +13 -12
  29. data/lib/alexandria/export_library.rb +21 -22
  30. data/lib/alexandria/image_fetcher.rb +25 -0
  31. data/lib/alexandria/import_library.rb +46 -70
  32. data/lib/alexandria/import_library_csv.rb +16 -16
  33. data/lib/alexandria/library_sort_order.rb +3 -1
  34. data/lib/alexandria/library_store.rb +19 -20
  35. data/lib/alexandria/logging.rb +5 -9
  36. data/lib/alexandria/models/book.rb +15 -2
  37. data/lib/alexandria/models/library.rb +31 -35
  38. data/lib/alexandria/net.rb +1 -2
  39. data/lib/alexandria/preferences.rb +27 -33
  40. data/lib/alexandria/scanners/cue_cat.rb +6 -6
  41. data/lib/alexandria/scanners/keyboard.rb +1 -1
  42. data/lib/alexandria/scanners.rb +2 -2
  43. data/lib/alexandria/smart_library.rb +22 -26
  44. data/lib/alexandria/ui/about_dialog.rb +1 -1
  45. data/lib/alexandria/ui/acquire_dialog.rb +15 -19
  46. data/lib/alexandria/ui/alert_dialog.rb +36 -19
  47. data/lib/alexandria/ui/bad_isbns_dialog.rb +13 -9
  48. data/lib/alexandria/ui/barcode_animation.rb +6 -6
  49. data/lib/alexandria/ui/book_properties_dialog.rb +2 -3
  50. data/lib/alexandria/ui/book_properties_dialog_base.rb +35 -137
  51. data/lib/alexandria/ui/calendar_popup.rb +58 -0
  52. data/lib/alexandria/ui/callbacks.rb +144 -123
  53. data/lib/alexandria/ui/completion_models.rb +2 -6
  54. data/lib/alexandria/ui/confirm_erase_dialog.rb +1 -1
  55. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +2 -2
  56. data/lib/alexandria/ui/error_dialog.rb +1 -1
  57. data/lib/alexandria/ui/export_dialog.rb +19 -18
  58. data/lib/alexandria/ui/icons.rb +34 -40
  59. data/lib/alexandria/ui/iconview_tooltips.rb +40 -53
  60. data/lib/alexandria/ui/import_dialog.rb +49 -48
  61. data/lib/alexandria/ui/init.rb +14 -12
  62. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +2 -2
  63. data/lib/alexandria/ui/libraries_combo.rb +10 -9
  64. data/lib/alexandria/ui/listview.rb +6 -7
  65. data/lib/alexandria/ui/main_app.rb +2 -2
  66. data/lib/alexandria/ui/multi_drag_treeview.rb +5 -7
  67. data/lib/alexandria/ui/new_book_dialog.rb +63 -65
  68. data/lib/alexandria/ui/new_book_dialog_manual.rb +1 -1
  69. data/lib/alexandria/ui/new_provider_dialog.rb +12 -11
  70. data/lib/alexandria/ui/new_smart_library_dialog.rb +39 -27
  71. data/lib/alexandria/ui/preferences_dialog.rb +25 -84
  72. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +10 -6
  73. data/lib/alexandria/ui/provider_preferences_dialog.rb +5 -5
  74. data/lib/alexandria/ui/really_delete_dialog.rb +2 -2
  75. data/lib/alexandria/ui/sidepane_manager.rb +38 -38
  76. data/lib/alexandria/ui/skip_entry_dialog.rb +3 -2
  77. data/lib/alexandria/ui/smart_library_properties_dialog.rb +35 -36
  78. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +61 -244
  79. data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
  80. data/lib/alexandria/ui/sound.rb +4 -6
  81. data/lib/alexandria/ui/ui_manager.rb +80 -83
  82. data/lib/alexandria/ui.rb +7 -7
  83. data/lib/alexandria/version.rb +2 -2
  84. data/lib/alexandria/web_themes.rb +15 -15
  85. data/lib/alexandria.rb +2 -2
  86. data/po/cs.po +947 -865
  87. data/po/cy.po +913 -864
  88. data/po/de.po +961 -865
  89. data/po/el.po +956 -861
  90. data/po/es.po +952 -857
  91. data/po/fr.po +950 -865
  92. data/po/ga.po +866 -819
  93. data/po/gl.po +946 -861
  94. data/po/it.po +945 -858
  95. data/po/ja.po +921 -836
  96. data/po/mk.po +953 -858
  97. data/po/nb.po +932 -847
  98. data/po/nl.po +955 -849
  99. data/po/pl.po +999 -963
  100. data/po/pt.po +946 -850
  101. data/po/pt_BR.po +944 -859
  102. data/po/ru.po +959 -868
  103. data/po/sk.po +950 -863
  104. data/po/sv.po +944 -859
  105. data/po/uk.po +925 -846
  106. data/po/zh_TW.po +926 -841
  107. data/schemas/alexandria.schemas +1 -1
  108. data/share/alexandria/glade/main_app__builder.glade +6 -21
  109. data/share/gnome/help/alexandria/C/adding-books.xml +3 -4
  110. data/share/gnome/help/alexandria/C/introduction.xml +0 -16
  111. data/share/gnome/help/alexandria/C/searching.xml +1 -4
  112. data/share/gnome/help/alexandria/C/settings.xml +0 -30
  113. data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
  114. data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
  115. data/share/gnome/help/alexandria/fr/alexandria.xml +5 -160
  116. data/share/gnome/help/alexandria/ja/adding-books.xml +1 -1
  117. data/share/gnome/help/alexandria/ja/introduction.xml +0 -15
  118. data/share/gnome/help/alexandria/ja/searching.xml +3 -7
  119. data/share/gnome/help/alexandria/ja/settings.xml +0 -27
  120. data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
  121. data/spec/alexandria/book_providers/bl_provider_spec.rb +13 -0
  122. data/spec/alexandria/book_providers/loc_provider_spec.rb +17 -0
  123. data/spec/alexandria/book_providers/sbn_provider_spec.rb +13 -0
  124. data/spec/alexandria/book_providers/thalia_provider_spec.rb +119 -0
  125. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
  126. data/spec/alexandria/book_providers_spec.rb +0 -154
  127. data/spec/alexandria/console_spec.rb +0 -5
  128. data/spec/alexandria/export_library_spec.rb +27 -38
  129. data/spec/alexandria/library_spec.rb +76 -46
  130. data/spec/alexandria/preferences_spec.rb +29 -3
  131. data/spec/alexandria/scanners/cue_cat_spec.rb +1 -1
  132. data/spec/alexandria/ui/about_dialog_spec.rb +1 -1
  133. data/spec/alexandria/ui/acquire_dialog_spec.rb +1 -1
  134. data/spec/alexandria/ui/alert_dialog_spec.rb +1 -1
  135. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +1 -1
  136. data/spec/alexandria/ui/book_properties_dialog_spec.rb +47 -5
  137. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +1 -1
  138. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +1 -1
  139. data/spec/alexandria/ui/error_dialog_spec.rb +1 -1
  140. data/spec/alexandria/ui/export_dialog_spec.rb +25 -4
  141. data/spec/alexandria/ui/icons_spec.rb +26 -0
  142. data/spec/alexandria/ui/iconview_spec.rb +1 -1
  143. data/spec/alexandria/ui/import_dialog_spec.rb +35 -3
  144. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +1 -1
  145. data/spec/alexandria/ui/main_app_spec.rb +1 -1
  146. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +39 -3
  147. data/spec/alexandria/ui/new_provider_dialog_spec.rb +19 -3
  148. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +28 -3
  149. data/spec/alexandria/ui/preferences_dialog_spec.rb +2 -2
  150. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +23 -8
  151. data/spec/alexandria/ui/really_delete_dialog_spec.rb +1 -1
  152. data/spec/alexandria/ui/sidepane_manager_spec.rb +2 -2
  153. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +1 -1
  154. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +37 -6
  155. data/spec/alexandria/ui/ui_manager_spec.rb +116 -2
  156. data/spec/data/libraries/0.6.2/My Library/9780571147168.yaml +2 -0
  157. data/spec/end_to_end/basic_run_spec.rb +3 -8
  158. data/spec/fixtures/cover.jpg +0 -0
  159. data/spec/spec_helper.rb +47 -3
  160. data/tasks/spec.rake +3 -5
  161. data/util/rake/fileinstall.rb +16 -15
  162. data/util/rake/omfgenerate.rb +1 -1
  163. metadata +141 -52
  164. data/.travis.yml +0 -39
  165. data/lib/alexandria/book_providers/adlibris.rb +0 -196
  166. data/lib/alexandria/book_providers/amazon_aws.rb +0 -252
  167. data/lib/alexandria/book_providers/amazon_ecs_util.rb +0 -388
  168. data/lib/alexandria/book_providers/barnes_and_noble.rb +0 -209
  169. data/lib/alexandria/book_providers/proxis.rb +0 -175
  170. data/lib/alexandria/book_providers/siciliano.rb +0 -257
  171. data/lib/alexandria/book_providers/z3950.rb +0 -415
  172. data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
  173. data/spec/alexandria/utilities_spec.rb +0 -52
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexandria-book-collection-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander McCormmach
@@ -25,10 +25,10 @@ authors:
25
25
  - Takayuki Kusano
26
26
  - Timothy Malone
27
27
  - Zachary P. Landau
28
- autorequire:
28
+ autorequire:
29
29
  bindir: bin
30
30
  cert_chain: []
31
- date: 2020-05-11 00:00:00.000000000 Z
31
+ date: 2022-02-04 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: gettext
@@ -50,98 +50,110 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 3.4.1
53
+ version: 3.5.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 3.4.1
60
+ version: 3.5.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: gtk3
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 3.4.1
67
+ version: 3.5.0
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 3.4.1
74
+ version: 3.5.0
75
75
  - !ruby/object:Gem::Dependency
76
- name: hpricot
76
+ name: htmlentities
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 0.8.5
81
+ version: '4.3'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.8.5
88
+ version: '4.3'
89
89
  - !ruby/object:Gem::Dependency
90
- name: htmlentities
90
+ name: image_size
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '4.3'
95
+ version: '3.0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '4.3'
102
+ version: '3.0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: image_size
104
+ name: marc
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '1.0'
110
+ - - "<"
108
111
  - !ruby/object:Gem::Version
109
- version: '2.0'
112
+ version: '1.2'
110
113
  type: :runtime
111
114
  prerelease: false
112
115
  version_requirements: !ruby/object:Gem::Requirement
113
116
  requirements:
114
- - - "~>"
117
+ - - ">="
115
118
  - !ruby/object:Gem::Version
116
- version: '2.0'
119
+ version: '1.0'
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '1.2'
117
123
  - !ruby/object:Gem::Dependency
118
- name: marc
124
+ name: nokogiri
119
125
  requirement: !ruby/object:Gem::Requirement
120
126
  requirements:
121
127
  - - "~>"
122
128
  - !ruby/object:Gem::Version
123
- version: 1.0.0
129
+ version: '1.11'
124
130
  type: :runtime
125
131
  prerelease: false
126
132
  version_requirements: !ruby/object:Gem::Requirement
127
133
  requirements:
128
134
  - - "~>"
129
135
  - !ruby/object:Gem::Version
130
- version: 1.0.0
136
+ version: '1.11'
131
137
  - !ruby/object:Gem::Dependency
132
138
  name: psych
133
139
  requirement: !ruby/object:Gem::Requirement
134
140
  requirements:
135
- - - "~>"
141
+ - - ">="
136
142
  - !ruby/object:Gem::Version
137
- version: 3.1.0
143
+ version: '3.2'
144
+ - - "<"
145
+ - !ruby/object:Gem::Version
146
+ version: '4.1'
138
147
  type: :runtime
139
148
  prerelease: false
140
149
  version_requirements: !ruby/object:Gem::Requirement
141
150
  requirements:
142
- - - "~>"
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '3.2'
154
+ - - "<"
143
155
  - !ruby/object:Gem::Version
144
- version: 3.1.0
156
+ version: '4.1'
145
157
  - !ruby/object:Gem::Dependency
146
158
  name: zoom
147
159
  requirement: !ruby/object:Gem::Requirement
@@ -162,44 +174,58 @@ dependencies:
162
174
  requirements:
163
175
  - - "~>"
164
176
  - !ruby/object:Gem::Version
165
- version: 0.2.1
177
+ version: 0.3.0
166
178
  type: :development
167
179
  prerelease: false
168
180
  version_requirements: !ruby/object:Gem::Requirement
169
181
  requirements:
170
182
  - - "~>"
171
183
  - !ruby/object:Gem::Version
172
- version: 0.2.1
184
+ version: 0.3.0
173
185
  - !ruby/object:Gem::Dependency
174
- name: minitest
186
+ name: rake
175
187
  requirement: !ruby/object:Gem::Requirement
176
188
  requirements:
177
189
  - - "~>"
178
190
  - !ruby/object:Gem::Version
179
- version: '5.0'
191
+ version: '13.0'
180
192
  type: :development
181
193
  prerelease: false
182
194
  version_requirements: !ruby/object:Gem::Requirement
183
195
  requirements:
184
196
  - - "~>"
185
197
  - !ruby/object:Gem::Version
186
- version: '5.0'
198
+ version: '13.0'
187
199
  - !ruby/object:Gem::Dependency
188
- name: rake
200
+ name: rspec
189
201
  requirement: !ruby/object:Gem::Requirement
190
202
  requirements:
191
203
  - - "~>"
192
204
  - !ruby/object:Gem::Version
193
- version: '13.0'
205
+ version: '3.0'
194
206
  type: :development
195
207
  prerelease: false
196
208
  version_requirements: !ruby/object:Gem::Requirement
197
209
  requirements:
198
210
  - - "~>"
199
211
  - !ruby/object:Gem::Version
200
- version: '13.0'
212
+ version: '3.0'
201
213
  - !ruby/object:Gem::Dependency
202
- name: rspec
214
+ name: rubocop
215
+ requirement: !ruby/object:Gem::Requirement
216
+ requirements:
217
+ - - "~>"
218
+ - !ruby/object:Gem::Version
219
+ version: '1.25'
220
+ type: :development
221
+ prerelease: false
222
+ version_requirements: !ruby/object:Gem::Requirement
223
+ requirements:
224
+ - - "~>"
225
+ - !ruby/object:Gem::Version
226
+ version: '1.25'
227
+ - !ruby/object:Gem::Dependency
228
+ name: rubocop-i18n
203
229
  requirement: !ruby/object:Gem::Requirement
204
230
  requirements:
205
231
  - - "~>"
@@ -212,7 +238,63 @@ dependencies:
212
238
  - - "~>"
213
239
  - !ruby/object:Gem::Version
214
240
  version: '3.0'
215
- description:
241
+ - !ruby/object:Gem::Dependency
242
+ name: rubocop-performance
243
+ requirement: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: '1.13'
248
+ type: :development
249
+ prerelease: false
250
+ version_requirements: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - "~>"
253
+ - !ruby/object:Gem::Version
254
+ version: '1.13'
255
+ - !ruby/object:Gem::Dependency
256
+ name: rubocop-rake
257
+ requirement: !ruby/object:Gem::Requirement
258
+ requirements:
259
+ - - "~>"
260
+ - !ruby/object:Gem::Version
261
+ version: 0.6.0
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - "~>"
267
+ - !ruby/object:Gem::Version
268
+ version: 0.6.0
269
+ - !ruby/object:Gem::Dependency
270
+ name: rubocop-rspec
271
+ requirement: !ruby/object:Gem::Requirement
272
+ requirements:
273
+ - - "~>"
274
+ - !ruby/object:Gem::Version
275
+ version: '2.7'
276
+ type: :development
277
+ prerelease: false
278
+ version_requirements: !ruby/object:Gem::Requirement
279
+ requirements:
280
+ - - "~>"
281
+ - !ruby/object:Gem::Version
282
+ version: '2.7'
283
+ - !ruby/object:Gem::Dependency
284
+ name: webmock
285
+ requirement: !ruby/object:Gem::Requirement
286
+ requirements:
287
+ - - "~>"
288
+ - !ruby/object:Gem::Version
289
+ version: '3.9'
290
+ type: :development
291
+ prerelease: false
292
+ version_requirements: !ruby/object:Gem::Requirement
293
+ requirements:
294
+ - - "~>"
295
+ - !ruby/object:Gem::Version
296
+ version: '3.9'
297
+ description:
216
298
  email:
217
299
  - matijs@matijs.net
218
300
  executables:
@@ -220,13 +302,14 @@ executables:
220
302
  extensions: []
221
303
  extra_rdoc_files: []
222
304
  files:
305
+ - ".github/dependabot.yml"
306
+ - ".github/workflows/ruby.yml"
223
307
  - ".gitignore"
224
308
  - ".hound.yml"
225
309
  - ".reek"
226
310
  - ".rubocop.yml"
227
311
  - ".rubocop_todo.yml"
228
312
  - ".simplecov"
229
- - ".travis.yml"
230
313
  - ".yardopts"
231
314
  - CHANGELOG.md
232
315
  - COPYING
@@ -252,24 +335,22 @@ files:
252
335
  - lib/alexandria.rb
253
336
  - lib/alexandria/about.rb
254
337
  - lib/alexandria/book_providers.rb
255
- - lib/alexandria/book_providers/adlibris.rb
256
- - lib/alexandria/book_providers/amazon_aws.rb
257
- - lib/alexandria/book_providers/amazon_ecs_util.rb
258
- - lib/alexandria/book_providers/barnes_and_noble.rb
338
+ - lib/alexandria/book_providers/bl_provider.rb
259
339
  - lib/alexandria/book_providers/douban.rb
260
- - lib/alexandria/book_providers/proxis.rb
340
+ - lib/alexandria/book_providers/loc_provider.rb
261
341
  - lib/alexandria/book_providers/pseudomarc.rb
262
- - lib/alexandria/book_providers/siciliano.rb
263
- - lib/alexandria/book_providers/thalia.rb
342
+ - lib/alexandria/book_providers/sbn_provider.rb
343
+ - lib/alexandria/book_providers/thalia_provider.rb
264
344
  - lib/alexandria/book_providers/web.rb
265
345
  - lib/alexandria/book_providers/worldcat.rb
266
- - lib/alexandria/book_providers/z3950.rb
346
+ - lib/alexandria/book_providers/z3950_provider.rb
267
347
  - lib/alexandria/config.rb
268
348
  - lib/alexandria/console.rb
269
349
  - lib/alexandria/default_preferences.rb
270
350
  - lib/alexandria/execution_queue.rb
271
351
  - lib/alexandria/export_format.rb
272
352
  - lib/alexandria/export_library.rb
353
+ - lib/alexandria/image_fetcher.rb
273
354
  - lib/alexandria/import_library.rb
274
355
  - lib/alexandria/import_library_csv.rb
275
356
  - lib/alexandria/library_collection.rb
@@ -293,6 +374,7 @@ files:
293
374
  - lib/alexandria/ui/book_properties_dialog.rb
294
375
  - lib/alexandria/ui/book_properties_dialog_base.rb
295
376
  - lib/alexandria/ui/builder_base.rb
377
+ - lib/alexandria/ui/calendar_popup.rb
296
378
  - lib/alexandria/ui/callbacks.rb
297
379
  - lib/alexandria/ui/columns.rb
298
380
  - lib/alexandria/ui/completion_models.rb
@@ -324,6 +406,7 @@ files:
324
406
  - lib/alexandria/ui/skip_entry_dialog.rb
325
407
  - lib/alexandria/ui/smart_library_properties_dialog.rb
326
408
  - lib/alexandria/ui/smart_library_properties_dialog_base.rb
409
+ - lib/alexandria/ui/smart_library_rule_box.rb
327
410
  - lib/alexandria/ui/sound.rb
328
411
  - lib/alexandria/ui/ui_manager.rb
329
412
  - lib/alexandria/undo_manager.rb
@@ -482,6 +565,11 @@ files:
482
565
  - share/sounds/alexandria/good_scan.wav
483
566
  - share/sounds/alexandria/scanning.ogg
484
567
  - share/sounds/alexandria/scanning.wav
568
+ - spec/alexandria/book_providers/bl_provider_spec.rb
569
+ - spec/alexandria/book_providers/loc_provider_spec.rb
570
+ - spec/alexandria/book_providers/sbn_provider_spec.rb
571
+ - spec/alexandria/book_providers/thalia_provider_spec.rb
572
+ - spec/alexandria/book_providers/world_cat_provider_spec.rb
485
573
  - spec/alexandria/book_providers_spec.rb
486
574
  - spec/alexandria/book_spec.rb
487
575
  - spec/alexandria/console_spec.rb
@@ -500,6 +588,7 @@ files:
500
588
  - spec/alexandria/ui/conflict_while_copying_dialog_spec.rb
501
589
  - spec/alexandria/ui/error_dialog_spec.rb
502
590
  - spec/alexandria/ui/export_dialog_spec.rb
591
+ - spec/alexandria/ui/icons_spec.rb
503
592
  - spec/alexandria/ui/iconview_spec.rb
504
593
  - spec/alexandria/ui/import_dialog_spec.rb
505
594
  - spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb
@@ -516,8 +605,6 @@ files:
516
605
  - spec/alexandria/ui/smart_library_properties_dialog_spec.rb
517
606
  - spec/alexandria/ui/sound_spec.rb
518
607
  - spec/alexandria/ui/ui_manager_spec.rb
519
- - spec/alexandria/ui/ui_utilities_spec.rb
520
- - spec/alexandria/utilities_spec.rb
521
608
  - spec/data/isbns.txt
522
609
  - spec/data/libraries/0.6.1-noisbn/My Library/0201398257.yaml
523
610
  - spec/data/libraries/0.6.1-noisbn/My Library/1565920007.yaml
@@ -536,6 +623,7 @@ files:
536
623
  - spec/data/libraries/0.6.2/My Library/9780755322800.cover
537
624
  - spec/data/libraries/0.6.2/My Library/9780755322800.yaml
538
625
  - spec/end_to_end/basic_run_spec.rb
626
+ - spec/fixtures/cover.jpg
539
627
  - spec/spec_helper.rb
540
628
  - tasks/setup.rb
541
629
  - tasks/spec.rake
@@ -544,9 +632,10 @@ files:
544
632
  - util/rake/omfgenerate.rb
545
633
  homepage: http://www.github.com/mvz/alexandria-book-collection-manager
546
634
  licenses:
547
- - GPL-2
548
- metadata: {}
549
- post_install_message:
635
+ - GPL-2.0+
636
+ metadata:
637
+ rubygems_mfa_required: 'true'
638
+ post_install_message:
550
639
  rdoc_options:
551
640
  - "--main"
552
641
  - README.md
@@ -556,15 +645,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
556
645
  requirements:
557
646
  - - ">="
558
647
  - !ruby/object:Gem::Version
559
- version: 2.5.0
648
+ version: 2.6.0
560
649
  required_rubygems_version: !ruby/object:Gem::Requirement
561
650
  requirements:
562
651
  - - ">="
563
652
  - !ruby/object:Gem::Version
564
653
  version: '0'
565
654
  requirements: []
566
- rubygems_version: 3.1.2
567
- signing_key:
655
+ rubygems_version: 3.3.3
656
+ signing_key:
568
657
  specification_version: 4
569
658
  summary: GNOME application for managing collections of books
570
659
  test_files: []
data/.travis.yml DELETED
@@ -1,39 +0,0 @@
1
- language: ruby
2
-
3
- dist: xenial
4
-
5
- services:
6
- - xvfb
7
-
8
- before_install:
9
- - sudo apt-get update
10
- # Needed for gtk3 gem
11
- - sudo apt-get install libgtk-3-dev
12
- # Needed for gstreamer gem
13
- - sudo apt-get install libgstreamer1.0-dev
14
- # Needed for GooCanvas::Canvas widget
15
- - sudo apt-get install libgoocanvas-2.0-dev
16
- # Needed for zoom gem
17
- - sudo apt-get install libyaz-dev
18
- # Needed for intltool-merge executable
19
- - sudo apt-get install intltool
20
- # Needed for gconftool-2 executable
21
- - sudo apt-get install gconf2
22
- # Needed to provide A11y dbus service to silence warnings
23
- - sudo apt-get install at-spi2-core
24
- # Needed to set up sound player pipeline
25
- - sudo apt-get install gstreamer1.0-plugins-good
26
- # Needed to play sound
27
- - sudo apt-get install pulseaudio
28
-
29
- cache:
30
- bundler: true
31
-
32
- rvm:
33
- - 2.5
34
- - 2.6
35
- - 2.7
36
-
37
- branches:
38
- only:
39
- - master
@@ -1,196 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file is part of Alexandria.
4
- #
5
- # See the file README.md for authorship and licensing information.
6
-
7
- # AdLibris Bokhandel AB http://www.adlibris.com/se/
8
- # Swedish online book store
9
-
10
- # New AdLibris provider, taken from the Palatina MetaDataSource and
11
- # modified to fit the structure of Alexandria book providers.
12
- # (26 Feb 2009)
13
-
14
- require "cgi"
15
- require "alexandria/book_providers/web"
16
-
17
- module Alexandria
18
- class BookProviders
19
- class AdLibrisProvider < WebsiteBasedProvider
20
- include Alexandria::Logging
21
-
22
- SITE = "http://www.adlibris.com/se/"
23
-
24
- BASE_SEARCH_URL = "#{SITE}searchresult.aspx?search=advanced&%s=%s" \
25
- "&fromproduct=False" # type/term
26
-
27
- PRODUCT_URL = "#{SITE}product.aspx?isbn=%s"
28
-
29
- def initialize
30
- super("AdLibris", "AdLibris (Sweden)")
31
- prefs.read
32
- # @ent = HTMLEntities.new
33
- end
34
-
35
- ## search (copied from new WorldCat search)
36
- def search(criterion, type)
37
- req = create_search_uri(type, criterion)
38
- log.info { "Fetching #{req} " }
39
- html_data = transport.get_response(URI.parse(req))
40
-
41
- if type == SEARCH_BY_ISBN
42
- parse_result_data(html_data.body)
43
- else
44
- results = parse_search_result_data(html_data.body)
45
- raise NoResultsError if results.empty?
46
-
47
- results.map { |result| get_book_from_search_result(result) }
48
- end
49
- end
50
-
51
- ## url
52
- def url(book)
53
- create_search_uri(SEARCH_BY_ISBN, book.isbn)
54
- rescue StandardError => ex
55
- log.warn { "Cannot create url for book #{book}; #{ex.message}" }
56
- nil
57
- end
58
-
59
- private
60
-
61
- def create_search_uri(search_type, search_term)
62
- if search_type == SEARCH_BY_ISBN
63
- PRODUCT_URL % Library.canonicalise_isbn(search_term)
64
- else
65
- (search_type_code = {
66
- SEARCH_BY_AUTHORS => "author",
67
- SEARCH_BY_TITLE => "title",
68
- SEARCH_BY_KEYWORD => "keyword"
69
- }[search_type]) || "keyword"
70
- search_term_encoded = CGI.escape(search_term)
71
- format(BASE_SEARCH_URL, search_type_code, search_term_encoded)
72
- end
73
- end
74
-
75
- # TODO: use Iconv to pre-convert the html.body to UTF-8 everywhere
76
- # before sending it to the parser methods
77
-
78
- def get_book_from_search_result(rslt)
79
- html_data = transport.get_response(URI.parse(rslt[:lookup_url]))
80
- parse_result_data(html_data.body)
81
- end
82
-
83
- def parse_search_result_data(html)
84
- # adlibris site presents data in ISO-8859-1, so change it to UTF-8
85
- # html = Iconv.conv("UTF-8", "ISO-8859-1", html)
86
- # doc = Hpricot(html)
87
- doc = html_to_doc(html)
88
- book_search_results = []
89
-
90
- search_hit = doc.search("div'searchResult")[0]
91
- return [] unless search_hit
92
-
93
- (search_hit / "ul.ulSearch table").each do |t|
94
- result = {}
95
- if (title_data = (t % "div.divTitle"))
96
- result[:title] = (title_data % :a).inner_text
97
- lookup_url = (title_data % :a)["href"]
98
- end
99
- result[:lookup_url] = "#{SITE}#{lookup_url}"
100
-
101
- book_search_results << result
102
- end
103
- book_search_results
104
- end
105
-
106
- def normalize(text)
107
- text
108
- end
109
-
110
- def parse_result_data(html)
111
- doc = html_to_doc(html)
112
- begin
113
- title = nil
114
- if (h1 = doc.at("div.productTitleFormat h1"))
115
- title = text_of(h1)
116
- else
117
- raise NoResultsError, "title not found on page"
118
- end
119
-
120
- product = doc.at("div.product")
121
- ul_info = doc.at("ul.info") # NOTE, two of these
122
-
123
- author_cells = ul_info.search("li.liAuthor") # css-like search
124
- authors = []
125
- author_cells.each do |li|
126
- author_name = text_of(li.search("h2 > a")[0])
127
-
128
- authors << author_name
129
- end
130
-
131
- publisher = nil
132
- if (publisher_elem = product.search('li[@id$="liPublisher"] a').first)
133
- publisher = text_of(publisher_elem)
134
- end
135
-
136
- binding = nil
137
- if (format = doc.search("div.productTitleFormat span").first)
138
- binding = text_of(format)
139
- binding = Regexp.last_match[1] if binding =~ /\(([^\)]+)\)/
140
- end
141
-
142
- year = nil
143
- if (published = product.search('span[@id$="Published"]').first)
144
- publication = published.inner_text
145
- year = Regexp.last_match[1].to_i if publication =~ /([12][0-9]{3})/
146
- end
147
-
148
- isbns = []
149
- isbn_tds = doc.search("li[@id *= 'liISBN'] td[text()]")
150
-
151
- isbn_tds.each do |isbn_td|
152
- isbn = isbn_td.inner_text
153
- next unless isbn =~ /[0-9x]{10,13}/i
154
-
155
- isbn.gsub(/(\n|\r)/, " ")
156
- isbn = Regexp.last_match[1] if isbn =~ /:[\s]*([0-9x]+)/i
157
- isbns << isbn
158
- end
159
- isbn = isbns.first
160
- isbn = Library.canonicalise_isbn(isbn) if isbn
161
-
162
- # cover
163
- image_url = nil
164
- cover_img =
165
- doc.search('span.imageWithShadow img[@id$="ProductImageNotLinked"]').first
166
- if cover_img
167
- image_url = if %r{^http\://}.match?(cover_img["src"])
168
- cover_img["src"]
169
- else
170
- "#{SITE}/#{cover_img['src']}" # HACK: use html base
171
- end
172
- if /noimage.gif$/.match?(image_url)
173
- # no point downloading a "no image" graphic
174
- # Alexandria has its own generic book icon...
175
- image_url = nil
176
- end
177
-
178
- end
179
-
180
- book = Book.new(title, authors, isbn, publisher, year, binding)
181
-
182
- [book, image_url]
183
- rescue StandardError => ex
184
- raise ex if ex.instance_of? NoResultsError
185
-
186
- trace = ex.backtrace.join("\n> ")
187
- log.warn do
188
- "Failed parsing search results for AdLibris " \
189
- "#{ex.message} #{trace}"
190
- end
191
- raise NoResultsError
192
- end
193
- end
194
- end
195
- end
196
- end