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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ruby.yml +77 -0
- data/.gitignore +5 -1
- data/.hound.yml +2 -0
- data/.rubocop.yml +87 -37
- data/.rubocop_todo.yml +62 -191
- data/.simplecov +5 -2
- data/CHANGELOG.md +63 -0
- data/Gemfile +4 -3
- data/INSTALL.md +26 -14
- data/README.md +52 -42
- data/Rakefile +93 -109
- data/TODO.md +9 -1
- data/alexandria-book-collection-manager.gemspec +50 -43
- data/bin/alexandria +30 -53
- data/doc/FAQ +2 -6
- data/doc/dependency_decisions.yml +27 -8
- data/lib/alexandria.rb +27 -37
- data/lib/alexandria/about.rb +50 -50
- data/lib/alexandria/book_providers.rb +90 -97
- data/lib/alexandria/book_providers/adlibris.rb +41 -76
- data/lib/alexandria/book_providers/amazon_aws.rb +96 -100
- data/lib/alexandria/book_providers/amazon_ecs_util.rb +295 -322
- data/lib/alexandria/book_providers/barnes_and_noble.rb +48 -45
- data/lib/alexandria/book_providers/douban.rb +26 -42
- data/lib/alexandria/book_providers/proxis.rb +44 -55
- data/lib/alexandria/book_providers/pseudomarc.rb +77 -85
- data/lib/alexandria/book_providers/siciliano.rb +64 -65
- data/lib/alexandria/book_providers/thalia.rb +42 -41
- data/lib/alexandria/book_providers/web.rb +15 -33
- data/lib/alexandria/book_providers/worldcat.rb +70 -97
- data/lib/alexandria/book_providers/z3950.rb +160 -173
- data/lib/alexandria/config.rb +1 -1
- data/lib/alexandria/console.rb +8 -21
- data/lib/alexandria/default_preferences.rb +37 -0
- data/lib/alexandria/execution_queue.rb +15 -13
- data/lib/alexandria/export_format.rb +47 -0
- data/lib/alexandria/export_library.rb +193 -300
- data/lib/alexandria/import_library.rb +108 -141
- data/lib/alexandria/import_library_csv.rb +43 -46
- data/lib/alexandria/library_collection.rb +79 -0
- data/lib/alexandria/library_sort_order.rb +45 -0
- data/lib/alexandria/library_store.rb +233 -0
- data/lib/alexandria/logging.rb +11 -13
- data/lib/alexandria/models/book.rb +13 -20
- data/lib/alexandria/models/library.rb +81 -353
- data/lib/alexandria/net.rb +5 -6
- data/lib/alexandria/preferences.rb +73 -87
- data/lib/alexandria/scanners.rb +2 -2
- data/lib/alexandria/scanners/{cuecat.rb → cue_cat.rb} +20 -18
- data/lib/alexandria/scanners/keyboard.rb +8 -8
- data/lib/alexandria/smart_library.rb +133 -170
- data/lib/alexandria/ui.rb +15 -15
- data/lib/alexandria/ui/about_dialog.rb +49 -0
- data/lib/alexandria/ui/{dialogs/acquire_dialog.rb → acquire_dialog.rb} +119 -136
- data/lib/alexandria/ui/alert_dialog.rb +64 -0
- data/lib/alexandria/ui/bad_isbns_dialog.rb +41 -0
- 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} +39 -52
- data/lib/alexandria/ui/book_properties_dialog_base.rb +318 -0
- data/lib/alexandria/ui/builder_base.rb +7 -27
- data/lib/alexandria/ui/calendar_popup.rb +58 -0
- data/lib/alexandria/ui/callbacks.rb +189 -183
- data/lib/alexandria/ui/completion_models.rb +10 -23
- 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/export_dialog.rb +142 -0
- data/lib/alexandria/ui/icons.rb +47 -63
- 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 +21 -33
- data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +36 -0
- data/lib/alexandria/ui/libraries_combo.rb +16 -14
- data/lib/alexandria/ui/listview.rb +73 -87
- 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 +28 -41
- data/lib/alexandria/ui/{dialogs/new_book_dialog.rb → new_book_dialog.rb} +156 -194
- data/lib/alexandria/ui/new_book_dialog_manual.rb +139 -0
- 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/really_delete_dialog.rb +53 -0
- data/lib/alexandria/ui/{sidepane.rb → sidepane_manager.rb} +56 -68
- 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 +236 -251
- data/lib/alexandria/undo_manager.rb +1 -0
- data/lib/alexandria/version.rb +4 -19
- data/lib/alexandria/web_themes.rb +22 -21
- data/po/Makefile +2 -2
- data/po/cs.po +993 -880
- data/po/cy.po +957 -874
- data/po/de.po +990 -869
- data/po/el.po +989 -869
- data/po/es.po +985 -865
- data/po/fr.po +986 -870
- data/po/ga.po +907 -823
- data/po/gl.po +981 -865
- data/po/it.po +986 -868
- data/po/ja.po +969 -853
- data/po/mk.po +983 -863
- data/po/nb.po +979 -863
- data/po/nl.po +983 -864
- data/po/pl.po +1017 -974
- data/po/pt.po +988 -861
- data/po/pt_BR.po +984 -868
- data/po/ru.po +992 -873
- data/po/sk.po +987 -869
- data/po/sv.po +977 -861
- data/po/uk.po +975 -865
- data/po/zh_TW.po +976 -860
- data/schemas/alexandria.schemas +25 -3
- data/share/alexandria/glade/acquire_dialog__builder.glade +15 -12
- data/share/alexandria/glade/book_properties_dialog__builder.glade +171 -299
- data/share/alexandria/glade/main_app__builder.glade +24 -33
- data/share/alexandria/glade/new_book_dialog__builder.glade +27 -59
- data/share/alexandria/glade/preferences_dialog__builder.glade +250 -290
- data/share/gnome/help/alexandria/C/introduction.xml +0 -8
- 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 -8
- data/share/gnome/help/alexandria/ja/smart-libraries.xml +1 -1
- data/spec/alexandria/book_providers/world_cat_provider_spec.rb +160 -0
- data/spec/alexandria/book_providers_spec.rb +75 -171
- data/spec/alexandria/book_spec.rb +12 -10
- data/spec/alexandria/console_spec.rb +27 -0
- data/spec/alexandria/export_library_spec.rb +130 -0
- data/spec/alexandria/library_spec.rb +128 -172
- data/spec/alexandria/library_store_spec.rb +37 -0
- 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 +30 -25
- 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 +17 -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 +15 -0
- data/spec/alexandria/ui/new_book_dialog_spec.rb +22 -0
- 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 +43 -20
- data/spec/end_to_end/basic_run_spec.rb +52 -0
- data/spec/spec_helper.rb +65 -33
- data/tasks/setup.rb +2 -2
- data/tasks/spec.rake +16 -3
- data/util/rake/fileinstall.rb +39 -35
- data/util/rake/gettextgenerate.rb +7 -7
- data/util/rake/omfgenerate.rb +7 -7
- metadata +178 -45
- data/dogtail/basic_run_test.py +0 -9
- data/lib/alexandria/book_providers/deastore.rb +0 -265
- data/lib/alexandria/book_providers/mcu.rb +0 -182
- data/lib/alexandria/book_providers/renaud.rb +0 -149
- data/lib/alexandria/ui/dialogs/about_dialog.rb +0 -61
- data/lib/alexandria/ui/dialogs/alert_dialog.rb +0 -72
- data/lib/alexandria/ui/dialogs/bad_isbns_dialog.rb +0 -51
- data/lib/alexandria/ui/dialogs/book_properties_dialog_base.rb +0 -426
- data/lib/alexandria/ui/dialogs/export_dialog.rb +0 -171
- data/lib/alexandria/ui/dialogs/import_dialog.rb +0 -196
- data/lib/alexandria/ui/dialogs/misc_dialogs.rb +0 -87
- data/lib/alexandria/ui/dialogs/new_book_dialog_manual.rb +0 -154
- data/lib/alexandria/ui/dialogs/new_smart_library_dialog.rb +0 -74
- data/lib/alexandria/ui/dialogs/preferences_dialog.rb +0 -568
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog.rb +0 -59
- data/lib/alexandria/ui/dialogs/smart_library_properties_dialog_base.rb +0 -420
- data/spec/alexandria/scanners/cuecat_spec.rb +0 -67
- data/spec/alexandria/ui/dialogs_spec.rb +0 -96
- 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,55 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.7 / 2020-11-15
|
4
|
+
|
5
|
+
* Update Polish translation ([#88] by [Piotr Drąg][piotrdrag])
|
6
|
+
* Fix hiding of progress bar of import dialog
|
7
|
+
* Fix calendar popups in Smart Library and Book Properties dialogs
|
8
|
+
* Fix crashes when activating Export and Import menu items
|
9
|
+
|
10
|
+
## 0.7.6 / 2020-11-01
|
11
|
+
|
12
|
+
* Make more strings translatable with help from rubocop-i18n
|
13
|
+
* Code quality and testing infrastructure improvements
|
14
|
+
* Update Polish translation ([#51] and [#64], by [Piotr Drąg][piotrdrag])
|
15
|
+
* Update Dutch translation
|
16
|
+
* Make several dialogs that stopped appearing appear again
|
17
|
+
* Remove ability to enable and disable providers through a pop-up menu
|
18
|
+
* Fix New Library functionality
|
19
|
+
* Update dependencies on gtk3, gstreamer, and psych
|
20
|
+
* Fix issues in preferences, smart library dialog, and book selection
|
21
|
+
* Improve installation instructions
|
22
|
+
* Improve README ([#83] by [Happy][HappyFacade])
|
23
|
+
|
24
|
+
## 0.7.5 / 2020-05-11
|
25
|
+
|
26
|
+
* Avoid crash when opening Import dialog
|
27
|
+
* Avoid crash during export
|
28
|
+
* Add support for Ruby 2.7
|
29
|
+
* Drop support for Ruby 2.4
|
30
|
+
* Remove broken Renaud provider
|
31
|
+
|
32
|
+
## 0.7.4 / 2019-10-24
|
33
|
+
|
34
|
+
* Drop support for Ruby 2.3
|
35
|
+
* Avoid passing nil to Gtk method #visible=, which expects a boolean
|
36
|
+
([#22], by [Joseph Haig][jrmhaig])
|
37
|
+
* Update dependencies on gtk3 and gstreamer to 3.4.1
|
38
|
+
* Fix WorldCat provider to use https
|
39
|
+
|
40
|
+
## 0.7.3 / 2019-02-27
|
41
|
+
|
42
|
+
* Remove DeaStore provider since the site is no longer online
|
43
|
+
* Remove MCU provider since the site is no longer online
|
44
|
+
* Various code cleanups
|
45
|
+
* Update dependencies on `gstreamer`, `gtk3` and `image_size`
|
46
|
+
* Call `#set_active` with `false` instead of `nil` (Fixes [#19])
|
47
|
+
* Spec and fix export functionality
|
48
|
+
* Do not hard-code storage location
|
49
|
+
* Silence some Gtk+ warnings
|
50
|
+
* Fix setup of default scanner when no scanner is configured
|
51
|
+
* Update `YAML.safe_load` calls to new API, silencing deprecation warnings
|
52
|
+
|
3
53
|
## 0.7.2 / 2018-03-18
|
4
54
|
|
5
55
|
* Update dependencies
|
@@ -50,3 +100,16 @@
|
|
50
100
|
* Amazon queries now use a Associate Tag, a new requirement of
|
51
101
|
Amazon's Product Advertising API. Thanks to Stephen McCamant for
|
52
102
|
providing the patch.
|
103
|
+
|
104
|
+
<!-- contributors -->
|
105
|
+
[jrmhaig]: https://github.com/jrmhaig
|
106
|
+
[piotrdrag]: https://github.com/piotrdrag
|
107
|
+
[HappyFacade]: https://github.com/HappyFacade
|
108
|
+
|
109
|
+
<!-- issues and pull requests -->
|
110
|
+
[#88]: https://github.com/mvz/alexandria-book-collection-manager/pull/88
|
111
|
+
[#83]: https://github.com/mvz/alexandria-book-collection-manager/pull/83
|
112
|
+
[#64]: https://github.com/mvz/alexandria-book-collection-manager/pull/64
|
113
|
+
[#51]: https://github.com/mvz/alexandria-book-collection-manager/pull/51
|
114
|
+
[#23]: https://github.com/mvz/alexandria-book-collection-manager/pull/23
|
115
|
+
[#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
@@ -26,13 +26,13 @@ Requires version `~> 3.1`.
|
|
26
26
|
### Hpricot
|
27
27
|
|
28
28
|
Alexandria uses [hpricot](https://github.com/hpricot/hpricot) to
|
29
|
-
parse the HTML from web pages for providers such as
|
30
|
-
|
29
|
+
parse the HTML from web pages for providers such as Siciliano.
|
30
|
+
It is also used to parse the XML for the Amazon web
|
31
31
|
service.
|
32
32
|
|
33
33
|
## HTMLEntities
|
34
34
|
|
35
|
-
This is used by all website-based providers
|
35
|
+
This is used by all website-based providers.
|
36
36
|
[htmlentities](https://github.com/threedaymonk/htmlentities) is used to
|
37
37
|
provide more flexible HTML parsing.
|
38
38
|
|
@@ -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,50 +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
|
-
|
72
|
-
|
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.
|
73
73
|
|
74
74
|
## Installation
|
75
75
|
|
76
76
|
There are full instructions for installing Alexandria from source in the
|
77
|
-
file INSTALL, including information about all the dependencies.
|
77
|
+
file [INSTALL](INSTALL), including information about all the dependencies.
|
78
78
|
|
79
79
|
If you are installing on a Debian-based system, things should be
|
80
80
|
easier as the dependencies can be handled automatically.
|
81
81
|
|
82
82
|
To run the program, just type
|
83
|
-
alexandria
|
83
|
+
`alexandria`
|
84
84
|
or, to get verbose debugging information,
|
85
|
-
alexandria --debug
|
85
|
+
`alexandria --debug`
|
86
86
|
|
87
87
|
If you are running GNOME, Alexandria should appear under the
|
88
88
|
'Applications > Office' menu.
|
@@ -100,6 +100,7 @@ The following people have contributed to Alexandria over the years:
|
|
100
100
|
* Constantine Evans <cevans@costinet.org>
|
101
101
|
* Dafydd Harries <daf@muse.19inch.net>
|
102
102
|
* Javier Fernandez-Sanguino Pena <jfs@debian.org>
|
103
|
+
* Joseph Haig <josephhaig@gmail.com>
|
103
104
|
* Joseph Method <tristil@gmail.com>
|
104
105
|
* Kevin Schultz <schultkl@ieee.org>
|
105
106
|
* Laurent Sansonetti <lrz@gnome.org>
|
@@ -120,6 +121,11 @@ The following people have contributed to Alexandria over the years:
|
|
120
121
|
* Cathal Mc Ginley <cathal.alexandria@gnostai.org>
|
121
122
|
* Liam Davison <registrations@liamjdavison.info>
|
122
123
|
|
124
|
+
### Artists
|
125
|
+
|
126
|
+
* Andreas Nilsson <nisses.mail@home.se>
|
127
|
+
* Stefanie Dijoux <stefanie.dijoux@gmail.com>
|
128
|
+
|
123
129
|
### Translators
|
124
130
|
|
125
131
|
* Adrián Chaves Fernández <adriyetichaves@gmail.com> (gl)
|
@@ -141,20 +147,24 @@ The following people have contributed to Alexandria over the years:
|
|
141
147
|
* Piotr Drąg <piotrdrag@gmail.com> (pl)
|
142
148
|
* Serhij Dubyk <dubyk@library.lviv.ua> (uk)
|
143
149
|
|
144
|
-
###
|
145
|
-
|
146
|
-
*
|
147
|
-
*
|
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)
|
148
158
|
|
149
159
|
## License
|
150
160
|
|
151
161
|
Unless otherwise noted, the following license applies to all files that are
|
152
162
|
part of Alexandria:
|
153
163
|
|
154
|
-
Copyright (C) 2004
|
155
|
-
Copyright (C)
|
164
|
+
Copyright (C) 2004 Laurent Sansonetti
|
165
|
+
Copyright (C) 2005-2010,2014-2020 Alexandria Contributors
|
156
166
|
|
157
167
|
Alexandria is free software; you can redistribute it and/or modify it under the
|
158
168
|
terms of the GNU General Public License as published by the Free Software
|
159
169
|
Foundation; either version 2 of the License, or (at your option) any later
|
160
|
-
version. See the file COPYING for details.
|
170
|
+
version. See the file [COPYING](COPYING) for details.
|
data/Rakefile
CHANGED
@@ -1,81 +1,58 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# -*- ruby -*-
|
4
|
-
#--
|
5
|
-
# Copyright (C) 2009 Cathal Mc Ginley
|
6
|
-
# Copyright (C) 2011, 2014, 2016 Matijs van Zuijlen
|
7
|
-
#
|
8
3
|
# This file is part of the Alexandria build system.
|
9
4
|
#
|
10
|
-
#
|
11
|
-
# a copy of this software and associated documentation files (the
|
12
|
-
# "Software"), to deal in the Software without restriction, including
|
13
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
14
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
15
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
16
|
-
# the following conditions:
|
17
|
-
#
|
18
|
-
# The above copyright notice and this permission notice shall be
|
19
|
-
# included in all copies or substantial portions of the Software.
|
20
|
-
#
|
21
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
22
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
23
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
24
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
25
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
26
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
27
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
28
|
-
#++
|
5
|
+
# See the file README.md for authorship and licensing information.
|
29
6
|
|
30
|
-
load
|
7
|
+
load "tasks/setup.rb"
|
31
8
|
|
32
|
-
require
|
9
|
+
require "rake/packagetask"
|
33
10
|
|
34
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),
|
35
|
-
require
|
36
|
-
require
|
37
|
-
require
|
11
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "util/rake"))
|
12
|
+
require "fileinstall"
|
13
|
+
require "gettextgenerate"
|
14
|
+
require "omfgenerate"
|
38
15
|
|
39
|
-
require_relative
|
16
|
+
require_relative "lib/alexandria/version"
|
40
17
|
|
41
|
-
stage_dir = ENV[
|
42
|
-
prefix_dir = ENV[
|
18
|
+
stage_dir = ENV["DESTDIR"] || "tmp"
|
19
|
+
prefix_dir = ENV["PREFIX"] || "/usr"
|
43
20
|
|
44
|
-
PROJECT =
|
21
|
+
PROJECT = "alexandria"
|
45
22
|
PREFIX = prefix_dir
|
46
|
-
share_dir = ENV[
|
23
|
+
share_dir = ENV["SHARE"] || "#{PREFIX}/share"
|
47
24
|
SHARE = share_dir
|
48
25
|
|
49
26
|
GettextGenerateTask.new(PROJECT) do |g|
|
50
|
-
g.generate_po_files(
|
51
|
-
g.generate_desktop(
|
27
|
+
g.generate_po_files("po", "po/*.po", "share/locale")
|
28
|
+
g.generate_desktop("alexandria.desktop.in", "alexandria.desktop")
|
52
29
|
end
|
53
30
|
|
54
31
|
OmfGenerateTask.new(PROJECT) do |o|
|
55
32
|
o.gnome_helpfiles_dir = "#{SHARE}/gnome/help"
|
56
|
-
o.generate_omf(
|
33
|
+
o.generate_omf("data/omf/alexandria", "share/omf/alexandria/*.in")
|
57
34
|
end
|
58
35
|
|
59
|
-
SHARE_FILE_GLOBS = [
|
60
|
-
|
61
|
-
|
36
|
+
SHARE_FILE_GLOBS = ["data/alexandria/**/*", "data/gnome/**/*.*",
|
37
|
+
"data/locale/**/*.mo", "data/omf/**/*.omf",
|
38
|
+
"data/sounds/**/*.ogg"].freeze # , 'data/menu/*']
|
62
39
|
|
63
|
-
ICON_FILE_GLOBS = [
|
64
|
-
|
40
|
+
ICON_FILE_GLOBS = ["data/app-icon/**/*.png",
|
41
|
+
"data/app-icon/scalable/*.svg"].freeze
|
65
42
|
|
66
|
-
PIXMAP_GLOBS =
|
43
|
+
PIXMAP_GLOBS = "data/app-icon/32x32/*.xpm"
|
67
44
|
|
68
45
|
def install_common(install_task)
|
69
|
-
install_task.install_exe(
|
70
|
-
install_task.install(
|
46
|
+
install_task.install_exe("bin", "bin/*", "#{PREFIX}/bin")
|
47
|
+
install_task.install("lib", "lib/**/*.rb", install_task.rubylib)
|
71
48
|
|
72
|
-
install_task.install(
|
49
|
+
install_task.install("data", SHARE_FILE_GLOBS, SHARE)
|
73
50
|
install_task.install_icons(ICON_FILE_GLOBS, "#{SHARE}/icons")
|
74
|
-
install_task.install(
|
51
|
+
install_task.install("data/app-icon/32x32", PIXMAP_GLOBS, "#{SHARE}/pixmaps")
|
75
52
|
|
76
|
-
install_task.install(
|
77
|
-
install_task.install(
|
78
|
-
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")
|
79
56
|
end
|
80
57
|
|
81
58
|
FileInstallTask.new(:package_staging, stage_dir, true) do |i|
|
@@ -88,10 +65,10 @@ FileInstallTask.new(:package) do |j|
|
|
88
65
|
install_common(j)
|
89
66
|
|
90
67
|
docs = %w(README.rdoc CHANGELOG.md INSTALL.md COPYING TODO.md)
|
91
|
-
devel_docs = [
|
92
|
-
|
93
|
-
j.install(
|
94
|
-
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}")
|
95
72
|
|
96
73
|
j.uninstall_empty_dirs(["#{SHARE}/**/#{PROJECT}/",
|
97
74
|
"#{j.rubylib}/#{PROJECT}/"])
|
@@ -106,14 +83,14 @@ end
|
|
106
83
|
def autogen_comment
|
107
84
|
lines = [
|
108
85
|
"This file is automatically generated by the #{PROJECT} installer.",
|
109
|
-
|
86
|
+
"Do not edit it directly."
|
110
87
|
]
|
111
88
|
result = lines.map { |line| "# #{line}" }
|
112
89
|
result.join("\n") + "\n\n"
|
113
90
|
end
|
114
91
|
|
115
92
|
def generate(filename)
|
116
|
-
File.open(filename,
|
93
|
+
File.open(filename, "w") do |file|
|
117
94
|
puts "Generating #{filename}"
|
118
95
|
file.print autogen_comment
|
119
96
|
file_contents = yield
|
@@ -124,71 +101,75 @@ end
|
|
124
101
|
# generate default_preferences.rb
|
125
102
|
def convert_with_type(value, type)
|
126
103
|
case type
|
127
|
-
when
|
104
|
+
when "int"
|
128
105
|
value.to_i
|
129
|
-
when
|
106
|
+
when "float"
|
130
107
|
value.to_f
|
131
|
-
when
|
132
|
-
value ==
|
108
|
+
when "bool"
|
109
|
+
value == "true"
|
110
|
+
when "string"
|
111
|
+
value.to_s.strip
|
133
112
|
else
|
134
|
-
|
113
|
+
raise NotImplementedError, "Unknown type #{type}"
|
135
114
|
end
|
136
115
|
end
|
137
116
|
|
138
|
-
SCHEMA_PATH =
|
117
|
+
SCHEMA_PATH = "schemas/alexandria.schemas"
|
139
118
|
|
140
119
|
# This generates default_preferences.rb by copying over values from
|
141
120
|
# providers_priority key in alexandria.schemas (necessary?)
|
142
121
|
|
143
|
-
file
|
144
|
-
require
|
122
|
+
file "lib/alexandria/default_preferences.rb" => ["Rakefile", SCHEMA_PATH] do |f|
|
123
|
+
require "rexml/document"
|
145
124
|
generated_lines = []
|
146
125
|
|
147
126
|
doc = REXML::Document.new(IO.read(SCHEMA_PATH))
|
148
|
-
doc.elements.each(
|
149
|
-
default = element.elements[
|
150
|
-
|
151
|
-
varname = File.basename(element.elements[
|
152
|
-
type = element.elements[
|
153
|
-
|
154
|
-
if (type ==
|
155
|
-
ary = default[1..-2].split(
|
127
|
+
doc.elements.each("gconfschemafile/schemalist/schema") do |element|
|
128
|
+
default = element.elements["default"].text
|
129
|
+
|
130
|
+
varname = File.basename(element.elements["key"].text)
|
131
|
+
type = element.elements["type"].text
|
132
|
+
|
133
|
+
if (type == "list") || (type == "pair")
|
134
|
+
ary = default[1..-2].split(",")
|
156
135
|
next if ary.empty?
|
157
|
-
|
158
|
-
|
136
|
+
|
137
|
+
case type
|
138
|
+
when "list"
|
139
|
+
list_type = element.elements["list_type"].text
|
159
140
|
ary.map! { |x| convert_with_type(x, list_type) }
|
160
|
-
|
141
|
+
when "pair"
|
161
142
|
next if ary.length != 2
|
143
|
+
|
162
144
|
ary[0] = convert_with_type(ary[0],
|
163
|
-
element.elements[
|
145
|
+
element.elements["car_type"].text)
|
164
146
|
ary[1] = convert_with_type(ary[1],
|
165
|
-
element.elements[
|
147
|
+
element.elements["cdr_type"].text)
|
166
148
|
end
|
167
149
|
default = ary.inspect
|
168
150
|
else
|
169
151
|
default = convert_with_type(default, type).inspect.to_s
|
170
152
|
end
|
171
153
|
|
172
|
-
generated_lines << varname.inspect +
|
154
|
+
generated_lines << varname.inspect + " => " + default
|
173
155
|
end
|
174
156
|
|
175
157
|
generate(f.name) do
|
176
|
-
|
177
|
-
module Alexandria
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
end
|
184
|
-
EOS
|
158
|
+
<<~EOS
|
159
|
+
module Alexandria
|
160
|
+
class Preferences
|
161
|
+
DEFAULT_VALUES = {
|
162
|
+
#{generated_lines.join(",\n ")}
|
163
|
+
}
|
164
|
+
end
|
165
|
+
end
|
166
|
+
EOS
|
185
167
|
end
|
186
168
|
end
|
187
169
|
|
188
|
-
autogenerated_files = [
|
189
|
-
'lib/alexandria/default_preferences.rb']
|
170
|
+
autogenerated_files = ["lib/alexandria/default_preferences.rb"]
|
190
171
|
|
191
|
-
desc
|
172
|
+
desc "Generate ruby files needed for the installation"
|
192
173
|
task autogen: autogenerated_files
|
193
174
|
|
194
175
|
task :autogen_clobber do |_t|
|
@@ -217,13 +198,13 @@ end
|
|
217
198
|
|
218
199
|
Rake::PackageTask.new(PROJECT, Alexandria::DISPLAY_VERSION) do |p|
|
219
200
|
p.need_tar_gz = true
|
220
|
-
p.package_files.include(
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
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/**/*")
|
227
208
|
end
|
228
209
|
|
229
210
|
task tgz: [:build] do
|
@@ -234,34 +215,37 @@ end
|
|
234
215
|
|
235
216
|
task pre_install: [:build]
|
236
217
|
task :scrollkeeper do
|
237
|
-
unless system(
|
238
|
-
raise
|
218
|
+
unless system("which scrollkeeper-update")
|
219
|
+
raise "scrollkeeper-update cannot be found, is Scrollkeeper correctly installed?"
|
239
220
|
end
|
240
|
-
|
221
|
+
|
222
|
+
system("scrollkeeper-update -q") || raise("Scrollkeeper update failed")
|
241
223
|
end
|
242
224
|
|
243
225
|
task :gconf do
|
244
|
-
return if ENV[
|
226
|
+
return if ENV["GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL"]
|
245
227
|
|
246
|
-
|
228
|
+
unless system("which gconftool-2")
|
229
|
+
raise "gconftool-2 cannot be found, is GConf2 correctly installed?"
|
230
|
+
end
|
247
231
|
|
248
|
-
ENV[
|
249
|
-
Dir[
|
232
|
+
ENV["GCONF_CONFIG_SOURCE"] = `gconftool-2 --get-default-source`.chomp
|
233
|
+
Dir["schemas/*.schemas"].each do |schema|
|
250
234
|
system("gconftool-2 --makefile-install-rule '#{schema}'")
|
251
235
|
end
|
252
236
|
# system("killall -HUP gconfd-2")
|
253
237
|
end
|
254
238
|
|
255
239
|
task :update_icon_cache do
|
256
|
-
system(
|
240
|
+
system("gtk-update-icon-cache -f -t /usr/share/icons/hicolor") # HACK
|
257
241
|
end
|
258
242
|
|
259
243
|
task post_install: [:scrollkeeper, :gconf, :update_icon_cache]
|
260
244
|
|
261
|
-
desc
|
245
|
+
desc "Install Alexandria"
|
262
246
|
task install: [:pre_install, :install_package, :post_install]
|
263
247
|
|
264
|
-
desc
|
248
|
+
desc "Uninstall Alexandria"
|
265
249
|
task uninstall: [:uninstall_package] # TODO: gconf etc...
|
266
250
|
|
267
|
-
task default: [:spec
|
251
|
+
task default: [:spec]
|