alexandria-book-collection-manager 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.reek +3 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +20 -23
- data/.simplecov +3 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +3 -2
- data/INSTALL.rdoc +0 -8
- data/README.md +72 -0
- data/Rakefile +4 -2
- data/TODO.md +26 -0
- data/alexandria-book-collection-manager.gemspec +6 -3
- data/bin/alexandria +1 -6
- data/dogtail/basic_run_test.py +9 -0
- data/lib/alexandria/book_providers.rb +2 -6
- data/lib/alexandria/book_providers/proxis.rb +1 -1
- data/lib/alexandria/book_providers/web.rb +1 -1
- data/lib/alexandria/book_providers/z3950.rb +4 -4
- data/lib/alexandria/export_library.rb +20 -27
- data/lib/alexandria/import_library.rb +7 -5
- data/lib/alexandria/models/book.rb +11 -1
- data/lib/alexandria/models/library.rb +4 -17
- data/lib/alexandria/preferences.rb +5 -5
- data/lib/alexandria/smart_library.rb +2 -8
- data/lib/alexandria/ui/callbacks.rb +1 -1
- data/lib/alexandria/ui/columns.rb +9 -0
- data/lib/alexandria/ui/completion_models.rb +1 -29
- data/lib/alexandria/ui/dialogs/acquire_dialog.rb +2 -3
- data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +1 -2
- data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +3 -2
- data/lib/alexandria/ui/iconview.rb +1 -6
- data/lib/alexandria/ui/libraries_combo.rb +1 -0
- data/lib/alexandria/ui/listview.rb +5 -10
- data/lib/alexandria/ui/main_app.rb +0 -1
- data/lib/alexandria/ui/sidepane.rb +1 -1
- data/lib/alexandria/ui/sound.rb +3 -3
- data/lib/alexandria/ui/ui_manager.rb +5 -13
- data/lib/alexandria/version.rb +2 -2
- data/spec/alexandria/book_providers_spec.rb +0 -17
- data/spec/alexandria/book_spec.rb +23 -0
- data/spec/alexandria/library_spec.rb +26 -0
- data/spec/alexandria/smart_library_spec.rb +11 -1
- data/spec/alexandria/ui/main_app_spec.rb +0 -11
- data/spec/spec_helper.rb +0 -1
- data/tasks/dogtail.rake +4 -0
- data/tasks/spec.rake +3 -3
- metadata +58 -12
- data/TODO +0 -24
- data/spec/alexandria/ui/listview_spec.rb +0 -28
- data/tasks/rdoc.rake +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee9c80a67f5db92fba609abcc676763cea3caa7
|
4
|
+
data.tar.gz: 845f6aada1d8241f8b9401cee1964e0d5a411b7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4f738354ff4521abd4fafb0c70cb6467991083ca2b1d641070c2dbfaa0d516c93e79f98507c8500726447c9d03a284f94e3193b8e9c5d40c5fbd94a11a8f7a
|
7
|
+
data.tar.gz: cbf664f9496c5703da2892f935b93836f6eec3688ffc1f45c6772b28c35f036f4ca1a1744238a2b7f731821b25e9dd4e3bc433a12ed52046cee9ffa2ffaa2c9e
|
data/.gitignore
CHANGED
data/.reek
ADDED
data/.rubocop.yml
CHANGED
@@ -48,6 +48,10 @@ Style/MultilineMethodCallBraceLayout:
|
|
48
48
|
Style/MultilineMethodCallIndentation:
|
49
49
|
EnforcedStyle: indented
|
50
50
|
|
51
|
+
# Not all objects that handle #== 0 also handle #zero?
|
52
|
+
Style/NumericPredicate:
|
53
|
+
Enabled: false
|
54
|
+
|
51
55
|
# Sometimes an if statement just looks better than next with a guard clause
|
52
56
|
Style/Next:
|
53
57
|
Enabled: false
|
@@ -75,4 +79,8 @@ Style/TrailingCommaInLiteral:
|
|
75
79
|
Style/WordArray:
|
76
80
|
Enabled: false
|
77
81
|
|
82
|
+
# Not all objects that handle #length also handle #empty?
|
83
|
+
Style/ZeroLengthPredicate:
|
84
|
+
Enabled: false
|
85
|
+
|
78
86
|
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
CHANGED
@@ -1,19 +1,18 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2016-
|
3
|
+
# on 2016-11-01 21:29:40 +0100 using RuboCop version 0.45.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 6
|
10
10
|
Lint/HandleExceptions:
|
11
11
|
Exclude:
|
12
12
|
- 'lib/alexandria/import_library_csv.rb'
|
13
13
|
- 'lib/alexandria/models/library.rb'
|
14
14
|
- 'lib/alexandria/ui/dialogs/book_properties_dialog.rb'
|
15
15
|
- 'lib/alexandria/ui/dialogs/import_dialog.rb'
|
16
|
-
- 'lib/alexandria/ui/sound.rb'
|
17
16
|
|
18
17
|
# Offense count: 2
|
19
18
|
Lint/IneffectiveAccessModifier:
|
@@ -37,30 +36,35 @@ Lint/UselessAccessModifier:
|
|
37
36
|
Exclude:
|
38
37
|
- 'lib/alexandria/logging.rb'
|
39
38
|
|
40
|
-
# Offense count:
|
39
|
+
# Offense count: 172
|
41
40
|
Metrics/AbcSize:
|
42
|
-
Max:
|
41
|
+
Max: 161
|
42
|
+
|
43
|
+
# Offense count: 21
|
44
|
+
# Configuration parameters: CountComments.
|
45
|
+
Metrics/BlockLength:
|
46
|
+
Max: 68
|
43
47
|
|
44
48
|
# Offense count: 14
|
45
49
|
Metrics/BlockNesting:
|
46
50
|
Max: 5
|
47
51
|
|
48
|
-
# Offense count:
|
52
|
+
# Offense count: 33
|
49
53
|
# Configuration parameters: CountComments.
|
50
54
|
Metrics/ClassLength:
|
51
|
-
Max:
|
55
|
+
Max: 994
|
52
56
|
|
53
|
-
# Offense count:
|
57
|
+
# Offense count: 75
|
54
58
|
Metrics/CyclomaticComplexity:
|
55
59
|
Max: 28
|
56
60
|
|
57
|
-
# Offense count:
|
58
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
61
|
+
# Offense count: 353
|
62
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
|
59
63
|
# URISchemes: http, https
|
60
64
|
Metrics/LineLength:
|
61
|
-
Max:
|
65
|
+
Max: 294
|
62
66
|
|
63
|
-
# Offense count:
|
67
|
+
# Offense count: 228
|
64
68
|
# Configuration parameters: CountComments.
|
65
69
|
Metrics/MethodLength:
|
66
70
|
Max: 113
|
@@ -75,7 +79,7 @@ Metrics/ModuleLength:
|
|
75
79
|
Metrics/ParameterLists:
|
76
80
|
Max: 7
|
77
81
|
|
78
|
-
# Offense count:
|
82
|
+
# Offense count: 74
|
79
83
|
Metrics/PerceivedComplexity:
|
80
84
|
Max: 29
|
81
85
|
|
@@ -108,7 +112,7 @@ Style/ClassVars:
|
|
108
112
|
- 'lib/alexandria/ui/dialogs/book_properties_dialog_base.rb'
|
109
113
|
- 'lib/alexandria/ui/dialogs/new_book_dialog.rb'
|
110
114
|
|
111
|
-
# Offense count:
|
115
|
+
# Offense count: 121
|
112
116
|
Style/Documentation:
|
113
117
|
Enabled: false
|
114
118
|
|
@@ -142,13 +146,7 @@ Style/FormatString:
|
|
142
146
|
- 'lib/alexandria/ui/listview.rb'
|
143
147
|
- 'lib/alexandria/ui/ui_manager.rb'
|
144
148
|
|
145
|
-
# Offense count:
|
146
|
-
# Configuration parameters: AllowedVariables.
|
147
|
-
Style/GlobalVars:
|
148
|
-
Exclude:
|
149
|
-
- 'lib/alexandria/export_library.rb'
|
150
|
-
|
151
|
-
# Offense count: 36
|
149
|
+
# Offense count: 34
|
152
150
|
# Configuration parameters: MinBodyLength.
|
153
151
|
Style/GuardClause:
|
154
152
|
Enabled: false
|
@@ -185,10 +183,9 @@ Style/MultilineTernaryOperator:
|
|
185
183
|
Exclude:
|
186
184
|
- 'lib/alexandria/ui/listview.rb'
|
187
185
|
|
188
|
-
# Offense count:
|
186
|
+
# Offense count: 1
|
189
187
|
Style/NestedTernaryOperator:
|
190
188
|
Exclude:
|
191
|
-
- 'lib/alexandria/ui/completion_models.rb'
|
192
189
|
- 'lib/alexandria/ui/ui_manager.rb'
|
193
190
|
|
194
191
|
# Offense count: 8
|
data/.simplecov
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- INSTALL.rdoc
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/INSTALL.rdoc
CHANGED
@@ -65,8 +65,6 @@ Note that these files are pre-generated in tar.gz releases, so you'll
|
|
65
65
|
only need them if you're building from the SVN version, or want to
|
66
66
|
change the translations.
|
67
67
|
|
68
|
-
== Optional Dependencies
|
69
|
-
|
70
68
|
=== Ruby/ZOOM and Yaz
|
71
69
|
|
72
70
|
For Z39.50 support and and the <b>Library of Congress</b> and
|
@@ -88,12 +86,6 @@ You will need
|
|
88
86
|
<tt>image_size</tt>[http://rubyforge.org/projects/imagesize/] for
|
89
87
|
optimizing the cover images in exported libraries.
|
90
88
|
|
91
|
-
=== Revolution
|
92
|
-
|
93
|
-
If you want to auto-complete the names of people you loan books to
|
94
|
-
from your Evolution contacts database, you can install
|
95
|
-
+revolution+[ http://revolution.rubyforge.org/].
|
96
|
-
|
97
89
|
== Build and Install
|
98
90
|
|
99
91
|
To build Alexandria from a subversion checkout, go to the base project
|
data/README.md
CHANGED
@@ -86,3 +86,75 @@ or, to get verbose debugging information,
|
|
86
86
|
|
87
87
|
If you are running GNOME, Alexandria should appear under the
|
88
88
|
'Applications > Office' menu.
|
89
|
+
|
90
|
+
## Contributors
|
91
|
+
|
92
|
+
The following people have contributed to Alexandria over the years:
|
93
|
+
|
94
|
+
### Authors
|
95
|
+
|
96
|
+
* Alexander McCormmach <alexander@tunicate.org>
|
97
|
+
* Aymeric Nys <aymeric@nnx.com>
|
98
|
+
* Cathal Mc Ginley <cathal.alexandria@gnostai.org>
|
99
|
+
* Claudio Belotti <bel8@lilik.it>
|
100
|
+
* Constantine Evans <cevans@costinet.org>
|
101
|
+
* Dafydd Harries <daf@muse.19inch.net>
|
102
|
+
* Javier Fernandez-Sanguino Pena <jfs@debian.org>
|
103
|
+
* Joseph Method <tristil@gmail.com>
|
104
|
+
* Kevin Schultz <schultkl@ieee.org>
|
105
|
+
* Laurent Sansonetti <lrz@gnome.org>
|
106
|
+
* Marco Costantini <costanti@science.unitn.it>
|
107
|
+
* Mathieu Leduc-Hamel <arrak@arrak.org>
|
108
|
+
* Matijs van Zuijlen <matijs@matijs.net>
|
109
|
+
* Owain Evans <o.evans@gmail.com>
|
110
|
+
* Pascal Terjan <pterjan@linuxfr.org>
|
111
|
+
* Rene Samselnig <sandman@sdm-net.org>
|
112
|
+
* Robby Stephenson <robby@periapsis.org>
|
113
|
+
* Sun Ning <classicning@gmail.com>
|
114
|
+
* Takayuki Kusano <AE5T-KSN@asahi-net.or.jp>
|
115
|
+
* Timothy Malone <timothy.malone@gmail.com>
|
116
|
+
* Zachary P. Landau <kapheine@hypa.net>
|
117
|
+
|
118
|
+
### Documenters
|
119
|
+
|
120
|
+
* Cathal Mc Ginley <cathal.alexandria@gnostai.org>
|
121
|
+
* Liam Davison <registrations@liamjdavison.info>
|
122
|
+
|
123
|
+
### Translators
|
124
|
+
|
125
|
+
* Adrián Chaves Fernández <adriyetichaves@gmail.com> (gl)
|
126
|
+
* Cathal Mc Ginley <cathal.alexandria@gnostai.org> (ga)
|
127
|
+
* CHIKAMA Masaki <masaki.chikama@gmail.com> (ja)
|
128
|
+
* Dafydd Harries <daf@muse.19inch.net> (cy)
|
129
|
+
* Damjan Dimitrioski <damjandimitrioski@gmail.com> (mk)
|
130
|
+
* Giacomo Margarito <giacomomargarito@gmail.com> (it)
|
131
|
+
* Jack Myrseh <jack@enkom.no> (nb)
|
132
|
+
* Joachim Breitner <mail@joachim-breitner.de> (de)
|
133
|
+
* José Ling <jlgdot369@gmail.com> (zh_TW)
|
134
|
+
* Lennart Karssen <lennart@karssen.org> (nl)
|
135
|
+
* Lígia Moreira <ligia.moreira@netvisao.pt> (fr, pt, pt_BR)
|
136
|
+
* Martin Karlsson <martinkarlsson81@hotmail.com> (sv)
|
137
|
+
* Michael Kotsarinis <mkotsari1@pre.forthnet.gr> (el)
|
138
|
+
* Miguel Ángel García <magmax@ieee.org> (es)
|
139
|
+
* Peter Kováč <kovac.peter@fotopriestor.sk> (sk)
|
140
|
+
* Petr Vanek <vanous@penguin.cz> (cs)
|
141
|
+
* Piotr Drąg <piotrdrag@gmail.com> (pl)
|
142
|
+
* Serhij Dubyk <dubyk@library.lviv.ua> (uk)
|
143
|
+
|
144
|
+
### Artists
|
145
|
+
|
146
|
+
* Andreas Nilsson <nisses.mail@home.se>
|
147
|
+
* Stefanie Dijoux <stefanie.dijoux@gmail.com>
|
148
|
+
|
149
|
+
## License
|
150
|
+
|
151
|
+
Unless otherwise noted, the following license applies to all files that are
|
152
|
+
part of Alexandria:
|
153
|
+
|
154
|
+
Copyright (C) 2004-2006 Laurent Sansonetti
|
155
|
+
Copyright (C) 2007-2010,2014-2016 Alexandria Contributors
|
156
|
+
|
157
|
+
Alexandria is free software; you can redistribute it and/or modify it under the
|
158
|
+
terms of the GNU General Public License as published by the Free Software
|
159
|
+
Foundation; either version 2 of the License, or (at your option) any later
|
160
|
+
version. See the file COPYING for details.
|
data/Rakefile
CHANGED
@@ -85,7 +85,7 @@ task debian_install: :install_package_staging
|
|
85
85
|
FileInstallTask.new(:package) do |j|
|
86
86
|
install_common(j)
|
87
87
|
|
88
|
-
docs = %w(README.rdoc NEWS INSTALL.rdoc COPYING TODO)
|
88
|
+
docs = %w(README.rdoc NEWS INSTALL.rdoc COPYING TODO.md)
|
89
89
|
devel_docs = ['doc/AUTHORS', 'doc/BUGS', 'doc/FAQ',
|
90
90
|
'doc/cuecat_support.rdoc']
|
91
91
|
j.install('', docs, "#{SHARE}/doc/#{PROJECT}")
|
@@ -215,7 +215,7 @@ Rake::PackageTask.new(PROJECT, Alexandria::DISPLAY_VERSION) do |p|
|
|
215
215
|
p.need_tar_gz = true
|
216
216
|
p.package_files.include('README*', 'COPYING', 'CHANGELOG.md', 'INSTALL.rdoc',
|
217
217
|
'NEWS', 'Rakefile', 'util/**/*',
|
218
|
-
'TODO', 'alexandria.desktop',
|
218
|
+
'TODO.md', 'alexandria.desktop',
|
219
219
|
'alexandria.desktop.in',
|
220
220
|
'bin/**/*', 'data/**/*', 'misc/**/*',
|
221
221
|
'doc/**/*', 'lib/**/*', 'po/**/*',
|
@@ -261,3 +261,5 @@ task install: [:pre_install, :install_package, :post_install]
|
|
261
261
|
|
262
262
|
desc 'Uninstall Alexandria'
|
263
263
|
task uninstall: [:uninstall_package] # TODO: gconf etc...
|
264
|
+
|
265
|
+
task default: [:spec, :dogtail]
|
data/TODO.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Alexandria's TODO list
|
2
|
+
======================
|
3
|
+
|
4
|
+
This is an old list of TODO's.
|
5
|
+
|
6
|
+
For the next release:
|
7
|
+
|
8
|
+
* [x] Drag-and-drop books within libraries
|
9
|
+
* [x] Infinite Undo/Redo
|
10
|
+
* [x] Smart libraries
|
11
|
+
* [x] CueCat userland support
|
12
|
+
* [ ] Threading of all operations
|
13
|
+
|
14
|
+
Future releases:
|
15
|
+
|
16
|
+
* [ ] Sort providers meaningfully according to the current locale
|
17
|
+
* [ ] ONIX import
|
18
|
+
* [ ] Import/export via GNOME-DB
|
19
|
+
* [ ] Zoom in the current view, giving more or less details
|
20
|
+
* [ ] PDA support
|
21
|
+
* [ ] Win32 MinGW port
|
22
|
+
* [ ] Show more details about books, like number of pages, price, topic, a user
|
23
|
+
defined field
|
24
|
+
* [ ] Printing
|
25
|
+
* [ ] Editable views; for icons, renaming their title, for list, editing each
|
26
|
+
field
|
@@ -46,12 +46,15 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.add_runtime_dependency('gettext', ['~> 3.1'])
|
47
47
|
s.add_runtime_dependency('hpricot', ['~> 0.8.5'])
|
48
48
|
s.add_runtime_dependency('htmlentities', ['~> 4.3'])
|
49
|
-
s.add_runtime_dependency('gtk3', ['~> 3.0
|
50
|
-
s.add_runtime_dependency('gio2', ['~> 3.0
|
49
|
+
s.add_runtime_dependency('gtk3', ['~> 3.1.0'])
|
50
|
+
s.add_runtime_dependency('gio2', ['~> 3.1.0'])
|
51
51
|
s.add_runtime_dependency('gstreamer', ['~> 3.0'])
|
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'])
|
52
55
|
|
53
56
|
s.add_development_dependency('minitest', ['~> 5.0'])
|
54
|
-
s.add_development_dependency('rake', ['~>
|
57
|
+
s.add_development_dependency('rake', ['~> 12.0'])
|
55
58
|
s.add_development_dependency('rspec', ['~> 3.0'])
|
56
59
|
|
57
60
|
s.require_paths = ['lib']
|
data/bin/alexandria
CHANGED
@@ -20,12 +20,7 @@
|
|
20
20
|
# write to the Free Software Foundation, Inc., 51 Franklin Street,
|
21
21
|
# Fifth Floor, Boston, MA 02110-1301 USA.
|
22
22
|
|
23
|
-
|
24
|
-
require 'gettext'
|
25
|
-
rescue LoadError
|
26
|
-
require 'rubygems'
|
27
|
-
require 'gettext'
|
28
|
-
end
|
23
|
+
require 'gettext'
|
29
24
|
require 'alexandria'
|
30
25
|
require 'optparse'
|
31
26
|
require 'ostruct'
|
@@ -307,12 +307,8 @@ module Alexandria
|
|
307
307
|
require 'alexandria/book_providers/thalia'
|
308
308
|
require 'alexandria/book_providers/worldcat'
|
309
309
|
|
310
|
-
#
|
311
|
-
|
312
|
-
require 'alexandria/book_providers/z3950'
|
313
|
-
rescue LoadError
|
314
|
-
log.info { "Can't load Ruby/ZOOM, hence Z39.50 and providers Library of Congress, British Library not available" }
|
315
|
-
end
|
310
|
+
# Z39.50 based providers
|
311
|
+
require 'alexandria/book_providers/z3950'
|
316
312
|
|
317
313
|
attr_reader :abstract_classes
|
318
314
|
|
@@ -59,7 +59,7 @@ module Alexandria
|
|
59
59
|
conn_count = type == SEARCH_BY_ISBN ? 1 : 10 # results to retrieve
|
60
60
|
resultset = search_records(criterion, type, conn_count)
|
61
61
|
log.debug { "total #{resultset.length}" }
|
62
|
-
raise NoResultsError if resultset.
|
62
|
+
raise NoResultsError if resultset.length == 0
|
63
63
|
results = books_from_marc(resultset, isbn)
|
64
64
|
type == SEARCH_BY_ISBN ? results.first : results
|
65
65
|
end
|
@@ -214,7 +214,7 @@ module Alexandria
|
|
214
214
|
prefs.variable_named('port').default_value = 7090
|
215
215
|
prefs.variable_named('database').default_value = 'Voyager'
|
216
216
|
prefs.variable_named('record_syntax').default_value = 'USMARC'
|
217
|
-
prefs.variable_named('charset').default_value = '
|
217
|
+
prefs.variable_named('charset').default_value = 'ISO-8859-1'
|
218
218
|
prefs.read
|
219
219
|
end
|
220
220
|
|
@@ -257,7 +257,7 @@ module Alexandria
|
|
257
257
|
conn_count = type == SEARCH_BY_ISBN ? 1 : 10 # results to retrieve
|
258
258
|
resultset = search_records(criterion, type, conn_count)
|
259
259
|
log.debug { "total #{resultset.length}" }
|
260
|
-
raise NoResultsError if resultset.
|
260
|
+
raise NoResultsError if resultset.length == 0
|
261
261
|
results = books_from_sutrs(resultset)
|
262
262
|
type == SEARCH_BY_ISBN ? results.first : results
|
263
263
|
end
|
@@ -340,7 +340,7 @@ module Alexandria
|
|
340
340
|
criterion = canonicalise_isbn_with_dashes(criterion)
|
341
341
|
resultset = search_records(criterion, type, 0)
|
342
342
|
log.debug { "total #{resultset.length}" }
|
343
|
-
raise NoResultsError if resultset.
|
343
|
+
raise NoResultsError if resultset.length == 0
|
344
344
|
results = books_from_marc(resultset, isbn)
|
345
345
|
type == SEARCH_BY_ISBN ? results.first : results
|
346
346
|
end
|