alexandria-book-collection-manager 0.7.2 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +9 -0
  3. data/.github/workflows/ruby.yml +77 -0
  4. data/.gitignore +5 -1
  5. data/.hound.yml +2 -0
  6. data/.rubocop.yml +87 -37
  7. data/.rubocop_todo.yml +62 -191
  8. data/.simplecov +5 -2
  9. data/CHANGELOG.md +63 -0
  10. data/Gemfile +4 -3
  11. data/INSTALL.md +26 -14
  12. data/README.md +52 -42
  13. data/Rakefile +93 -109
  14. data/TODO.md +9 -1
  15. data/alexandria-book-collection-manager.gemspec +50 -43
  16. data/bin/alexandria +30 -53
  17. data/doc/FAQ +2 -6
  18. data/doc/dependency_decisions.yml +27 -8
  19. data/lib/alexandria.rb +27 -37
  20. data/lib/alexandria/about.rb +50 -50
  21. data/lib/alexandria/book_providers.rb +90 -97
  22. data/lib/alexandria/book_providers/adlibris.rb +41 -76
  23. data/lib/alexandria/book_providers/amazon_aws.rb +96 -100
  24. data/lib/alexandria/book_providers/amazon_ecs_util.rb +295 -322
  25. data/lib/alexandria/book_providers/barnes_and_noble.rb +48 -45
  26. data/lib/alexandria/book_providers/douban.rb +26 -42
  27. data/lib/alexandria/book_providers/proxis.rb +44 -55
  28. data/lib/alexandria/book_providers/pseudomarc.rb +77 -85
  29. data/lib/alexandria/book_providers/siciliano.rb +64 -65
  30. data/lib/alexandria/book_providers/thalia.rb +42 -41
  31. data/lib/alexandria/book_providers/web.rb +15 -33
  32. data/lib/alexandria/book_providers/worldcat.rb +70 -97
  33. data/lib/alexandria/book_providers/z3950.rb +160 -173
  34. data/lib/alexandria/config.rb +1 -1
  35. data/lib/alexandria/console.rb +8 -21
  36. data/lib/alexandria/default_preferences.rb +37 -0
  37. data/lib/alexandria/execution_queue.rb +15 -13
  38. data/lib/alexandria/export_format.rb +47 -0
  39. data/lib/alexandria/export_library.rb +193 -300
  40. data/lib/alexandria/import_library.rb +108 -141
  41. data/lib/alexandria/import_library_csv.rb +43 -46
  42. data/lib/alexandria/library_collection.rb +79 -0
  43. data/lib/alexandria/library_sort_order.rb +45 -0
  44. data/lib/alexandria/library_store.rb +233 -0
  45. data/lib/alexandria/logging.rb +11 -13
  46. data/lib/alexandria/models/book.rb +13 -20
  47. data/lib/alexandria/models/library.rb +81 -353
  48. data/lib/alexandria/net.rb +5 -6
  49. data/lib/alexandria/preferences.rb +73 -87
  50. data/lib/alexandria/scanners.rb +2 -2
  51. data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +20 -18
  52. data/lib/alexandria/scanners/keyboard.rb +8 -8
  53. data/lib/alexandria/smart_library.rb +133 -170
  54. data/lib/alexandria/ui.rb +15 -15
  55. data/lib/alexandria/ui/about_dialog.rb +49 -0
  56. data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +119 -136
  57. data/lib/alexandria/ui/alert_dialog.rb +64 -0
  58. data/lib/alexandria/ui/bad_isbns_dialog.rb +41 -0
  59. data/lib/alexandria/ui/{dialogs/barcode_animation.rb → barcode_animation.rb} +16 -15
  60. data/lib/alexandria/ui/{dialogs/book_properties_dialog.rb → book_properties_dialog.rb} +39 -52
  61. data/lib/alexandria/ui/book_properties_dialog_base.rb +318 -0
  62. data/lib/alexandria/ui/builder_base.rb +7 -27
  63. data/lib/alexandria/ui/calendar_popup.rb +58 -0
  64. data/lib/alexandria/ui/callbacks.rb +189 -183
  65. data/lib/alexandria/ui/completion_models.rb +10 -23
  66. data/lib/alexandria/ui/confirm_erase_dialog.rb +33 -0
  67. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +34 -0
  68. data/lib/alexandria/ui/dndable.rb +7 -7
  69. data/lib/alexandria/ui/error_dialog.rb +25 -0
  70. data/lib/alexandria/ui/export_dialog.rb +142 -0
  71. data/lib/alexandria/ui/icons.rb +47 -63
  72. data/lib/alexandria/ui/iconview.rb +12 -10
  73. data/lib/alexandria/ui/iconview_tooltips.rb +41 -54
  74. data/lib/alexandria/ui/import_dialog.rb +157 -0
  75. data/lib/alexandria/ui/init.rb +21 -33
  76. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +36 -0
  77. data/lib/alexandria/ui/libraries_combo.rb +16 -14
  78. data/lib/alexandria/ui/listview.rb +73 -87
  79. data/lib/alexandria/ui/main_app.rb +24 -26
  80. data/lib/alexandria/ui/misc_dialogs.rb +10 -0
  81. data/lib/alexandria/ui/multi_drag_treeview.rb +28 -41
  82. data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +156 -194
  83. data/lib/alexandria/ui/new_book_dialog_manual.rb +139 -0
  84. data/lib/alexandria/ui/new_provider_dialog.rb +100 -0
  85. data/lib/alexandria/ui/new_smart_library_dialog.rb +74 -0
  86. data/lib/alexandria/ui/preferences_dialog.rb +313 -0
  87. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +95 -0
  88. data/lib/alexandria/ui/provider_preferences_dialog.rb +35 -0
  89. data/lib/alexandria/ui/really_delete_dialog.rb +53 -0
  90. data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +56 -68
  91. data/lib/alexandria/ui/skip_entry_dialog.rb +33 -0
  92. data/lib/alexandria/ui/smart_library_properties_dialog.rb +60 -0
  93. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +242 -0
  94. data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
  95. data/lib/alexandria/ui/sound.rb +11 -13
  96. data/lib/alexandria/ui/ui_manager.rb +236 -251
  97. data/lib/alexandria/undo_manager.rb +1 -0
  98. data/lib/alexandria/version.rb +4 -19
  99. data/lib/alexandria/web_themes.rb +22 -21
  100. data/po/Makefile +2 -2
  101. data/po/cs.po +993 -880
  102. data/po/cy.po +957 -874
  103. data/po/de.po +990 -869
  104. data/po/el.po +989 -869
  105. data/po/es.po +985 -865
  106. data/po/fr.po +986 -870
  107. data/po/ga.po +907 -823
  108. data/po/gl.po +981 -865
  109. data/po/it.po +986 -868
  110. data/po/ja.po +969 -853
  111. data/po/mk.po +983 -863
  112. data/po/nb.po +979 -863
  113. data/po/nl.po +983 -864
  114. data/po/pl.po +1017 -974
  115. data/po/pt.po +988 -861
  116. data/po/pt_BR.po +984 -868
  117. data/po/ru.po +992 -873
  118. data/po/sk.po +987 -869
  119. data/po/sv.po +977 -861
  120. data/po/uk.po +975 -865
  121. data/po/zh_TW.po +976 -860
  122. data/schemas/alexandria.schemas +25 -3
  123. data/share/alexandria/glade/acquire_dialog__builder.glade +15 -12
  124. data/share/alexandria/glade/book_properties_dialog__builder.glade +171 -299
  125. data/share/alexandria/glade/main_app__builder.glade +24 -33
  126. data/share/alexandria/glade/new_book_dialog__builder.glade +27 -59
  127. data/share/alexandria/glade/preferences_dialog__builder.glade +250 -290
  128. data/share/gnome/help/alexandria/C/introduction.xml +0 -8
  129. data/share/gnome/help/alexandria/C/searching.xml +1 -1
  130. data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
  131. data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
  132. data/share/gnome/help/alexandria/fr/alexandria.xml +1 -1
  133. data/share/gnome/help/alexandria/ja/introduction.xml +0 -8
  134. data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
  135. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
  136. data/spec/alexandria/book_providers_spec.rb +75 -171
  137. data/spec/alexandria/book_spec.rb +12 -10
  138. data/spec/alexandria/console_spec.rb +27 -0
  139. data/spec/alexandria/export_library_spec.rb +130 -0
  140. data/spec/alexandria/library_spec.rb +128 -172
  141. data/spec/alexandria/library_store_spec.rb +37 -0
  142. data/spec/alexandria/preferences_spec.rb +44 -17
  143. data/spec/alexandria/scanners/cue_cat_spec.rb +52 -0
  144. data/spec/alexandria/smart_library_spec.rb +30 -25
  145. data/spec/alexandria/ui/about_dialog_spec.rb +14 -0
  146. data/spec/alexandria/ui/acquire_dialog_spec.rb +14 -0
  147. data/spec/alexandria/ui/alert_dialog_spec.rb +16 -0
  148. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +14 -0
  149. data/spec/alexandria/ui/book_properties_dialog_spec.rb +17 -0
  150. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +14 -0
  151. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +16 -0
  152. data/spec/alexandria/ui/error_dialog_spec.rb +14 -0
  153. data/spec/alexandria/ui/export_dialog_spec.rb +36 -0
  154. data/spec/alexandria/ui/icons_spec.rb +26 -0
  155. data/spec/alexandria/ui/iconview_spec.rb +7 -21
  156. data/spec/alexandria/ui/import_dialog_spec.rb +46 -0
  157. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +17 -0
  158. data/spec/alexandria/ui/main_app_spec.rb +7 -34
  159. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +15 -0
  160. data/spec/alexandria/ui/new_book_dialog_spec.rb +22 -0
  161. data/spec/alexandria/ui/new_provider_dialog_spec.rb +30 -0
  162. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +39 -0
  163. data/spec/alexandria/ui/preferences_dialog_spec.rb +14 -0
  164. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +34 -0
  165. data/spec/alexandria/ui/really_delete_dialog_spec.rb +16 -0
  166. data/spec/alexandria/ui/sidepane_manager_spec.rb +15 -0
  167. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +14 -0
  168. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +49 -0
  169. data/spec/alexandria/ui/sound_spec.rb +2 -2
  170. data/spec/alexandria/ui/ui_manager_spec.rb +43 -20
  171. data/spec/end_to_end/basic_run_spec.rb +52 -0
  172. data/spec/spec_helper.rb +65 -33
  173. data/tasks/setup.rb +2 -2
  174. data/tasks/spec.rake +16 -3
  175. data/util/rake/fileinstall.rb +39 -35
  176. data/util/rake/gettextgenerate.rb +7 -7
  177. data/util/rake/omfgenerate.rb +7 -7
  178. metadata +178 -45
  179. data/dogtail/basic_run_test.py +0 -9
  180. data/lib/alexandria/book_providers/deastore.rb +0 -265
  181. data/lib/alexandria/book_providers/mcu.rb +0 -182
  182. data/lib/alexandria/book_providers/renaud.rb +0 -149
  183. data/lib/alexandria/ui/dialogs/about_dialog.rb +0 -61
  184. data/lib/alexandria/ui/dialogs/alert_dialog.rb +0 -72
  185. data/lib/alexandria/ui/dialogs/bad_isbns_dialog.rb +0 -51
  186. data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +0 -426
  187. data/lib/alexandria/ui/dialogs/export_dialog.rb +0 -171
  188. data/lib/alexandria/ui/dialogs/import_dialog.rb +0 -196
  189. data/lib/alexandria/ui/dialogs/misc_dialogs.rb +0 -87
  190. data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +0 -154
  191. data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +0 -74
  192. data/lib/alexandria/ui/dialogs/preferences_dialog.rb +0 -568
  193. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +0 -59
  194. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +0 -420
  195. data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
  196. data/spec/alexandria/ui/dialogs_spec.rb +0 -96
  197. data/spec/alexandria/ui/sidepane_spec.rb +0 -29
  198. data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
  199. data/spec/alexandria/utilities_spec.rb +0 -52
  200. data/tasks/dogtail.rake +0 -6
