alexandria-book-collection-manager 0.7.3 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) 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 +4 -1
  5. data/.rubocop.yml +86 -36
  6. data/.rubocop_todo.yml +58 -161
  7. data/.simplecov +5 -2
  8. data/CHANGELOG.md +56 -2
  9. data/Gemfile +4 -3
  10. data/INSTALL.md +23 -11
  11. data/README.md +52 -41
  12. data/Rakefile +78 -75
  13. data/alexandria-book-collection-manager.gemspec +50 -44
  14. data/bin/alexandria +12 -22
  15. data/doc/FAQ +1 -2
  16. data/doc/dependency_decisions.yml +27 -8
  17. data/lib/alexandria.rb +25 -23
  18. data/lib/alexandria/about.rb +50 -50
  19. data/lib/alexandria/book_providers.rb +86 -91
  20. data/lib/alexandria/book_providers/adlibris.rb +37 -74
  21. data/lib/alexandria/book_providers/amazon_aws.rb +94 -100
  22. data/lib/alexandria/book_providers/amazon_ecs_util.rb +289 -324
  23. data/lib/alexandria/book_providers/barnes_and_noble.rb +42 -42
  24. data/lib/alexandria/book_providers/douban.rb +25 -41
  25. data/lib/alexandria/book_providers/proxis.rb +34 -29
  26. data/lib/alexandria/book_providers/pseudomarc.rb +77 -85
  27. data/lib/alexandria/book_providers/siciliano.rb +60 -64
  28. data/lib/alexandria/book_providers/thalia_provider.rb +161 -0
  29. data/lib/alexandria/book_providers/web.rb +5 -5
  30. data/lib/alexandria/book_providers/worldcat.rb +66 -95
  31. data/lib/alexandria/book_providers/z3950.rb +153 -169
  32. data/lib/alexandria/config.rb +1 -1
  33. data/lib/alexandria/console.rb +3 -3
  34. data/lib/alexandria/default_preferences.rb +37 -0
  35. data/lib/alexandria/execution_queue.rb +13 -12
  36. data/lib/alexandria/export_format.rb +8 -8
  37. data/lib/alexandria/export_library.rb +128 -127
  38. data/lib/alexandria/import_library.rb +102 -126
  39. data/lib/alexandria/import_library_csv.rb +41 -41
  40. data/lib/alexandria/library_collection.rb +6 -5
  41. data/lib/alexandria/library_sort_order.rb +4 -2
  42. data/lib/alexandria/library_store.rb +39 -28
  43. data/lib/alexandria/logging.rb +10 -14
  44. data/lib/alexandria/models/book.rb +5 -4
  45. data/lib/alexandria/models/library.rb +63 -53
  46. data/lib/alexandria/net.rb +5 -6
  47. data/lib/alexandria/preferences.rb +66 -63
  48. data/lib/alexandria/scanners.rb +2 -2
  49. data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +17 -17
  50. data/lib/alexandria/scanners/keyboard.rb +8 -8
  51. data/lib/alexandria/smart_library.rb +110 -112
  52. data/lib/alexandria/ui.rb +15 -15
  53. data/lib/alexandria/ui/{dialogs/about_dialog.rb → about_dialog.rb} +2 -2
  54. data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +108 -109
  55. data/lib/alexandria/ui/alert_dialog.rb +66 -0
  56. data/lib/alexandria/ui/{dialogs/bad_isbns_dialog.rb → bad_isbns_dialog.rb} +13 -9
  57. data/lib/alexandria/ui/{dialogs/barcode_animation.rb → barcode_animation.rb} +16 -15
  58. data/lib/alexandria/ui/{dialogs/book_properties_dialog.rb → book_properties_dialog.rb} +25 -38
  59. data/lib/alexandria/ui/{dialogs/book_properties_dialog_base.rb → book_properties_dialog_base.rb} +64 -157
  60. data/lib/alexandria/ui/builder_base.rb +1 -1
  61. data/lib/alexandria/ui/calendar_popup.rb +58 -0
  62. data/lib/alexandria/ui/callbacks.rb +187 -155
  63. data/lib/alexandria/ui/completion_models.rb +8 -22
  64. data/lib/alexandria/ui/confirm_erase_dialog.rb +33 -0
  65. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +34 -0
  66. data/lib/alexandria/ui/dndable.rb +7 -7
  67. data/lib/alexandria/ui/error_dialog.rb +25 -0
  68. data/lib/alexandria/ui/{dialogs/export_dialog.rb → export_dialog.rb} +37 -58
  69. data/lib/alexandria/ui/icons.rb +38 -43
  70. data/lib/alexandria/ui/iconview.rb +12 -10
  71. data/lib/alexandria/ui/iconview_tooltips.rb +41 -54
  72. data/lib/alexandria/ui/import_dialog.rb +157 -0
  73. data/lib/alexandria/ui/init.rb +30 -41
  74. data/lib/alexandria/ui/{dialogs/keep_bad_isbn_dialog.rb → keep_bad_isbn_dialog.rb} +9 -6
  75. data/lib/alexandria/ui/libraries_combo.rb +15 -14
  76. data/lib/alexandria/ui/listview.rb +69 -67
  77. data/lib/alexandria/ui/main_app.rb +24 -26
  78. data/lib/alexandria/ui/misc_dialogs.rb +10 -0
  79. data/lib/alexandria/ui/multi_drag_treeview.rb +8 -9
  80. data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +113 -114
  81. data/lib/alexandria/ui/{dialogs/new_book_dialog_manual.rb → new_book_dialog_manual.rb} +22 -19
  82. data/lib/alexandria/ui/new_provider_dialog.rb +100 -0
  83. data/lib/alexandria/ui/new_smart_library_dialog.rb +74 -0
  84. data/lib/alexandria/ui/preferences_dialog.rb +313 -0
  85. data/lib/alexandria/ui/provider_preferences_base_dialog.rb +95 -0
  86. data/lib/alexandria/ui/provider_preferences_dialog.rb +35 -0
  87. data/lib/alexandria/ui/{dialogs/misc_dialogs.rb → really_delete_dialog.rb} +7 -28
  88. data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +53 -48
  89. data/lib/alexandria/ui/skip_entry_dialog.rb +33 -0
  90. data/lib/alexandria/ui/smart_library_properties_dialog.rb +60 -0
  91. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +242 -0
  92. data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
  93. data/lib/alexandria/ui/sound.rb +11 -13
  94. data/lib/alexandria/ui/ui_manager.rb +216 -200
  95. data/lib/alexandria/version.rb +4 -19
  96. data/lib/alexandria/web_themes.rb +21 -21
  97. data/po/Makefile +2 -2
  98. data/po/cs.po +992 -875
  99. data/po/cy.po +961 -874
  100. data/po/de.po +990 -865
  101. data/po/el.po +989 -865
  102. data/po/es.po +985 -861
  103. data/po/fr.po +987 -867
  104. data/po/ga.po +908 -820
  105. data/po/gl.po +980 -860
  106. data/po/it.po +986 -864
  107. data/po/ja.po +969 -849
  108. data/po/mk.po +984 -860
  109. data/po/nb.po +979 -859
  110. data/po/nl.po +983 -860
  111. data/po/pl.po +1018 -971
  112. data/po/pt.po +988 -857
  113. data/po/pt_BR.po +983 -863
  114. data/po/ru.po +994 -871
  115. data/po/sk.po +989 -867
  116. data/po/sv.po +976 -856
  117. data/po/uk.po +972 -858
  118. data/po/zh_TW.po +974 -854
  119. data/schemas/alexandria.schemas +24 -2
  120. data/share/alexandria/glade/acquire_dialog__builder.glade +1 -1
  121. data/share/alexandria/glade/book_properties_dialog__builder.glade +1 -1
  122. data/share/alexandria/glade/main_app__builder.glade +6 -21
  123. data/share/alexandria/glade/new_book_dialog__builder.glade +1 -1
  124. data/share/alexandria/glade/preferences_dialog__builder.glade +1 -1
  125. data/share/gnome/help/alexandria/C/introduction.xml +0 -4
  126. data/share/gnome/help/alexandria/C/searching.xml +1 -1
  127. data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
  128. data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
  129. data/share/gnome/help/alexandria/fr/alexandria.xml +1 -1
  130. data/share/gnome/help/alexandria/ja/introduction.xml +0 -4
  131. data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
  132. data/spec/alexandria/book_providers/thalia_provider_spec.rb +119 -0
  133. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
  134. data/spec/alexandria/book_providers_spec.rb +62 -156
  135. data/spec/alexandria/book_spec.rb +12 -10
  136. data/spec/alexandria/console_spec.rb +6 -11
  137. data/spec/alexandria/export_library_spec.rb +47 -58
  138. data/spec/alexandria/library_spec.rb +121 -109
  139. data/spec/alexandria/library_store_spec.rb +8 -8
  140. data/spec/alexandria/preferences_spec.rb +44 -17
  141. data/spec/alexandria/scanners/cue_cat_spec.rb +52 -0
  142. data/spec/alexandria/smart_library_spec.rb +15 -15
  143. data/spec/alexandria/ui/about_dialog_spec.rb +14 -0
  144. data/spec/alexandria/ui/acquire_dialog_spec.rb +14 -0
  145. data/spec/alexandria/ui/alert_dialog_spec.rb +16 -0
  146. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +14 -0
  147. data/spec/alexandria/ui/book_properties_dialog_spec.rb +59 -0
  148. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +14 -0
  149. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +16 -0
  150. data/spec/alexandria/ui/error_dialog_spec.rb +14 -0
  151. data/spec/alexandria/ui/export_dialog_spec.rb +36 -0
  152. data/spec/alexandria/ui/icons_spec.rb +26 -0
  153. data/spec/alexandria/ui/iconview_spec.rb +7 -21
  154. data/spec/alexandria/ui/import_dialog_spec.rb +46 -0
  155. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +17 -0
  156. data/spec/alexandria/ui/main_app_spec.rb +7 -34
  157. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +51 -0
  158. data/spec/alexandria/ui/{dialogs/new_book_dialog_spec.rb → new_book_dialog_spec.rb} +4 -4
  159. data/spec/alexandria/ui/new_provider_dialog_spec.rb +30 -0
  160. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +39 -0
  161. data/spec/alexandria/ui/preferences_dialog_spec.rb +14 -0
  162. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +34 -0
  163. data/spec/alexandria/ui/really_delete_dialog_spec.rb +16 -0
  164. data/spec/alexandria/ui/sidepane_manager_spec.rb +15 -0
  165. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +14 -0
  166. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +49 -0
  167. data/spec/alexandria/ui/sound_spec.rb +2 -2
  168. data/spec/alexandria/ui/ui_manager_spec.rb +44 -20
  169. data/spec/end_to_end/basic_run_spec.rb +21 -38
  170. data/spec/fixtures/cover.jpg +0 -0
  171. data/spec/spec_helper.rb +54 -10
  172. data/tasks/setup.rb +2 -2
  173. data/tasks/spec.rake +11 -11
  174. data/util/rake/fileinstall.rb +38 -35
  175. data/util/rake/gettextgenerate.rb +7 -7
  176. data/util/rake/omfgenerate.rb +7 -7
  177. metadata +158 -45
  178. data/dogtail/basic_run_test.py +0 -9
  179. data/lib/alexandria/book_providers/renaud.rb +0 -155
  180. data/lib/alexandria/book_providers/thalia.rb +0 -198
  181. data/lib/alexandria/ui/dialogs/alert_dialog.rb +0 -63
  182. data/lib/alexandria/ui/dialogs/import_dialog.rb +0 -176
  183. data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +0 -62
  184. data/lib/alexandria/ui/dialogs/preferences_dialog.rb +0 -563
  185. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +0 -61
  186. data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +0 -423
  187. data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
  188. data/spec/alexandria/ui/dialogs_spec.rb +0 -162
  189. data/spec/alexandria/ui/sidepane_spec.rb +0 -29
  190. data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
  191. data/spec/alexandria/utilities_spec.rb +0 -52
  192. data/tasks/dogtail.rake +0 -6
