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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ruby.yml +77 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +86 -36
- data/.rubocop_todo.yml +58 -161
- data/.simplecov +5 -2
- data/CHANGELOG.md +56 -2
- data/Gemfile +4 -3
- data/INSTALL.md +23 -11
- data/README.md +52 -41
- data/Rakefile +78 -75
- data/alexandria-book-collection-manager.gemspec +50 -44
- data/bin/alexandria +12 -22
- data/doc/FAQ +1 -2
- data/doc/dependency_decisions.yml +27 -8
- data/lib/alexandria.rb +25 -23
- data/lib/alexandria/about.rb +50 -50
- data/lib/alexandria/book_providers.rb +86 -91
- data/lib/alexandria/book_providers/adlibris.rb +37 -74
- data/lib/alexandria/book_providers/amazon_aws.rb +94 -100
- data/lib/alexandria/book_providers/amazon_ecs_util.rb +289 -324
- data/lib/alexandria/book_providers/barnes_and_noble.rb +42 -42
- data/lib/alexandria/book_providers/douban.rb +25 -41
- data/lib/alexandria/book_providers/proxis.rb +34 -29
- data/lib/alexandria/book_providers/pseudomarc.rb +77 -85
- data/lib/alexandria/book_providers/siciliano.rb +60 -64
- data/lib/alexandria/book_providers/thalia_provider.rb +161 -0
- data/lib/alexandria/book_providers/web.rb +5 -5
- data/lib/alexandria/book_providers/worldcat.rb +66 -95
- data/lib/alexandria/book_providers/z3950.rb +153 -169
- data/lib/alexandria/config.rb +1 -1
- data/lib/alexandria/console.rb +3 -3
- data/lib/alexandria/default_preferences.rb +37 -0
- data/lib/alexandria/execution_queue.rb +13 -12
- data/lib/alexandria/export_format.rb +8 -8
- data/lib/alexandria/export_library.rb +128 -127
- data/lib/alexandria/import_library.rb +102 -126
- data/lib/alexandria/import_library_csv.rb +41 -41
- data/lib/alexandria/library_collection.rb +6 -5
- data/lib/alexandria/library_sort_order.rb +4 -2
- data/lib/alexandria/library_store.rb +39 -28
- data/lib/alexandria/logging.rb +10 -14
- data/lib/alexandria/models/book.rb +5 -4
- data/lib/alexandria/models/library.rb +63 -53
- data/lib/alexandria/net.rb +5 -6
- data/lib/alexandria/preferences.rb +66 -63
- data/lib/alexandria/scanners.rb +2 -2
- data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +17 -17
- data/lib/alexandria/scanners/keyboard.rb +8 -8
- data/lib/alexandria/smart_library.rb +110 -112
- data/lib/alexandria/ui.rb +15 -15
- data/lib/alexandria/ui/{dialogs/about_dialog.rb → about_dialog.rb} +2 -2
- data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +108 -109
- data/lib/alexandria/ui/alert_dialog.rb +66 -0
- data/lib/alexandria/ui/{dialogs/bad_isbns_dialog.rb → bad_isbns_dialog.rb} +13 -9
- data/lib/alexandria/ui/{dialogs/barcode_animation.rb → barcode_animation.rb} +16 -15
- data/lib/alexandria/ui/{dialogs/book_properties_dialog.rb → book_properties_dialog.rb} +25 -38
- data/lib/alexandria/ui/{dialogs/book_properties_dialog_base.rb → book_properties_dialog_base.rb} +64 -157
- data/lib/alexandria/ui/builder_base.rb +1 -1
- data/lib/alexandria/ui/calendar_popup.rb +58 -0
- data/lib/alexandria/ui/callbacks.rb +187 -155
- data/lib/alexandria/ui/completion_models.rb +8 -22
- data/lib/alexandria/ui/confirm_erase_dialog.rb +33 -0
- data/lib/alexandria/ui/conflict_while_copying_dialog.rb +34 -0
- data/lib/alexandria/ui/dndable.rb +7 -7
- data/lib/alexandria/ui/error_dialog.rb +25 -0
- data/lib/alexandria/ui/{dialogs/export_dialog.rb → export_dialog.rb} +37 -58
- data/lib/alexandria/ui/icons.rb +38 -43
- data/lib/alexandria/ui/iconview.rb +12 -10
- data/lib/alexandria/ui/iconview_tooltips.rb +41 -54
- data/lib/alexandria/ui/import_dialog.rb +157 -0
- data/lib/alexandria/ui/init.rb +30 -41
- data/lib/alexandria/ui/{dialogs/keep_bad_isbn_dialog.rb → keep_bad_isbn_dialog.rb} +9 -6
- data/lib/alexandria/ui/libraries_combo.rb +15 -14
- data/lib/alexandria/ui/listview.rb +69 -67
- data/lib/alexandria/ui/main_app.rb +24 -26
- data/lib/alexandria/ui/misc_dialogs.rb +10 -0
- data/lib/alexandria/ui/multi_drag_treeview.rb +8 -9
- data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +113 -114
- data/lib/alexandria/ui/{dialogs/new_book_dialog_manual.rb → new_book_dialog_manual.rb} +22 -19
- data/lib/alexandria/ui/new_provider_dialog.rb +100 -0
- data/lib/alexandria/ui/new_smart_library_dialog.rb +74 -0
- data/lib/alexandria/ui/preferences_dialog.rb +313 -0
- data/lib/alexandria/ui/provider_preferences_base_dialog.rb +95 -0
- data/lib/alexandria/ui/provider_preferences_dialog.rb +35 -0
- data/lib/alexandria/ui/{dialogs/misc_dialogs.rb → really_delete_dialog.rb} +7 -28
- data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +53 -48
- data/lib/alexandria/ui/skip_entry_dialog.rb +33 -0
- data/lib/alexandria/ui/smart_library_properties_dialog.rb +60 -0
- data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +242 -0
- data/lib/alexandria/ui/smart_library_rule_box.rb +119 -0
- data/lib/alexandria/ui/sound.rb +11 -13
- data/lib/alexandria/ui/ui_manager.rb +216 -200
- data/lib/alexandria/version.rb +4 -19
- data/lib/alexandria/web_themes.rb +21 -21
- data/po/Makefile +2 -2
- data/po/cs.po +992 -875
- data/po/cy.po +961 -874
- data/po/de.po +990 -865
- data/po/el.po +989 -865
- data/po/es.po +985 -861
- data/po/fr.po +987 -867
- data/po/ga.po +908 -820
- data/po/gl.po +980 -860
- data/po/it.po +986 -864
- data/po/ja.po +969 -849
- data/po/mk.po +984 -860
- data/po/nb.po +979 -859
- data/po/nl.po +983 -860
- data/po/pl.po +1018 -971
- data/po/pt.po +988 -857
- data/po/pt_BR.po +983 -863
- data/po/ru.po +994 -871
- data/po/sk.po +989 -867
- data/po/sv.po +976 -856
- data/po/uk.po +972 -858
- data/po/zh_TW.po +974 -854
- data/schemas/alexandria.schemas +24 -2
- data/share/alexandria/glade/acquire_dialog__builder.glade +1 -1
- data/share/alexandria/glade/book_properties_dialog__builder.glade +1 -1
- data/share/alexandria/glade/main_app__builder.glade +6 -21
- data/share/alexandria/glade/new_book_dialog__builder.glade +1 -1
- data/share/alexandria/glade/preferences_dialog__builder.glade +1 -1
- data/share/gnome/help/alexandria/C/introduction.xml +0 -4
- data/share/gnome/help/alexandria/C/searching.xml +1 -1
- data/share/gnome/help/alexandria/C/smart-libraries.xml +2 -2
- data/share/gnome/help/alexandria/C/working-with-libraries.xml +1 -1
- data/share/gnome/help/alexandria/fr/alexandria.xml +1 -1
- data/share/gnome/help/alexandria/ja/introduction.xml +0 -4
- data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
- data/spec/alexandria/book_providers/thalia_provider_spec.rb +119 -0
- data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
- data/spec/alexandria/book_providers_spec.rb +62 -156
- data/spec/alexandria/book_spec.rb +12 -10
- data/spec/alexandria/console_spec.rb +6 -11
- data/spec/alexandria/export_library_spec.rb +47 -58
- data/spec/alexandria/library_spec.rb +121 -109
- data/spec/alexandria/library_store_spec.rb +8 -8
- data/spec/alexandria/preferences_spec.rb +44 -17
- data/spec/alexandria/scanners/cue_cat_spec.rb +52 -0
- data/spec/alexandria/smart_library_spec.rb +15 -15
- data/spec/alexandria/ui/about_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/acquire_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/alert_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/book_properties_dialog_spec.rb +59 -0
- data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/error_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/export_dialog_spec.rb +36 -0
- data/spec/alexandria/ui/icons_spec.rb +26 -0
- data/spec/alexandria/ui/iconview_spec.rb +7 -21
- data/spec/alexandria/ui/import_dialog_spec.rb +46 -0
- data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +17 -0
- data/spec/alexandria/ui/main_app_spec.rb +7 -34
- data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +51 -0
- data/spec/alexandria/ui/{dialogs/new_book_dialog_spec.rb → new_book_dialog_spec.rb} +4 -4
- data/spec/alexandria/ui/new_provider_dialog_spec.rb +30 -0
- data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +39 -0
- data/spec/alexandria/ui/preferences_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +34 -0
- data/spec/alexandria/ui/really_delete_dialog_spec.rb +16 -0
- data/spec/alexandria/ui/sidepane_manager_spec.rb +15 -0
- data/spec/alexandria/ui/skip_entry_dialog_spec.rb +14 -0
- data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +49 -0
- data/spec/alexandria/ui/sound_spec.rb +2 -2
- data/spec/alexandria/ui/ui_manager_spec.rb +44 -20
- data/spec/end_to_end/basic_run_spec.rb +21 -38
- data/spec/fixtures/cover.jpg +0 -0
- data/spec/spec_helper.rb +54 -10
- data/tasks/setup.rb +2 -2
- data/tasks/spec.rake +11 -11
- data/util/rake/fileinstall.rb +38 -35
- data/util/rake/gettextgenerate.rb +7 -7
- data/util/rake/omfgenerate.rb +7 -7
- metadata +158 -45
- data/dogtail/basic_run_test.py +0 -9
- data/lib/alexandria/book_providers/renaud.rb +0 -155
- data/lib/alexandria/book_providers/thalia.rb +0 -198
- data/lib/alexandria/ui/dialogs/alert_dialog.rb +0 -63
- data/lib/alexandria/ui/dialogs/import_dialog.rb +0 -176
- data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +0 -62
- data/lib/alexandria/ui/dialogs/preferences_dialog.rb +0 -563
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +0 -61
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +0 -423
- data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
- data/spec/alexandria/ui/dialogs_spec.rb +0 -162
- data/spec/alexandria/ui/sidepane_spec.rb +0 -29
- data/spec/alexandria/ui/ui_utilities_spec.rb +0 -62
- data/spec/alexandria/utilities_spec.rb +0 -52
- data/tasks/dogtail.rake +0 -6
data/.simplecov
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
|
-
<!--
|
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
|
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
|
10
|
-
gem
|
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
|
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
|
65
|
-
|
66
|
-
[`
|
67
|
-
|
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
|
-
|
71
|
-
|
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
|
-
|
75
|
-
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
Alexandria is not without problems. See doc/BUGS for a
|
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
|
-
###
|
144
|
-
|
145
|
-
*
|
146
|
-
*
|
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
|
154
|
-
Copyright (C)
|
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
|
7
|
+
load "tasks/setup.rb"
|
8
8
|
|
9
|
-
require
|
9
|
+
require "rake/packagetask"
|
10
10
|
|
11
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
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
|
16
|
+
require_relative "lib/alexandria/version"
|
17
17
|
|
18
|
-
stage_dir = ENV[
|
19
|
-
prefix_dir = ENV[
|
18
|
+
stage_dir = ENV["DESTDIR"] || "tmp"
|
19
|
+
prefix_dir = ENV["PREFIX"] || "/usr"
|
20
20
|
|
21
|
-
PROJECT =
|
21
|
+
PROJECT = "alexandria"
|
22
22
|
PREFIX = prefix_dir
|
23
|
-
share_dir = ENV[
|
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(
|
28
|
-
g.generate_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(
|
33
|
+
o.generate_omf("data/omf/alexandria", "share/omf/alexandria/*.in")
|
34
34
|
end
|
35
35
|
|
36
|
-
SHARE_FILE_GLOBS = [
|
37
|
-
|
38
|
-
|
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 = [
|
41
|
-
|
40
|
+
ICON_FILE_GLOBS = ["data/app-icon/**/*.png",
|
41
|
+
"data/app-icon/scalable/*.svg"].freeze
|
42
42
|
|
43
|
-
PIXMAP_GLOBS =
|
43
|
+
PIXMAP_GLOBS = "data/app-icon/32x32/*.xpm"
|
44
44
|
|
45
45
|
def install_common(install_task)
|
46
|
-
install_task.install_exe(
|
47
|
-
install_task.install(
|
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(
|
49
|
+
install_task.install("data", SHARE_FILE_GLOBS, SHARE)
|
50
50
|
install_task.install_icons(ICON_FILE_GLOBS, "#{SHARE}/icons")
|
51
|
-
install_task.install(
|
51
|
+
install_task.install("data/app-icon/32x32", PIXMAP_GLOBS, "#{SHARE}/pixmaps")
|
52
52
|
|
53
|
-
install_task.install(
|
54
|
-
install_task.install(
|
55
|
-
install_task.install(
|
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 = [
|
69
|
-
|
70
|
-
j.install(
|
71
|
-
j.install(
|
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
|
-
|
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,
|
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
|
104
|
+
when "int"
|
105
105
|
value.to_i
|
106
|
-
when
|
106
|
+
when "float"
|
107
107
|
value.to_f
|
108
|
-
when
|
109
|
-
value ==
|
108
|
+
when "bool"
|
109
|
+
value == "true"
|
110
|
+
when "string"
|
111
|
+
value.to_s.strip
|
110
112
|
else
|
111
|
-
|
113
|
+
raise NotImplementedError, "Unknown type #{type}"
|
112
114
|
end
|
113
115
|
end
|
114
116
|
|
115
|
-
SCHEMA_PATH =
|
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
|
121
|
-
require
|
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(
|
126
|
-
default = element.elements[
|
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[
|
130
|
-
type = element.elements[
|
130
|
+
varname = File.basename(element.elements["key"].text)
|
131
|
+
type = element.elements["type"].text
|
131
132
|
|
132
|
-
if (type ==
|
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
|
-
|
137
|
-
|
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
|
-
|
141
|
+
when "pair"
|
140
142
|
next if ary.length != 2
|
141
143
|
|
142
144
|
ary[0] = convert_with_type(ary[0],
|
143
|
-
element.elements[
|
145
|
+
element.elements["car_type"].text)
|
144
146
|
ary[1] = convert_with_type(ary[1],
|
145
|
-
element.elements[
|
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 +
|
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 = [
|
169
|
-
'lib/alexandria/default_preferences.rb']
|
170
|
+
autogenerated_files = ["lib/alexandria/default_preferences.rb"]
|
170
171
|
|
171
|
-
desc
|
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(
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
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(
|
218
|
-
raise
|
218
|
+
unless system("which scrollkeeper-update")
|
219
|
+
raise "scrollkeeper-update cannot be found, is Scrollkeeper correctly installed?"
|
219
220
|
end
|
220
221
|
|
221
|
-
system(
|
222
|
+
system("scrollkeeper-update -q") || raise("Scrollkeeper update failed")
|
222
223
|
end
|
223
224
|
|
224
225
|
task :gconf do
|
225
|
-
return if ENV[
|
226
|
+
return if ENV["GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL"]
|
226
227
|
|
227
|
-
|
228
|
+
unless system("which gconftool-2")
|
229
|
+
raise "gconftool-2 cannot be found, is GConf2 correctly installed?"
|
230
|
+
end
|
228
231
|
|
229
|
-
ENV[
|
230
|
-
Dir[
|
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(
|
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
|
245
|
+
desc "Install Alexandria"
|
243
246
|
task install: [:pre_install, :install_package, :post_install]
|
244
247
|
|
245
|
-
desc
|
248
|
+
desc "Uninstall Alexandria"
|
246
249
|
task uninstall: [:uninstall_package] # TODO: gconf etc...
|
247
250
|
|
248
|
-
task default: [:spec
|
251
|
+
task default: [:spec]
|