data/TODO.md CHANGED
@@ -1,7 +1,15 @@
1
1
  Alexandria's TODO list
2
2
  ======================
3
3
 
4
- This is an old list of TODO's.
4
+ ## New TODOs
5
+
6
+ * [ ] Clean up broken providers
7
+ * [ ] Add openlibrary provider
8
+ * [ ] Allow searching for cover image for existing books
9
+
10
+ ## Old TODOs
11
+
12
+ This is an old list of TODO's that should be cleaned up.
5
13
 
6
14
  For the next release:
7
15
 
@@ -1,61 +1,68 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'lib/alexandria/version'
3
+ require_relative "lib/alexandria/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = 'alexandria-book-collection-manager'
6
+ s.name = "alexandria-book-collection-manager"
7
7
  s.version = Alexandria::VERSION
8
8
 
9
- s.summary = 'GNOME application for managing collections of books'
10
- s.required_ruby_version = '>= 2.3.0'
9
+ s.summary = "GNOME application for managing collections of books"
10
+ s.required_ruby_version = ">= 2.5.0"
11
11
 
12
12
  s.authors = [
13
- 'Alexander McCormmach',
14
- 'Aymeric Nys',
15
- 'Cathal Mc Ginley',
16
- 'Claudio Belotti',
17
- 'Constantine Evans',
18
- 'Dafydd Harries',
19
- 'Javier Fernandez-Sanguino Pena',
20
- 'Joseph Method',
21
- 'Kevin Schultz',
22
- 'Laurent Sansonetti',
23
- 'Marco Costantini',
24
- 'Mathieu Leduc-Hamel',
25
- 'Matijs van Zuijlen',
26
- 'Owain Evans',
27
- 'Pascal Terjan',
28
- 'Rene Samselnig',
29
- 'Robby Stephenson',
30
- 'Sun Ning',
31
- 'Takayuki Kusano',
32
- 'Timothy Malone',
33
- 'Zachary P. Landau'
13
+ "Alexander McCormmach",
14
+ "Aymeric Nys",
15
+ "Cathal Mc Ginley",
16
+ "Claudio Belotti",
17
+ "Constantine Evans",
18
+ "Dafydd Harries",
19
+ "Javier Fernandez-Sanguino Pena",
20
+ "Joseph Method",
21
+ "Kevin Schultz",
22
+ "Laurent Sansonetti",
23
+ "Marco Costantini",
24
+ "Mathieu Leduc-Hamel",
25
+ "Matijs van Zuijlen",
26
+ "Owain Evans",
27
+ "Pascal Terjan",
28
+ "Rene Samselnig",
29
+ "Robby Stephenson",
30
+ "Sun Ning",
31
+ "Takayuki Kusano",
32
+ "Timothy Malone",
33
+ "Zachary P. Landau"
34
34
  ]