data/.simplecov CHANGED
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  SimpleCov.start do
2
- track_files 'lib/**/*.rb'
3
- add_filter '/spec/'
4
+ add_group "Main", "lib"
5
+ add_group "Specs", "spec"
6
+ enable_coverage :branch
4
7
  end
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.8 / 2020-11-29
4
+
5
+ * Fix ThaliaProvider
6
+ * Avoid warnings for calendar popup
7
+ * Make Rename menu item work
8
+ * Fix crash when changing covers
9
+ * Make alerts show alert details if available
10
+
11
+ ## 0.7.7 / 2020-11-15
12
+
13
+ * Update Polish translation ([#88] by [Piotr Drąg][piotrdrag])
14
+ * Fix hiding of progress bar of import dialog
15
+ * Fix calendar popups in Smart Library and Book Properties dialogs
16
+ * Fix crashes when activating Export and Import menu items
17
+
18
+ ## 0.7.6 / 2020-11-01
19
+
20
+ * Make more strings translatable with help from rubocop-i18n
21
+ * Code quality and testing infrastructure improvements
22
+ * Update Polish translation ([#51] and [#64], by [Piotr Drąg][piotrdrag])
23
+ * Update Dutch translation
24
+ * Make several dialogs that stopped appearing appear again
25
+ * Remove ability to enable and disable providers through a pop-up menu
26
+ * Fix New Library functionality
27
+ * Update dependencies on gtk3, gstreamer, and psych
28
+ * Fix issues in preferences, smart library dialog, and book selection
29
+ * Improve installation instructions
30
+ * Improve README ([#83] by [Happy][HappyFacade])
31
+
32
+ ## 0.7.5 / 2020-05-11
33
+
34
+ * Avoid crash when opening Import dialog
35
+ * Avoid crash during export
36
+ * Add support for Ruby 2.7
37
+ * Drop support for Ruby 2.4
38
+ * Remove broken Renaud provider
39
+
40
+ ## 0.7.4 / 2019-10-24
41
+
42
+ * Drop support for Ruby 2.3
43
+ * Avoid passing nil to Gtk method #visible=, which expects a boolean
44
+ ([#22], by [Joseph Haig][jrmhaig])
45
+ * Update dependencies on gtk3 and gstreamer to 3.4.1
46
+ * Fix WorldCat provider to use https
47
+
3
48
  ## 0.7.3 / 2019-02-27
4
49
 
5
50
  * Remove DeaStore provider since the site is no longer online
@@ -64,6 +109,15 @@
64
109
  Amazon's Product Advertising API. Thanks to Stephen McCamant for
65
110
  providing the patch.
66
111
 
67
- <!-- references -->
68
-
112
+ <!-- contributors -->
113
+ [jrmhaig]: https://github.com/jrmhaig
114
+ [piotrdrag]: https://github.com/piotrdrag
115
+ [HappyFacade]: https://github.com/HappyFacade
116
+
117
+ <!-- issues and pull requests -->
118
+ [#88]: https://github.com/mvz/alexandria-book-collection-manager/pull/88
119
+ [#83]: https://github.com/mvz/alexandria-book-collection-manager/pull/83
120
+ [#64]: https://github.com/mvz/alexandria-book-collection-manager/pull/64
121
+ [#51]: https://github.com/mvz/alexandria-book-collection-manager/pull/51
122
+ [#23]: https://github.com/mvz/alexandria-book-collection-manager/pull/23
69
123
  [#19]: https://github.com/mvz/alexandria-book-collection-manager/issues/19
data/Gemfile CHANGED
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # The gem's dependencies are specified in the gemspec
6
6
  gemspec
7
7
 
8
8
  group :development, :test do
9
- gem 'simplecov'
10
- gem 'yard', '~> 0.9.5'
9
+ gem "pry"
10
+ gem "simplecov"
11
+ gem "yard", "~> 0.9.5"
11
12
  end
data/INSTALL.md CHANGED
@@ -56,23 +56,35 @@ to merge translations into generated files (and to extract
56
56
  translatable string from xml files during development).
57
57
 
58
58
  Note that these files are pre-generated in tar.gz releases, so you'll
59
- only need them if you're building from the SVN version, or want to
59
+ only need them if you're building from the Git version, or want to
60
60
  change the translations.
61
61
 
62
+ For support of the Z38.50 protocol you will need the
63
+ [`yaz`](http://www.indexdata.dk/yaz) package.
64
+
65
+ Alexandria also uses the outdate gconf2 configuration storage system, so you'll
66
+ need to install `gconf2`.
67
+
68
+ On Debian/Ubuntu systems, you can install the needed dependencies by running
69
+
70
+ ```
71
+ apt-get install gettext intltool libyaz-dev gconf2
72
+ ```
73
+
62
74
  ### Ruby/ZOOM and Yaz
63
75
 
64
- For Z39.50 support and and the *Library of Congress* and
65
- *British Library* book providers you will need
66
- [`ruby-zoom`](http://ruby-zoom.rubyforge.org), which in turn
67
- requires the non-Ruby package [`yaz`](http://www.indexdata.dk/yaz).
76
+ For Z39.50 support and the *Library of Congress* and *British Library* book
77
+ providers you will need [`ruby-zoom`](http://ruby-zoom.rubyforge.org), which in
78
+ turn requires the non-Ruby package [`yaz`](http://www.indexdata.dk/yaz) (see
79
+ Native Dependencies above).
68
80
 
69
- Note that if you install the recent Ruby/ZOOM as the `zoom` gem, you
70
- will also need to install the `marc` gem. (Older implementations of
71
- ruby-zoom contained their own implementation of MARC.)
81
+ Note that if you install the recent Ruby/ZOOM as the `zoom` gem, you will also
82
+ need to install the `marc` gem. (Older implementations of ruby-zoom contained
83
+ their own implementation of MARC.)
72
84
 
73
- The Z39.50 Object-Orientation Model (ZOOM) is an international
74
- standard for communication between computer systems, particularly
75
- libraries and information-related systems.
85
+ The Z39.50 Object-Orientation Model (ZOOM) is an international standard for
86
+ communication between computer systems, particularly libraries and
87
+ information-related systems.
76
88
 
77
89
  ### image_size
78
90
 
data/README.md CHANGED
@@ -4,7 +4,7 @@ Alexandria is a GNOME application for managing collections of books.
4
4
 
5
5
  Alexandria is written in Ruby, and is free software, distributed under
6
6
  the terms of the GNU General Public License, version 2 or later. See
7
- the file COPYING for more information.
7
+ the file [COPYING](COPYING) for more information.
8
8
 
9
9
  What is Alexandria?
10
10
  ===================
@@ -39,49 +39,50 @@ Alexandria is a simple program designed to allow individuals to keep a
39
39
  catalogue of their book collection. In addition, it enables users to
40
40
  keep track of books which are on loan.
41
41
 
42
- * retrieves and displays book information (sometimes with cover
43
- pictures) from several online libraries and bookshops, such as
44
- o Amazon
45
- o Proxis
46
- o AdLibris
47
- o Spanish Ministry of Culture
48
- o Livraria Siciliano
49
- o WorldCat
50
- o US Library of Congress
51
- o British Library
52
- * allows books to be added and updated by hand
53
- * enables searches either by ISBN, title, author or keyword
54
- * supports the Z39.50 standard and allow you to manage your own
55
- sources (e.g. university libraries)
56
- * saves data using the plain-text YAML format
57
- * can import and export data into ONIX, Tellico, ISBN-list
58
- and GoodReads CSV formats
59
- * can export XHTML web pages of your libraries, themable with CSS
60
- * allows marking your books as loaned, each with the loan-date and
61
- the name of the person who has borrowed them
62
- * features a HIG-compliant user interface
63
- * shows books in different views (standard list or icons list),
64
- that can be filtered and/or sorted
65
- * handles book rating and notes
66
- * supports CueCat and standard "keyboard wedge" barcode readers
67
- * includes translations for several languages
68
- * is documented in a complete manual (at the moment only in
69
- English and Japanese)
70
-
71
- Alexandria is not without problems. See doc/BUGS for a summary of issues.
42
+ * retrieves and displays book information (sometimes with cover
43
+ pictures) from several online libraries and bookshops, such as
44
+ - Amazon
45
+ - Proxis
46
+ - AdLibris
47
+ - Spanish Ministry of Culture
48
+ - Livraria Siciliano
49
+ - WorldCat
50
+ - US Library of Congress
51
+ - British Library
52
+ * allows books to be added and updated by hand
53
+ * enables searches either by ISBN, title, author or keyword
54
+ * supports the Z39.50 standard and allow you to manage your own
55
+ sources (e.g. university libraries)
56
+ * saves data using the plain-text YAML format
57
+ * can import and export data into ONIX, Tellico, ISBN-list
58
+ and GoodReads CSV formats
59
+ * can export XHTML web pages of your libraries, themable with CSS
60
+ * allows marking your books as loaned, each with the loan-date and
61
+ the name of the person who has borrowed them
62
+ * features a HIG-compliant user interface
63
+ * shows books in different views (standard list or icons list),
64
+ that can be filtered and/or sorted
65
+ * handles book rating and notes
66
+ * supports CueCat and standard "keyboard wedge" barcode readers
67
+ * includes translations for several languages
68
+ * is documented in a complete manual (at the moment only in
69
+ English and Japanese)
70
+
71
+ Alexandria is not without problems. See [doc/BUGS](doc/BUGS) for a
72
+ summary of issues.
72
73
 
73
74
  ## Installation
74
75
 
75
76
  There are full instructions for installing Alexandria from source in the
76
- file INSTALL, including information about all the dependencies.
77
+ file [INSTALL](INSTALL), including information about all the dependencies.
77
78
 
78
79
  If you are installing on a Debian-based system, things should be
79
80
  easier as the dependencies can be handled automatically.
80
81
 
81
82
  To run the program, just type
82
- alexandria
83
+ `alexandria`
83
84
  or, to get verbose debugging information,
84
- alexandria --debug
85
+ `alexandria --debug`
85
86
 
86
87
  If you are running GNOME, Alexandria should appear under the
87
88
  'Applications > Office' menu.
@@ -99,6 +100,7 @@ The following people have contributed to Alexandria over the years:
99
100
  * Constantine Evans <cevans@costinet.org>
100
101
  * Dafydd Harries <daf@muse.19inch.net>
101
102
  * Javier Fernandez-Sanguino Pena <jfs@debian.org>
103
+ * Joseph Haig <josephhaig@gmail.com>
102
104
  * Joseph Method <tristil@gmail.com>
103
105
  * Kevin Schultz <schultkl@ieee.org>
104
106
  * Laurent Sansonetti <lrz@gnome.org>
@@ -119,6 +121,11 @@ The following people have contributed to Alexandria over the years:
119
121
  * Cathal Mc Ginley <cathal.alexandria@gnostai.org>
120
122
  * Liam Davison <registrations@liamjdavison.info>
121
123
 
124
+ ### Artists
125
+
126
+ * Andreas Nilsson <nisses.mail@home.se>
127
+ * Stefanie Dijoux <stefanie.dijoux@gmail.com>
128
+
122
129
  ### Translators
123
130
 
124
131
  * Adrián Chaves Fernández <adriyetichaves@gmail.com> (gl)
@@ -140,20 +147,24 @@ The following people have contributed to Alexandria over the years:
140
147
  * Piotr Drąg <piotrdrag@gmail.com> (pl)
141
148
  * Serhij Dubyk <dubyk@library.lviv.ua> (uk)
142
149
 
143
- ### Artists
144
-
145
- * Andreas Nilsson <nisses.mail@home.se>
146
- * Stefanie Dijoux <stefanie.dijoux@gmail.com>
150
+ ### Former translators
151
+ * David Weinehall <tao@debian.org> (sv)
152
+ * Jiří Pejchal <jiri.pejchal@gmail.com> (cs)
153
+ * Laurent Sansonetti <lrz@gnome.org> (fr)
154
+ * Lucas Rocha <lucasr@im.ufba.br> (pt_BR)
155
+ * Marco Costantini <costanti@science.unitn.it> (it)
156
+ * Masao Mutoh <mutoh@highway.ne.jp> (ja)
157
+ * Mirko Maischberger <mirko@lilik.it> (it)
147
158
 
148
159
  ## License
149
160
 
150
161
  Unless otherwise noted, the following license applies to all files that are
151
162
  part of Alexandria:
152
163
 
153
- Copyright (C) 2004-2006 Laurent Sansonetti
154
- Copyright (C) 2007-2010,2014-2018 Alexandria Contributors
164
+ Copyright (C) 2004 Laurent Sansonetti
165
+ Copyright (C) 2005-2010,2014-2020 Alexandria Contributors
155
166
 
156
167
  Alexandria is free software; you can redistribute it and/or modify it under the
157
168
  terms of the GNU General Public License as published by the Free Software
158
169
  Foundation; either version 2 of the License, or (at your option) any later
159
- version. See the file COPYING for details.
170
+ version. See the file [COPYING](COPYING) for details.
data/Rakefile CHANGED
@@ -4,55 +4,55 @@
4
4
  #
5
5
  # See the file README.md for authorship and licensing information.
6
6
 
7
- load 'tasks/setup.rb'
7
+ load "tasks/setup.rb"
8
8
 
9
- require 'rake/packagetask'
9
+ require "rake/packagetask"
10
10
 
11
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'util/rake'))
12
- require 'fileinstall'
13
- require 'gettextgenerate'
14
- require 'omfgenerate'
11
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "util/rake"))
12
+ require "fileinstall"
13
+ require "gettextgenerate"
14
+ require "omfgenerate"
15
15
 
16
- require_relative 'lib/alexandria/version'
16
+ require_relative "lib/alexandria/version"
17
17
 
18
- stage_dir = ENV['DESTDIR'] || 'tmp'
19
- prefix_dir = ENV['PREFIX'] || '/usr'
18
+ stage_dir = ENV["DESTDIR"] || "tmp"
19
+ prefix_dir = ENV["PREFIX"] || "/usr"
20
20
 
21
- PROJECT = 'alexandria'
21
+ PROJECT = "alexandria"
22
22
  PREFIX = prefix_dir
23
- share_dir = ENV['SHARE'] || "#{PREFIX}/share"
23
+ share_dir = ENV["SHARE"] || "#{PREFIX}/share"
24
24
  SHARE = share_dir
25
25
 
26
26
  GettextGenerateTask.new(PROJECT) do |g|
27
- g.generate_po_files('po', 'po/*.po', 'share/locale')
28
- g.generate_desktop('alexandria.desktop.in', 'alexandria.desktop')
27
+ g.generate_po_files("po", "po/*.po", "share/locale")
28
+ g.generate_desktop("alexandria.desktop.in", "alexandria.desktop")
29
29
  end
30
30
 
31
31
  OmfGenerateTask.new(PROJECT) do |o|
32
32
  o.gnome_helpfiles_dir = "#{SHARE}/gnome/help"
33
- o.generate_omf('data/omf/alexandria', 'share/omf/alexandria/*.in')
33
+ o.generate_omf("data/omf/alexandria", "share/omf/alexandria/*.in")
34
34
  end
35
35
 
36
- SHARE_FILE_GLOBS = ['data/alexandria/**/*', 'data/gnome/**/*.*',
37
- 'data/locale/**/*.mo', 'data/omf/**/*.omf',
38
- 'data/sounds/**/*.ogg'].freeze # , 'data/menu/*']
36
+ SHARE_FILE_GLOBS = ["data/alexandria/**/*", "data/gnome/**/*.*",
37
+ "data/locale/**/*.mo", "data/omf/**/*.omf",
38
+ "data/sounds/**/*.ogg"].freeze # , 'data/menu/*']
39
39
 
40
- ICON_FILE_GLOBS = ['data/app-icon/**/*.png',
41
- 'data/app-icon/scalable/*.svg'].freeze
40
+ ICON_FILE_GLOBS = ["data/app-icon/**/*.png",
41
+ "data/app-icon/scalable/*.svg"].freeze
42
42
 
43
- PIXMAP_GLOBS = 'data/app-icon/32x32/*.xpm'
43
+ PIXMAP_GLOBS = "data/app-icon/32x32/*.xpm"
44
44
 
45
45
  def install_common(install_task)
46
- install_task.install_exe('bin', 'bin/*', "#{PREFIX}/bin")
47
- install_task.install('lib', 'lib/**/*.rb', install_task.rubylib)
46
+ install_task.install_exe("bin", "bin/*", "#{PREFIX}/bin")
47
+ install_task.install("lib", "lib/**/*.rb", install_task.rubylib)
48
48
 
49
- install_task.install('data', SHARE_FILE_GLOBS, SHARE)
49
+ install_task.install("data", SHARE_FILE_GLOBS, SHARE)
50
50
  install_task.install_icons(ICON_FILE_GLOBS, "#{SHARE}/icons")
51
- install_task.install('data/app-icon/32x32', PIXMAP_GLOBS, "#{SHARE}/pixmaps")
51
+ install_task.install("data/app-icon/32x32", PIXMAP_GLOBS, "#{SHARE}/pixmaps")
52
52
 
53
- install_task.install('', 'schemas/alexandria.schemas', "#{SHARE}/gconf")
54
- install_task.install('', 'alexandria.desktop', "#{SHARE}/applications")
55
- install_task.install('doc', 'doc/alexandria.1', "#{SHARE}/man/man1")
53
+ install_task.install("", "schemas/alexandria.schemas", "#{SHARE}/gconf")
54
+ install_task.install("", "alexandria.desktop", "#{SHARE}/applications")
55
+ install_task.install("doc", "doc/alexandria.1", "#{SHARE}/man/man1")
56
56
  end
57
57
 
58
58
  FileInstallTask.new(:package_staging, stage_dir, true) do |i|
@@ -65,10 +65,10 @@ FileInstallTask.new(:package) do |j|
65
65
  install_common(j)
66
66
 
67
67
  docs = %w(README.rdoc CHANGELOG.md INSTALL.md COPYING TODO.md)
68
- devel_docs = ['doc/AUTHORS', 'doc/BUGS', 'doc/FAQ',
69
- 'doc/cuecat_support.rdoc']
70
- j.install('', docs, "#{SHARE}/doc/#{PROJECT}")
71
- j.install('doc', devel_docs, "#{SHARE}/doc/#{PROJECT}")
68
+ devel_docs = ["doc/AUTHORS", "doc/BUGS", "doc/FAQ",
69
+ "doc/cuecat_support.rdoc"]
70
+ j.install("", docs, "#{SHARE}/doc/#{PROJECT}")
71
+ j.install("doc", devel_docs, "#{SHARE}/doc/#{PROJECT}")
72
72
 
73
73
  j.uninstall_empty_dirs(["#{SHARE}/**/#{PROJECT}/",
74
74
  "#{j.rubylib}/#{PROJECT}/"])
@@ -83,14 +83,14 @@ end
83
83
  def autogen_comment
84
84
  lines = [
85
85
  "This file is automatically generated by the #{PROJECT} installer.",
86
- 'Do not edit it directly.'
86
+ "Do not edit it directly."
87
87
  ]
88
88
  result = lines.map { |line| "# #{line}" }
89
89
  result.join("\n") + "\n\n"
90
90
  end
91
91
 
92
92
  def generate(filename)
93
- File.open(filename, 'w') do |file|
93
+ File.open(filename, "w") do |file|
94
94
  puts "Generating #{filename}"
95
95
  file.print autogen_comment
96
96
  file_contents = yield
@@ -101,55 +101,57 @@ end
101
101
  # generate default_preferences.rb
102
102
  def convert_with_type(value, type)
103
103
  case type
104
- when 'int'
104
+ when "int"
105
105
  value.to_i
106
- when 'float'
106
+ when "float"
107
107
  value.to_f
108
- when 'bool'
109
- value == 'true'
108
+ when "bool"
109
+ value == "true"
110
+ when "string"
111
+ value.to_s.strip
110
112
  else
111
- value.strip
113
+ raise NotImplementedError, "Unknown type #{type}"
112
114
  end
113
115
  end
114
116
 
115
- SCHEMA_PATH = 'schemas/alexandria.schemas'
117
+ SCHEMA_PATH = "schemas/alexandria.schemas"
116
118
 
117
119
  # This generates default_preferences.rb by copying over values from
118
120
  # providers_priority key in alexandria.schemas (necessary?)
119
121
 
120
- file 'lib/alexandria/default_preferences.rb' => [SCHEMA_PATH] do |f|
121
- require 'rexml/document'
122
+ file "lib/alexandria/default_preferences.rb" => ["Rakefile", SCHEMA_PATH] do |f|
123
+ require "rexml/document"
122
124
  generated_lines = []
123
125
 
124
126
  doc = REXML::Document.new(IO.read(SCHEMA_PATH))
125
- doc.elements.each('gconfschemafile/schemalist/schema') do |element|
126
- default = element.elements['default'].text
127
- next unless default
127
+ doc.elements.each("gconfschemafile/schemalist/schema") do |element|
128
+ default = element.elements["default"].text
128
129
 
129
- varname = File.basename(element.elements['key'].text)
130
- type = element.elements['type'].text
130
+ varname = File.basename(element.elements["key"].text)
131
+ type = element.elements["type"].text
131
132
 
132
- if (type == 'list') || (type == 'pair')
133
- ary = default[1..-2].split(',')
133
+ if (type == "list") || (type == "pair")
134
+ ary = default[1..-2].split(",")
134
135
  next if ary.empty?
135
136
 
136
- if type == 'list'
137
- list_type = element.elements['list_type'].text
137
+ case type
138
+ when "list"
139
+ list_type = element.elements["list_type"].text
138
140
  ary.map! { |x| convert_with_type(x, list_type) }
139
- elsif type == 'pair'
141
+ when "pair"
140
142
  next if ary.length != 2
141
143
 
142
144
  ary[0] = convert_with_type(ary[0],
143
- element.elements['car_type'].text)
145
+ element.elements["car_type"].text)
144
146
  ary[1] = convert_with_type(ary[1],
145
- element.elements['cdr_type'].text)
147
+ element.elements["cdr_type"].text)
146
148
  end
147
149
  default = ary.inspect
148
150
  else
149
151
  default = convert_with_type(default, type).inspect.to_s
150
152
  end
151
153
 
152
- generated_lines << varname.inspect + ' => ' + default
154
+ generated_lines << varname.inspect + " => " + default
153
155
  end
154
156
 
155
157
  generate(f.name) do
@@ -165,10 +167,9 @@ file 'lib/alexandria/default_preferences.rb' => [SCHEMA_PATH] do |f|
165
167
  end
166
168
  end
167
169
 
168
- autogenerated_files = ['lib/alexandria/config.rb',
169
- 'lib/alexandria/default_preferences.rb']
170
+ autogenerated_files = ["lib/alexandria/default_preferences.rb"]
170
171
 
171
- desc 'Generate ruby files needed for the installation'
172
+ desc "Generate ruby files needed for the installation"
172
173
  task autogen: autogenerated_files
173
174
 
174
175
  task :autogen_clobber do |_t|
@@ -197,13 +198,13 @@ end
197
198
 
198
199
  Rake::PackageTask.new(PROJECT, Alexandria::DISPLAY_VERSION) do |p|
199
200
  p.need_tar_gz = true
200
- p.package_files.include('README.md', 'COPYING', 'CHANGELOG.md', 'INSTALL.md',
201
- 'Rakefile', 'util/**/*',
202
- 'TODO.md', 'alexandria.desktop',
203
- 'alexandria.desktop.in',
204
- 'bin/**/*', 'data/**/*', 'misc/**/*',
205
- 'doc/**/*', 'lib/**/*', 'po/**/*',
206
- 'schemas/**/*', 'spec/**/*')
201
+ p.package_files.include("README.md", "COPYING", "CHANGELOG.md", "INSTALL.md",
202
+ "Rakefile", "util/**/*",
203
+ "TODO.md", "alexandria.desktop",
204
+ "alexandria.desktop.in",
205
+ "bin/**/*", "data/**/*", "misc/**/*",
206
+ "doc/**/*", "lib/**/*", "po/**/*",
207
+ "schemas/**/*", "spec/**/*")
207
208
  end
208
209
 
209
210
  task tgz: [:build] do
@@ -214,35 +215,37 @@ end
214
215
 
215
216
  task pre_install: [:build]
216
217
  task :scrollkeeper do
217
- unless system('which scrollkeeper-update')
218
- raise 'scrollkeeper-update cannot be found, is Scrollkeeper correctly installed?'
218
+ unless system("which scrollkeeper-update")
219
+ raise "scrollkeeper-update cannot be found, is Scrollkeeper correctly installed?"
219
220
  end
220
221
 
221
- system('scrollkeeper-update -q') || raise('Scrollkeeper update failed')
222
+ system("scrollkeeper-update -q") || raise("Scrollkeeper update failed")
222
223
  end
223
224
 
224
225
  task :gconf do
225
- return if ENV['GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL']
226
+ return if ENV["GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL"]
226
227
 
227
- raise 'gconftool-2 cannot be found, is GConf2 correctly installed?' unless system('which gconftool-2')
228
+ unless system("which gconftool-2")
229
+ raise "gconftool-2 cannot be found, is GConf2 correctly installed?"
230
+ end
228
231
 
229
- ENV['GCONF_CONFIG_SOURCE'] = `gconftool-2 --get-default-source`.chomp
230
- Dir['schemas/*.schemas'].each do |schema|
232
+ ENV["GCONF_CONFIG_SOURCE"] = `gconftool-2 --get-default-source`.chomp
233
+ Dir["schemas/*.schemas"].each do |schema|
231
234
  system("gconftool-2 --makefile-install-rule '#{schema}'")
232
235
  end
233
236
  # system("killall -HUP gconfd-2")
234
237
  end
235
238
 
236
239
  task :update_icon_cache do
237
- system('gtk-update-icon-cache -f -t /usr/share/icons/hicolor') # HACK
240
+ system("gtk-update-icon-cache -f -t /usr/share/icons/hicolor") # HACK
238
241
  end
239
242
 
240
243
  task post_install: [:scrollkeeper, :gconf, :update_icon_cache]
241
244
 
242
- desc 'Install Alexandria'
245
+ desc "Install Alexandria"
243
246
  task install: [:pre_install, :install_package, :post_install]
244
247
 
245
- desc 'Uninstall Alexandria'
248
+ desc "Uninstall Alexandria"
246
249
  task uninstall: [:uninstall_package] # TODO: gconf etc...
247
250
 
248
- task default: [:spec, :dogtail]
251
+ task default: [:spec]