module Alexandria

Copyright (C) 2004-2006 Laurent Sansonetti Copyright (C) 2008 Joseph Method Copyright (C) 2015 Matijs van Zuijlen

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Copyright (C) 2009 Cathal Mc Ginley Copyright (C) 2010 Martin Sucha

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is automatically generated by the alexandria installer. Do not edit it directly.

Provides a way for two threads to communicate via Proc objects.

Thread A can request calls, providing a Proc object and runtime arguments, and thread B can iterate through the queue and execute the first call it founds.

It is also possible to synchronize the calls (useful if a return value is required from the receiving thread).

This class does not depend of the GLib/GTK main loop idea.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

Copyright (C) 2009 Cathal Mc Ginley Copyright (C) 2014 Matijs van Zuijlen

This file is part of Alexandria.

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Scanners should respond to name(), match?(data), and decode(data). They should add an instance of themselves to the Scanner Registry on module load.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

Copyright (C) 2004-2006 Laurent Sansonetti Copyright (C) 2008 Joseph Method Copyright (C) 2016 Matijs van Zuijlen

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

Ideally this would be a subclass of GtkComboBox, but…

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

Copyright (C) 2004-2006 Laurent Sansonetti

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

This file is part of Alexandria.

See the file README.md for authorship and licensing information.

Copyright (C) 2004-2006 Laurent Sansonetti Copyright (C) 2011 Matijs van Zuijlen

Alexandria is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Alexandria is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Alexandria; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Constants

ARTISTS
AUTHORS
BUGREPORT_URL
DATA_VERSION
DESCRIPTION
DISPLAY_VERSION
DOCUMENTERS
TEXTDOMAIN
TITLE
TRANSLATORS
VERSION
WEBSITE_URL

Public Class Methods

create_logger() click to toggle source

Creates the Logger for Alexandria

# File lib/alexandria/logging.rb, line 135
def self.create_logger
  logger = Alexandria::Logger.new($stderr)

  level = ENV["LOGLEVEL"] ? ENV["LOGLEVEL"].intern : nil
  if [:FATAL, :ERROR, :WARN, :INFO, :DEBUG].include? level
    logger.level = Logger.const_get(level)
  else
    logger.level = Logger::WARN # default level
    logger.warn(self, "Unknown LOGLEVEL '#{level}'; using WARN") if level
  end

  logger
end
list_books_on_console(_title = true, authors = true) click to toggle source
# File lib/alexandria/console.rb, line 8
def self.list_books_on_console(_title = true, authors = true)
  collection = Alexandria::LibraryCollection.instance
  collection.reload
  libraries = collection.all_regular_libraries
  output_string = ""
  @books = libraries.flatten
  @books.each do |book|
    book_authors = book.authors.join(" & ") if authors
    output_string += [book.title, book_authors].join(", ") + "\n"
  end
  output_string
end
log() click to toggle source

Returns the Logger for Alexandria

# File lib/alexandria/logging.rb, line 152
def self.log
  @@logger
end
main() click to toggle source
# File lib/alexandria.rb, line 35
def self.main
  set_proxy
  set_log_level
  Alexandria::UI.main
end
set_log_level() click to toggle source
# File lib/alexandria.rb, line 30
def self.set_log_level
  log.level = Logger::DEBUG if $DEBUG
  log.debug { "Initializing Alexandria" }
end
set_proxy() click to toggle source
# File lib/alexandria.rb, line 24
def self.set_proxy
  if !ENV["http_proxy"].nil? && URI.parse(ENV["http_proxy"]).userinfo.nil?
    ENV["http_proxy"] = nil
  end
end