35
- s.email = ['matijs@matijs.net']
36
- s.homepage = 'http://www.github.com/mvz/alexandria-book-collection-manager'
35
+ s.email = ["matijs@matijs.net"]
36
+ s.homepage = "http://www.github.com/mvz/alexandria-book-collection-manager"
37
37
 
38
- s.license = 'GPL-2'
38
+ s.license = "GPL-2"
39
39
 
40
40
  s.files = `git ls-files -z`.split("\0") |
41
- ['lib/alexandria/default_preferences.rb']
41
+ ["lib/alexandria/default_preferences.rb"]
42
42
 
43
- s.executables = ['alexandria']
43
+ s.executables = ["alexandria"]
44
44
 
45
- s.rdoc_options = ['--main', 'README.md']
45
+ s.rdoc_options = ["--main", "README.md"]
46
46
 
47
- s.add_runtime_dependency('gettext', ['~> 3.1'])
48
- s.add_runtime_dependency('gstreamer', ['3.2.1'])
49
- s.add_runtime_dependency('gtk3', ['3.2.1'])
50
- s.add_runtime_dependency('hpricot', ['~> 0.8.5'])
51
- s.add_runtime_dependency('htmlentities', ['~> 4.3'])
52
- s.add_runtime_dependency('image_size', ['~> 1.5.0'])
53
- s.add_runtime_dependency('marc', ['~> 1.0.0'])
54
- s.add_runtime_dependency('zoom', ['~> 0.5.0'])
47
+ s.add_runtime_dependency("gettext", ["~> 3.1"])
48
+ s.add_runtime_dependency("gstreamer", ["~> 3.4.3"])
49
+ s.add_runtime_dependency("gtk3", ["~> 3.4.3"])
50
+ s.add_runtime_dependency("hpricot", ["~> 0.8.5"])
51
+ s.add_runtime_dependency("htmlentities", ["~> 4.3"])
52
+ s.add_runtime_dependency("image_size", ["~> 2.0"])
53
+ s.add_runtime_dependency("marc", ["~> 1.0.0"])
54
+ s.add_runtime_dependency("psych", ["~> 3.2.0"])
55
+ s.add_runtime_dependency("zoom", ["~> 0.5.0"])
55
56
 
56
- s.add_development_dependency('minitest', ['~> 5.0'])
57
- s.add_development_dependency('rake', ['~> 12.0'])
58
- s.add_development_dependency('rspec', ['~> 3.0'])
57
+ s.add_development_dependency("gnome_app_driver", ["~> 0.2.1"])
58
+ s.add_development_dependency("minitest", ["~> 5.0"])
59
+ s.add_development_dependency("rake", ["~> 13.0"])
60
+ s.add_development_dependency("rspec", ["~> 3.0"])
61
+ s.add_development_dependency("rubocop", "~> 0.93.1")
62
+ s.add_development_dependency("rubocop-i18n", ["~> 2.0.2"])
63
+ s.add_development_dependency("rubocop-performance", ["~> 1.8.0"])
64
+ s.add_development_dependency("rubocop-rspec", "~> 1.44.1")
65
+ s.add_development_dependency("webmock", "~> 3.9")
59
66
 
60
- s.require_paths = ['lib']
67
+ s.require_paths = ["lib"]
61
68
  end
@@ -1,56 +1,33 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- # Copyright (C) 2004-2006 Laurent Sansonetti
5
- # Copyright (C) 2007, 2008 Joseph Method
6
- # Copyright (C) 2007, 2009 Cathal Mc Ginley
7
- # Copyright (C) 2014, 2015 Matijs van Zuijlen
4
+ # This file is part of Alexandria.
8
5
  #
9
- # Alexandria is free software; you can redistribute it and/or
10
- # modify it under the terms of the GNU General Public License as
11
- # published by the Free Software Foundation; either version 2 of the
12
- # License, or (at your option) any later version.
13
- #
14
- # Alexandria is distributed in the hope that it will be useful,
15
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- # General Public License for more details.
18
- #
19
- # You should have received a copy of the GNU General Public
20
- # License along with Alexandria; see the file COPYING. If not,
21
- # write to the Free Software Foundation, Inc., 51 Franklin Street,
22
- # Fifth Floor, Boston, MA 02110-1301 USA.
6
+ # See the file README.md for authorship and licensing information.
7
+
8
+ require "gettext"
9
+ require "alexandria"
10
+ require "optparse"
11
+ require "ostruct"
23
12
 
24
- require 'gettext'
25
- require 'alexandria'
26
- require 'optparse'
27
- require 'ostruct'
13
+ store = Alexandria::LibraryStore.new(Alexandria::Library::DEFAULT_DIR)
14
+ Alexandria::LibraryCollection.instance.library_store = store
28
15
 
29
16
  # options = OpenStruct.new
30
17
  OptionParser.new do |opts|
31
- opts.banner = 'Usage: alexandria [options]'
32
- opts.on('-l', '--list', 'List libraries in numbered format') do
18
+ opts.banner = "Usage: alexandria [options]"
19
+ opts.on("-l", "--list", "List libraries in numbered format") do
33
20
  puts Alexandria.list_books_on_console
34
21
  exit
35
22
  end
36
- # opts.on("--output FORMAT",
37
- # "Output library as FORMAT: csv|xml|yaml; use with --library or omit for ALL") do |val|
38
- # options.format = val
39
- # exit
40
- # end
41
- # opts.on("--library LIBRARY",
42
- # "Used with --output to pick a library to output") do |val|
43
- # options.library = val
44
- # exit
45
- # end
46
- opts.on('-d', '--debug', 'Run in debug mode') do
23
+ opts.on("-d", "--debug", "Run in debug mode") do
47
24
  $DEBUG = true
48
25
  end
49
- opts.on('-h', '--help', 'Show help options') do
26
+ opts.on("-h", "--help", "Show help options") do
50
27
  puts opts
51
28
  exit
52
29
  end
53
- opts.on('-v', '--version', 'Get version number') do
30
+ opts.on("-v", "--version", "Get version number") do
54
31
  puts Alexandria::VERSION
55
32
  exit
56
33
  end
@@ -58,21 +35,21 @@ end.parse!
58
35
 
59
36
  begin
60
37
  Alexandria.main
61
- rescue => e
62
- warn <<EOS
63
- -----------------------
64
- Alexandria just crashed
65
- -----------------------
66
- Timestamp: #{Time.now}
67
- Message: #{e.message}
68
- Backtrace:
69
- #{e.backtrace.join("\n")}
70
- Release: #{Alexandria::VERSION}(#{Alexandria::DISPLAY_VERSION})
71
- Uname -a: #{`uname -a`.chomp}
72
- --
73
- Please report this dump to '#{Alexandria::BUGREPORT_URL}' with some additional
74
- information, such as the description of the crash and the steps to reproduce it
75
- (if it's possible).
76
- EOS
38
+ rescue StandardError => ex
39
+ warn <<~EOS
40
+ -----------------------
41
+ Alexandria just crashed
42
+ -----------------------
43
+ Timestamp: #{Time.now}
44
+ Message: #{ex.message}
45
+ Backtrace:
46
+ #{ex.backtrace.join("\n")}
47
+ Release: #{Alexandria::VERSION}(#{Alexandria::DISPLAY_VERSION})
48
+ Uname -a: #{`uname -a`.chomp}
49
+ --
50
+ Please report this dump to '#{Alexandria::BUGREPORT_URL}' with some additional
51
+ information, such as the description of the crash and the steps to reproduce it
52
+ (if it's possible).
53
+ EOS
77
54
  exit 1
78
55
  end
data/doc/FAQ CHANGED
@@ -159,8 +159,6 @@ for public libraries, and very unlikely for commercial booksellers.
159
159
  It is useful if you choose a provider that allows to specify the ISBN in
160
160
  the address, such as
161
161
  http://www.internetbookshop.it/ame/ser/serdsp.asp?e=0060748222&shop=1
162
- or
163
- http://www.deastore.com/product.asp?isbn=9780060748227
164
162
 
165
163
  It is necessary that the HTML page of each provider is easily parsable,
166
164
  that is, that the computer can easily find title, author(s), ISBN,
@@ -184,8 +182,7 @@ information: title, author(s), ISBN, publisher, year of publication,
184
182
  binding. In case that one of these is missing, Alexandria will not get
185
183
  it.
186
184
 
187
- It is easier, if the provider doesn't use cookies (however, provider
188
- Deastore uses cookies and has been implemented).
185
+ It is easier, if the provider doesn't use cookies.
189
186
 
190
187
  After the choice of the provider, try by yourself to modify the file for
191
188
  an already implemented provider. Probably it may be only required that
@@ -293,8 +290,7 @@ Question: I prefer to have the field "Author" as "Surname, Name" instead
293
290
  of "Name Surname".
294
291
 
295
292
  Answer: Alexandria relies on what the providers say:
296
- some providers report "Surname, Name": Deastore, Renaud, Mcu,
297
- some "Surname Name": Webster.it, Ibs.it,
293
+ some providers report "Surname Name": Webster.it, Ibs.it,
298
294
  some "Name Surname": Bn, Thalia, Bol.it, Adlibris, L Siciliano, Worldcat,
299
295
  and some without any rule: Amazon, Proxis.
300
296
  You can change, in the preferences, the order in which the providers are
@@ -1,29 +1,29 @@
1
1
  ---
2
- - - :whitelist
2
+ - - :permit
3
3
  - LGPL-3+
4
4
  - :who:
5
5
  :why:
6
6
  :versions: []
7
7
  :when: 2017-07-23 05:51:53.629753437 Z
8
- - - :whitelist
8
+ - - :permit
9
9
  - LGPL-2.1+
10
10
  - :who:
11
11
  :why:
12
12
  :versions: []
13
13
  :when: 2017-07-23 05:52:02.088395832 Z
14
- - - :whitelist
14
+ - - :permit
15
15
  - MIT
16
16
  - :who:
17
17
  :why:
18
18
  :versions: []
19
19
  :when: 2017-07-23 05:52:06.806192042 Z
20
- - - :whitelist
20
+ - - :permit
21
21
  - LGPLv2+
22
22
  - :who:
23
23
  :why:
24
24
  :versions: []
25
25
  :when: 2017-07-23 05:52:24.618189811 Z
26
- - - :whitelist
26
+ - - :permit
27
27
  - ruby
28
28
  - :who:
29
29
  :why:
@@ -53,9 +53,28 @@
53
53
  :why:
54
54
  :versions: []
55
55
  :when: 2017-07-23 05:54:54.822319735 Z
56
- - - :approve
56
+ - - :license
57
57
  - zoom
58
+ - LGPL-2.1
59
+ - :who:
60
+ :why:
61
+ :versions: []
62
+ :when: 2020-07-30 06:44:22.960902375 Z
63
+ - - :permit
64
+ - Simplified BSD
58
65
  - :who:
59
- :why: Actually licensed under LGPL-2.1
66
+ :why:
67
+ :versions: []
68
+ :when: 2020-07-30 06:45:58.599399721 Z
69
+ - - :permit
70
+ - Apache 2.0
71
+ - :who:
72
+ :why:
73
+ :versions: []
74
+ :when: 2020-07-30 06:46:08.280121582 Z
75
+ - - :permit
76
+ - LGPL-2.1
77
+ - :who:
78
+ :why:
60
79
  :versions: []
61
- :when: 2017-07-23 06:00:43.594558953 Z
80
+ :when: 2020-07-30 06:46:32.729325577 Z
@@ -1,24 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (C) 2004-2006 Laurent Sansonetti
4
- # Copyright (C) 2011, 2016 Matijs van Zuijlen
3
+ # This file is part of Alexandria.
5
4
  #
6
- # Alexandria is free software; you can redistribute it and/or
7
- # modify it under the terms of the GNU General Public License as
8
- # published by the Free Software Foundation; either version 2 of the
9
- # License, or (at your option) any later version.
10
- #
11
- # Alexandria is distributed in the hope that it will be useful,
12
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- # General Public License for more details.
15
- #
16
- # You should have received a copy of the GNU General Public
17
- # License along with Alexandria; see the file COPYING. If not,
18
- # write to the Free Software Foundation, Inc., 51 Franklin Street,
19
- # Fifth Floor, Boston, MA 02110-1301 USA.
5
+ # See the file README.md for authorship and licensing information.
20
6
 
21
- require 'gettext'
7
+ require "gettext"
22
8
 
23
9
  # XXX: Gettext hotfix
24
10
  module Gem
@@ -30,18 +16,20 @@ module Gem
30
16
  end
31
17
  end
32
18
 
33
- require 'logger'
34
- require 'alexandria/logging'
35
- require 'alexandria/about'
19
+ require "logger"
20
+ require "alexandria/logging"
21
+ require "alexandria/about"
36
22
 
37
23
  module Alexandria
38
24
  def self.set_proxy
39
- ENV['http_proxy'] = nil if !ENV['http_proxy'].nil? && URI.parse(ENV['http_proxy']).userinfo.nil?
25
+ if !ENV["http_proxy"].nil? && URI.parse(ENV["http_proxy"]).userinfo.nil?
26
+ ENV["http_proxy"] = nil
27
+ end
40
28
  end
41
29
 
42
30
  def self.set_log_level
43
- Alexandria.log.level = Logger::DEBUG if $DEBUG
44
- Alexandria.log.debug { 'Initializing Alexandria...' }
31
+ log.level = Logger::DEBUG if $DEBUG
32
+ log.debug { "Initializing Alexandria" }
45
33
  end
46
34
 
47
35
  def self.main
@@ -53,8 +41,8 @@ end
53
41
 
54
42
  # lrz says 'macui' is obsolete (may be supported again some day)
55
43
  # unless $MACOSX
56
- require 'alexandria/config'
57
- require 'alexandria/version'
44
+ require "alexandria/config"
45
+ require "alexandria/version"
58
46
 
59
47
  # else
60
48
  # module Alexandria
@@ -65,20 +53,22 @@ require 'alexandria/version'
65
53
  # end
66
54
  # end
67
55
 
68
- require 'alexandria/models/book'
69
- require 'alexandria/models/library'
56
+ require "alexandria/models/book"
57
+ require "alexandria/library_store"
58
+ require "alexandria/library_collection"
59
+ require "alexandria/models/library"
70
60
 
71
- require 'alexandria/smart_library'
72
- require 'alexandria/execution_queue'
73
- require 'alexandria/import_library'
74
- require 'alexandria/export_library'
75
- require 'alexandria/book_providers'
76
- require 'alexandria/preferences'
77
- require 'alexandria/undo_manager'
78
- require 'alexandria/web_themes'
61
+ require "alexandria/smart_library"
62
+ require "alexandria/execution_queue"
63
+ require "alexandria/import_library"
64
+ require "alexandria/export_library"
65
+ require "alexandria/book_providers"
66
+ require "alexandria/preferences"
67
+ require "alexandria/undo_manager"
68
+ require "alexandria/web_themes"
79
69
 
80
70
  # lrz says 'macui' is obsolete (may be supported again some day)
81
71
  # require $MACOSX ? 'alexandria/macui' : 'alexandria/ui'
82
72
 
83
- require 'alexandria/ui'
84
- require 'alexandria/console'
73
+ require "alexandria/ui"
74
+ require "alexandria/console"
@@ -20,64 +20,64 @@
20
20
  # Fifth Floor, Boston, MA 02110-1301 USA.
21
21
 
22
22
  module Alexandria
23
- TITLE = 'Alexandria'
24
- TEXTDOMAIN = 'alexandria'
23
+ TITLE = "Alexandria"
24
+ TEXTDOMAIN = "alexandria"
25
25
  extend GetText
26
- bindtextdomain(Alexandria::TEXTDOMAIN, charset: 'UTF-8')
27
- DESCRIPTION = _('A program to help you manage your book collection.')
26
+ bindtextdomain(Alexandria::TEXTDOMAIN, charset: "UTF-8")
27
+ DESCRIPTION = _("A program to help you manage your book collection.")
28
28
  COPYRIGHT = "Copyright (C) 2004-2006 Laurent Sansonetti\n" \
29
- 'Copyright (C) 2007-2010,2014,2015 Alexandria Contributors'
29
+ "Copyright (C) 2007-2010,2014,2015 Alexandria Contributors"
30
30
  AUTHORS = [
31
- 'Alexander McCormmach <alexander@tunicate.org>',
32
- 'Aymeric Nys <aymeric@nnx.com>',
33
- 'Cathal Mc Ginley <cathal.alexandria@gnostai.org>',
34
- 'Claudio Belotti <bel8@lilik.it>',
35
- 'Constantine Evans <cevans@costinet.org>',
36
- 'Dafydd Harries <daf@muse.19inch.net>',
37
- 'Javier Fernandez-Sanguino Pena <jfs@debian.org>',
38
- 'Joseph Method <tristil@gmail.com>',
39
- 'Kevin Schultz <schultkl@ieee.org>',
40
- 'Laurent Sansonetti <lrz@gnome.org>',
41
- 'Marco Costantini <costanti@science.unitn.it>',
42
- 'Mathieu Leduc-Hamel <arrak@arrak.org>',
43
- 'Matijs van Zuijlen <matijs@matijs.net>',
44
- 'Owain Evans <o.evans@gmail.com>',
45
- 'Pascal Terjan <pterjan@linuxfr.org>',
46
- 'Rene Samselnig <sandman@sdm-net.org>',
47
- 'Robby Stephenson <robby@periapsis.org>',
48
- 'Sun Ning <classicning@gmail.com>',
49
- 'Takayuki Kusano <AE5T-KSN@asahi-net.or.jp>',
50
- 'Timothy Malone <timothy.malone@gmail.com>',
51
- 'Zachary P. Landau <kapheine@hypa.net>'
31
+ "Alexander McCormmach <alexander@tunicate.org>",
32
+ "Aymeric Nys <aymeric@nnx.com>",
33
+ "Cathal Mc Ginley <cathal.alexandria@gnostai.org>",
34
+ "Claudio Belotti <bel8@lilik.it>",
35
+ "Constantine Evans <cevans@costinet.org>",
36
+ "Dafydd Harries <daf@muse.19inch.net>",
37
+ "Javier Fernandez-Sanguino Pena <jfs@debian.org>",
38
+ "Joseph Method <tristil@gmail.com>",
39
+ "Kevin Schultz <schultkl@ieee.org>",
40
+ "Laurent Sansonetti <lrz@gnome.org>",
41
+ "Marco Costantini <costanti@science.unitn.it>",
42
+ "Mathieu Leduc-Hamel <arrak@arrak.org>",
43
+ "Matijs van Zuijlen <matijs@matijs.net>",
44
+ "Owain Evans <o.evans@gmail.com>",
45
+ "Pascal Terjan <pterjan@linuxfr.org>",
46
+ "Rene Samselnig <sandman@sdm-net.org>",
47
+ "Robby Stephenson <robby@periapsis.org>",
48
+ "Sun Ning <classicning@gmail.com>",
49
+ "Takayuki Kusano <AE5T-KSN@asahi-net.or.jp>",
50
+ "Timothy Malone <timothy.malone@gmail.com>",
51
+ "Zachary P. Landau <kapheine@hypa.net>"
52
52
  ].freeze
53
53
  DOCUMENTERS = [
54
- 'Cathal Mc Ginley <cathal.alexandria@gnostai.org>',
55
- 'Liam Davison <registrations@liamjdavison.info>'
54
+ "Cathal Mc Ginley <cathal.alexandria@gnostai.org>",
55
+ "Liam Davison <registrations@liamjdavison.info>"
56
56
  ].freeze
57
57
  TRANSLATORS = [
58
- 'Adrián Chaves Fernández <adriyetichaves@gmail.com> (gl)',
59
- 'Cathal Mc Ginley <cathal.alexandria@gnostai.org> (ga)',
60
- 'CHIKAMA Masaki <masaki.chikama@gmail.com> (ja)',
61
- 'Dafydd Harries <daf@muse.19inch.net> (cy)',
62
- 'Damjan Dimitrioski <damjandimitrioski@gmail.com> (mk)',
63
- 'Giacomo Margarito <giacomomargarito@gmail.com> (it)',
64
- 'Jack Myrseh <jack@enkom.no> (nb)',
65
- 'Joachim Breitner <mail@joachim-breitner.de> (de)',
66
- 'José Ling <jlgdot369@gmail.com> (zh_TW)',
67
- 'Lennart Karssen <lennart@karssen.org> (nl)',
68
- 'Lígia Moreira <ligia.moreira@netvisao.pt> (fr, pt, pt_BR)',
69
- 'Martin Karlsson <martinkarlsson81@hotmail.com> (sv)',
70
- 'Michael Kotsarinis <mkotsari1@pre.forthnet.gr> (el)',
71
- 'Miguel Ángel García <magmax@ieee.org> (es)',
72
- 'Peter Kováč <kovac.peter@fotopriestor.sk> (sk)',
73
- 'Petr Vanek <vanous@penguin.cz> (cs)',
74
- 'Piotr Drąg <piotrdrag@gmail.com> (pl)',
75
- 'Serhij Dubyk <dubyk@library.lviv.ua> (uk)'
58
+ "Adrián Chaves Fernández <adriyetichaves@gmail.com> (gl)",
59
+ "Cathal Mc Ginley <cathal.alexandria@gnostai.org> (ga)",
60
+ "CHIKAMA Masaki <masaki.chikama@gmail.com> (ja)",
61
+ "Dafydd Harries <daf@muse.19inch.net> (cy)",
62
+ "Damjan Dimitrioski <damjandimitrioski@gmail.com> (mk)",
63
+ "Giacomo Margarito <giacomomargarito@gmail.com> (it)",
64
+ "Jack Myrseh <jack@enkom.no> (nb)",
65
+ "Joachim Breitner <mail@joachim-breitner.de> (de)",
66
+ "José Ling <jlgdot369@gmail.com> (zh_TW)",
67
+ "Lennart Karssen <lennart@karssen.org> (nl)",
68
+ "Lígia Moreira <ligia.moreira@netvisao.pt> (fr, pt, pt_BR)",
69
+ "Martin Karlsson <martinkarlsson81@hotmail.com> (sv)",
70
+ "Michael Kotsarinis <mkotsari1@pre.forthnet.gr> (el)",
71
+ "Miguel Ángel García <magmax@ieee.org> (es)",
72
+ "Peter Kováč <kovac.peter@fotopriestor.sk> (sk)",
73
+ "Petr Vanek <vanous@penguin.cz> (cs)",
74
+ "Piotr Drąg <piotrdrag@gmail.com> (pl)",
75
+ "Serhij Dubyk <dubyk@library.lviv.ua> (uk)"
76
76
  ].freeze
77
77
  ARTISTS = [
78
- 'Andreas Nilsson <nisses.mail@home.se>',
79
- 'Stefanie Dijoux <stefanie.dijoux@gmail.com>'
78
+ "Andreas Nilsson <nisses.mail@home.se>",
79
+ "Stefanie Dijoux <stefanie.dijoux@gmail.com>"
80
80
  ].freeze
81
- BUGREPORT_URL = 'http://www.github.com/mvz/alexandria-book-collection-manager/issues'
82
- WEBSITE_URL = 'http://www.github.com/mvz/alexandria-book-collection-manager'
81
+ BUGREPORT_URL = "http://www.github.com/mvz/alexandria-book-collection-manager/issues"
82
+ WEBSITE_URL = "http://www.github.com/mvz/alexandria-book-collection-manager"
83
83
  end