inqlude 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -13,7 +13,7 @@ Libraries are described by manifest files, which are maintained in a separate
13
13
  git repository. Inqlude integrates with this git repository and uses it as the
14
14
  list of available gems. One way to contribute information about libraries to the
15
15
  archive is to simply provide patches to the manifest repository. The repository
16
- can be found at https://github.com/cornelius/inqlude_data.
16
+ can be found at https://github.com/cornelius/inqlude-data.
17
17
 
18
18
  Inqlude also integrates with native package managers. If the meta information is
19
19
  available, the libraries are transparently handled by installing packages with
data/TODO CHANGED
@@ -1,18 +1,42 @@
1
- * Correctly read manifests, if there are multiple versions
2
- * Smarter match for source RPMs, which contain more than one library
3
- * Show documentation of an library
4
- * Add "How to use" data
1
+ # Alpha (first announcement, ready for early adopters)
2
+
3
+ * Update get involved
4
+
5
+ # Beta (ready for contributors of meta data)
6
+
7
+ * Document manifest format
5
8
  * Define maturity scale
9
+ * State policy for inclusion of libraries (at least one stable release, no qt3,
10
+ open source, provides a Qt API, published API docs)
11
+ * Handle binding consistently (suffix -qt, common description, maybe special
12
+ tags in meta data for bound library)
13
+
14
+ * Check validity of links
15
+ * Add option to verify given manifest
16
+ * Add show option for showing library details
17
+
18
+ * Look for latest versions of libraries
19
+ * Make sure all manifests have a download link
20
+ * Add links to upstream source code repositories for all libraries
21
+
22
+ * Add download section on library page with source code download and links to
23
+ packages e.g. openSUSE 1-click install
24
+ * Show release date on library page
25
+ * Add page with older versions of each library
26
+
27
+ # 1.0 (ready for end users of the web site)
28
+
29
+ * Add "How to use" data
30
+ * Add tags for searching
31
+ * Update manifest data to have complete package data
32
+ * Check existence of packages
33
+
34
+ # Later (ready for end users of the command line tool)
35
+
36
+ * Smarter match for source RPMs, which contain more than one library
6
37
  * Retrieve data from qt-apps and kde-apps
7
38
  * "How to package libraries"
8
- * Add tags for searching
9
39
  * Look for local search
10
40
  * Get manifests from build service
11
- * Add option to verify given or all manifests
12
- * Add show option for showing library details
13
41
  * List libraries with available packages
14
- * Update manifest data to have complete package data
15
42
  * Properly identify repository (use vendor?)
16
- * One-click install for SUSE systems
17
- * Contribute back package description changes
18
- * Document manifest format
data/data/manifest.patch CHANGED
@@ -8,7 +8,9 @@ index 90561d7..489d6f5 100644
8
8
  "version": "3.2.2",
9
9
  - "summary": "KLatexFormula backend library (Qt4)",
10
10
  + "summary": "KLatexFormula backend library (Qt3)",
11
- "homepage": "http://klatexformula.sourceforge.net/",
11
+ "urls": {
12
+ "homepage": "http://klatexformula.sourceforge.net/"
13
+ },
12
14
  "licenses": ["GPLv2+"],
13
15
  - "description": "A C++/Qt library to generate images (PNG, EPS, PDF, plus all Qt-supported image\nformats) from LaTeX equations.\n\nThis library implements the base functionality of KLatexFormula. This library\nis compiled for Qt 4.\n\nSee also packages klatexformula and libklfbackend-qt3.\n",
14
16
  + "description": "A C++/Qt library to generate images (PNG, EPS, PDF, plus all Qt-supported image\nformats) from LaTeX equations.\n\nThis library implements the base functionality of KLatexFormula. This library\nis compiled for Qt 3.\n\nSee also packages klatexformula.\n",
@@ -0,0 +1,21 @@
1
+ commit 75c93f7107d88f919df55dea05818c6d43ef6897
2
+ Author: Cornelius Schumacher <schumacher@kde.org>
3
+ Date: Wed Sep 28 17:08:49 2011 +0200
4
+
5
+ Add API docs and source code link.
6
+
7
+ diff --git a/qjson/qjson.1970-01-01.manifest b/qjson/qjson.1970-01-01.manifest
8
+ index c1d5011..6c0eb9f 100644
9
+ --- a/qjson/qjson.1970-01-01.manifest
10
+ +++ b/qjson/qjson.1970-01-01.manifest
11
+ @@ -5,7 +5,9 @@
12
+ "version": "0.7.1",
13
+ "summary": "Development files for QJson",
14
+ "urls": {
15
+ - "homepage": "http://qjson.sourceforge.net/"
16
+ + "homepage": "http://qjson.sourceforge.net/",
17
+ + "api_docs": "http://qjson.sourceforge.net/docs/index.html",
18
+ + "vcs": "https://gitorious.org/qjson"
19
+ },
20
+ "licenses": ["LGPL"],
21
+ "description": "JSON (JavaScript Object Notation) is a lightweight data-interchange format.\nIt can represent integer, real number, string, an ordered sequence of value,\nand a collection of name/value pairs. QJson is a qt-based library that maps\nJSON data to QVariant objects. JSON arrays will be mapped to QVariantList\ninstances, while JSON's objects will be mapped to QVariantMap.\n\nThis package contains files for developing applications using QJson.\n\n",
data/lib/cli.rb CHANGED
@@ -52,12 +52,14 @@ class Cli < Thor
52
52
  method_option :remote, :type => :boolean, :aliases => "-r",
53
53
  :desc => "List remote libraries"
54
54
  def list
55
+ process_global_options options
56
+
55
57
  handler = ManifestHandler.new @@settings
56
58
  handler.read_remote
57
59
 
58
60
  if options[:remote]
59
- handler.manifests.each do |manifest|
60
- puts manifest["name"] + "-" + manifest["version"]
61
+ handler.libraries.each do |library|
62
+ puts library.name + " (" + library.versions.join(", ") + ")"
61
63
  end
62
64
  else
63
65
  manifests = @@distro.installed handler
@@ -71,12 +73,16 @@ class Cli < Thor
71
73
  method_option :output_dir, :type => :string, :aliases => "-o",
72
74
  :desc => "Output directory", :required => true
73
75
  method_option :enable_disqus, :type => :boolean,
74
- :desc => "Enable Disqus based comments on generate web pages. Works only on actual domain."
76
+ :desc => "Enable Disqus based comments on generate web pages. Works only on
77
+ actual domain."
78
+ method_option :disable_search, :type => :boolean,
79
+ :desc => "Disable Google based search."
75
80
  def view
76
81
  process_global_options options
77
82
 
78
83
  view = View.new ManifestHandler.new @@settings
79
84
  view.enable_disqus = options[:enable_disqus]
85
+ view.enable_search = !options[:disable_search]
80
86
  view.create options[:output_dir]
81
87
  end
82
88
 
@@ -87,7 +93,25 @@ class Cli < Thor
87
93
 
88
94
  desc "verify", "Verify manifests"
89
95
  def verify
90
- Upstream.get_involved "Add command for verifying manifests", 2
96
+ process_global_options options
97
+
98
+ v = Verifier.new @@settings
99
+
100
+ handler = ManifestHandler.new @@settings
101
+ handler.read_remote
102
+ count_ok = 0
103
+ count_error = 0
104
+ handler.libraries.each do |library|
105
+ library.manifests.each do |manifest|
106
+ if v.verify manifest
107
+ count_ok += 1
108
+ else
109
+ count_error += 1
110
+ end
111
+ end
112
+ end
113
+ puts "#{handler.manifests.count} manifests checked. #{count_ok} ok, " +
114
+ "#{count_error} with error."
91
115
  end
92
116
 
93
117
  desc "create", "Create manifest"
@@ -129,13 +153,15 @@ class Cli < Thor
129
153
  end
130
154
 
131
155
  desc "install", "Install library"
156
+ method_option :dry_run, :type => :boolean,
157
+ :desc => "Only show what would happen, don't install anything."
132
158
  def install name
133
159
  handler = ManifestHandler.new @@settings
134
160
  manifest = handler.manifest name
135
161
  if !manifest
136
162
  STDERR.puts "Manifest for '#{name}' not found"
137
163
  else
138
- @@distro.install manifest
164
+ @@distro.install manifest, :dry_run => options[:dry_run]
139
165
  end
140
166
  end
141
167
 
data/lib/distros/suse.rb CHANGED
@@ -72,10 +72,14 @@ class Suse
72
72
  end
73
73
  end
74
74
 
75
- def install manifest
75
+ def install manifest, options = {}
76
76
  package_name = get_package_name manifest
77
+ cmd_options = Array.new
78
+ if options[:dry_run]
79
+ cmd_options.push "--dry-run"
80
+ end
77
81
  if package_name
78
- system "sudo zypper install #{package_name}"
82
+ system "sudo zypper install #{cmd_options.join(" ")} #{package_name}"
79
83
  end
80
84
  end
81
85
 
data/lib/inqlude.rb CHANGED
@@ -13,3 +13,5 @@ require File.expand_path('../distro', __FILE__)
13
13
  require File.expand_path('../rpm_manifestizer', __FILE__)
14
14
  require File.expand_path('../settings', __FILE__)
15
15
  require File.expand_path('../upstream', __FILE__)
16
+ require File.expand_path('../verifier', __FILE__)
17
+ require File.expand_path('../library', __FILE__)
data/lib/library.rb ADDED
@@ -0,0 +1,10 @@
1
+ class Library
2
+
3
+ attr_accessor :name
4
+ attr_accessor :manifests
5
+
6
+ def versions
7
+ versions = @manifests.map { |m| m["version"] }
8
+ end
9
+
10
+ end
@@ -16,19 +16,20 @@
16
16
 
17
17
  class ManifestHandler
18
18
 
19
- attr_reader :manifests
19
+ attr_reader :manifests, :libraries
20
20
 
21
21
  def initialize settings
22
22
  @settings = settings
23
-
23
+
24
+ @libraries = Array.new
24
25
  @manifests = Array.new
25
26
  end
26
27
 
27
28
  def manifest name
28
29
  read_remote
29
- @manifests.each do |manifest|
30
- if manifest["name"] == name
31
- return manifest
30
+ @libraries.each do |library|
31
+ if library.name == name
32
+ return library.manifests.last
32
33
  end
33
34
  end
34
35
  nil
@@ -38,11 +39,24 @@ class ManifestHandler
38
39
  if !@settings.offline
39
40
  fetch_remote
40
41
  end
41
-
42
- Dir.glob( "#{@settings.manifest_path}/*/*.manifest" ).sort.each do |filename|
43
- File.open filename do |file|
44
- manifests.push JSON file.read
42
+
43
+ Dir.glob( "#{@settings.manifest_path}/*" ).sort.each do |dirname|
44
+ next if !File.directory?( dirname )
45
+
46
+ library = Library.new
47
+ library.name = File.basename dirname
48
+ local_manifests = Array.new
49
+ Dir.glob( "#{dirname}/*.manifest" ).sort.each do |filename|
50
+ File.open filename do |file|
51
+ manifest = JSON file.read
52
+ manifest["filename"] = File.basename filename
53
+ manifest["libraryname"] = library.name
54
+ local_manifests.push manifest
55
+ manifests.push manifest
56
+ end
45
57
  end
58
+ library.manifests = local_manifests
59
+ libraries.push library
46
60
  end
47
61
  end
48
62
 
@@ -84,13 +84,16 @@ class RpmManifestizer
84
84
  f2.puts ' "schema_version": 1,'
85
85
  f2.puts " \"name\": \"#{name}\","
86
86
  f2.puts " \"release_date\": \"#{release_date}\","
87
- [ "version", "summary", "homepage" ].each do |key|
88
- f2.puts " \"#{key}\": \"#{headers[key]}\","
89
- end
87
+ f2.puts " \"version\": \"#{headers["version"]}\","
88
+ f2.puts " \"summary\": \"#{headers["summary"]}\","
89
+ f2.puts ' "urls": {'
90
+ f2.puts " \"homepage\": \"#{headers["homepage"]}\""
91
+ f2.puts ' },'
90
92
  f2.puts " \"licenses\": [#{licenses_string}],"
91
93
  f2.puts " \"description\": \"#{description}\","
92
94
  f2.puts ' "authors": [' + authors.join(",") + '],'
93
95
  f2.puts ' "maturity": "stable",'
96
+ f2.puts ' "platforms": [ "Linux" ],'
94
97
  f2.puts ' "packages": {'
95
98
  f2.puts ' "openSUSE": {'
96
99
  f2.puts ' "11.4": {'
@@ -188,6 +191,11 @@ class RpmManifestizer
188
191
  cmd = "cd #{@settings.manifest_path}; patch -p1 <#{patch}";
189
192
  puts "Patching manifests with #{patch}"
190
193
  system cmd
194
+
195
+ patch = @settings.data_path + "/manifest2.patch"
196
+ cmd = "cd #{@settings.manifest_path}; patch -p1 <#{patch}";
197
+ puts "Patching manifests with #{patch}"
198
+ system cmd
191
199
  end
192
200
  end
193
201
 
data/lib/upstream.rb CHANGED
@@ -32,7 +32,7 @@ class Upstream
32
32
  puts
33
33
  puts "If you would like to contribute information about a Qt based"
34
34
  puts "library, have a look at the git repository containing the library"
35
- puts "meta data: https://github.com/cornelius/inqlude_data"
35
+ puts "meta data: https://github.com/cornelius/inqlude-data"
36
36
  puts
37
37
  puts "Your help is appreciated."
38
38
  puts
data/lib/verifier.rb ADDED
@@ -0,0 +1,62 @@
1
+ # Copyright (C) 2011 Cornelius Schumacher <schumacher@kde.org>
2
+ #
3
+ # This program is free software; you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation; either version 2 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License along
14
+ # with this program; if not, write to the Free Software Foundation, Inc.,
15
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
+
17
+ class Verifier
18
+
19
+ def initialize settings
20
+ @settings = settings
21
+
22
+ @allowed_keys = [ "schema_version", "name", "version", "release_date",
23
+ "summary", "urls", "licenses", "description", "authors", "maturity",
24
+ "platforms", "packages", "keywords", "dependencies", "filename",
25
+ "libraryname" ]
26
+ end
27
+
28
+ def verify manifest
29
+ @errors = Array.new
30
+
31
+ filename = manifest["filename"]
32
+ expected_filename = "#{manifest["libraryname"]}.#{manifest["release_date"]}.manifest"
33
+
34
+ print "Verify manifest #{filename}..."
35
+
36
+ if filename != expected_filename
37
+ @errors.push "Expected file name: #{expected_filename}"
38
+ end
39
+
40
+ if manifest["release_date"] == "1970-01-01"
41
+ @errors.push "Invalid release date: #{manifest["release_date"]}"
42
+ end
43
+
44
+ manifest.keys.each do |key|
45
+ if !@allowed_keys.include? key
46
+ @errors.push "Illegal entry: #{key}"
47
+ end
48
+ end
49
+
50
+ if @errors.empty?
51
+ puts "ok"
52
+ return true
53
+ else
54
+ puts "error"
55
+ @errors.each do |error|
56
+ puts " #{error}"
57
+ end
58
+ return false
59
+ end
60
+ end
61
+
62
+ end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Inqlude
2
2
 
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
 
5
5
  end
data/lib/view.rb CHANGED
@@ -17,7 +17,9 @@
17
17
  class View
18
18
 
19
19
  attr_accessor :enable_disqus
20
-
20
+ attr_accessor :enable_search
21
+ attr_reader :root
22
+
21
23
  def initialize handler
22
24
  @manifest_handler = handler
23
25
  end
@@ -34,15 +36,17 @@ class View
34
36
  render_template "about", output_dir
35
37
  render_template "get", output_dir
36
38
  render_template "contribute", output_dir
39
+ render_template "search", output_dir
37
40
 
38
41
  library_path = "#{output_dir}/libraries/"
39
42
  assert_dir library_path
40
43
 
41
44
  @root = "../"
42
45
 
43
- manifests.each do |manifest|
44
- @manifest = manifest
45
- file_name = "libraries/" + manifest["name"]
46
+ @manifest_handler.libraries.each do |library|
47
+ @library = library
48
+ @manifest = library.manifests.last
49
+ file_name = "libraries/" + library.name
46
50
  render_template "library", output_dir, file_name
47
51
  end
48
52
  end
@@ -74,8 +78,12 @@ class View
74
78
  "<link href='#{@root}public/inqlude.css' rel='stylesheet' type='text/css' />"
75
79
  end
76
80
 
77
- def m attr
78
- @manifest[ attr ]
81
+ def m attr, subattr = nil
82
+ if subattr
83
+ @manifest[ attr ][ subattr ]
84
+ else
85
+ @manifest[ attr ]
86
+ end
79
87
  end
80
88
 
81
89
  def link_to_manifest name
@@ -93,17 +101,101 @@ class View
93
101
  "<a href=\"#{url}\">#{title}</a>"
94
102
  end
95
103
 
96
- def manifests
97
- if @manifest_handler.manifests.empty?
104
+ def list_attribute attribute
105
+ attr = m attribute
106
+ return "" if !attr || attr.size == 0
107
+
108
+ # We assume attribute is plural formed by adding an 's'
109
+
110
+ label = attribute.capitalize
111
+
112
+ entries = Array.new
113
+ attr.each do |a|
114
+ entries.push markup_email( a )
115
+ end
116
+
117
+ out = "<p>"
118
+ if attr.size > 1
119
+ out += label + ": " + entries.join(", ")
120
+ else
121
+ out += label[0..-2] + ": " + entries.first
122
+ end
123
+ out += "</p>"
124
+
125
+ out
126
+ end
127
+
128
+ def markup_email email
129
+ if email =~ /(.*) <(.*)>/
130
+ name = $1
131
+ email = $2
132
+
133
+ return "<a href=\"mailto:#{email}\">#{name}</a>"
134
+ else
135
+ return email
136
+ end
137
+ end
138
+
139
+ def link_item key, label
140
+ if m( "urls", key )
141
+ out = "<li><a href=\""
142
+ out += m( "urls", key )
143
+ out += "\">#{label}</a>"
144
+ return out
145
+ else
146
+ return ""
147
+ end
148
+ end
149
+
150
+ def custom_urls
151
+ out = ""
152
+ urls = m "urls", "custom"
153
+ if urls && !urls.empty?
154
+ urls.each do |text,url|
155
+ out += "<li><a href=\"#{url}\">#{text}</a></li>"
156
+ end
157
+ end
158
+ out
159
+ end
160
+
161
+ def libraries
162
+ if @manifest_handler.libraries.empty?
98
163
  @manifest_handler.read_remote
99
164
  end
100
- @manifest_handler.manifests
165
+ @manifest_handler.libraries
101
166
  end
102
167
 
103
168
  def disqus_enabled?
104
169
  @enable_disqus
105
170
  end
106
171
 
172
+ def more_urls?
173
+ if @manifest["urls"]
174
+ @manifest["urls"].each do |name,url|
175
+ if name != "homepage" && name != "screenshots" && name != "logo" && name != "description_source"
176
+ return true
177
+ end
178
+ end
179
+ end
180
+ return false
181
+ end
182
+
183
+ def editor_url
184
+ url = "https://github.com/cornelius/inqlude-data/blob/master/"
185
+ url += @manifest["name"]
186
+ url += "/#{@manifest["name"]}.#{@manifest["release_date"]}.manifest"
187
+ url
188
+ end
189
+
190
+ def old_versions
191
+ versions = Array.new
192
+ count = @library.manifests.count
193
+ if count > 1
194
+ versions = @library.manifests[0..count-2].map {|m| m["version"] }
195
+ end
196
+ versions.reverse
197
+ end
198
+
107
199
  private
108
200
 
109
201
  def assert_dir name
@@ -0,0 +1,19 @@
1
+ require File.expand_path('../test_helper', __FILE__)
2
+
3
+ class LibraryTest < Test::Unit::TestCase
4
+
5
+ def test_versions
6
+ versions = [ "1.0", "2.0" ]
7
+
8
+ manifests = Array.new
9
+ versions.each do |version|
10
+ manifests.push create_manifest "mylib", version
11
+ end
12
+
13
+ library = Library.new
14
+ library.manifests = manifests
15
+
16
+ assert_equal versions, library.versions
17
+ end
18
+
19
+ end
data/test/test_helper.rb CHANGED
@@ -1,3 +1,11 @@
1
1
  require File.expand_path('../../lib/inqlude',__FILE__)
2
2
 
3
3
  require 'test/unit'
4
+
5
+ def create_manifest name, version
6
+ m = Hash.new
7
+ m["name"] = name
8
+ m["version"] = version
9
+ m["description"] = "#{name} is a nice library."
10
+ m
11
+ end
data/view/about.html.haml CHANGED
@@ -1,21 +1,28 @@
1
1
  %p
2
- Inqlude is the independent archive of Qt based libraries. Its mission is
3
- to make it as easy as possible for developers using Qt to find and use
4
- libraries, in particular 3rd party ones.
2
+ The goal of Inqlude is to provide a comprehensive listing of all
3
+ existing libraries for developers of Qt applications. If you are creating
4
+ applications using the Qt toolkit, and are looking for libraries, components
5
+ or modules to use, Inqlude is the place where you find all information and
6
+ pointers to get started.
5
7
  %p
6
8
  Inqlude comes with a command line client for handling libraries. See the
7
9
  = link_to "instructions how to get libraries", "get"
8
10
  for more details.
9
11
  %p
10
- Inqlude tries to be a complete archive of all available Qt based
12
+ Inqlude aims to be a complete archive of all available Qt based
11
13
  libraries. If you notice that there is some information missing, outdated
12
14
  or inaccurate, please consider contributing the missing data. See the
13
15
  = link_to "instructions how to contribute", "contribute"
14
16
  for more details.
15
17
  %p
16
18
  %em
17
- Note that Inqlude is currently a proof-of-concept. It's not ready for
18
- production use yet. Feedback and input is appreciated.
19
+ Note that Inqlude is currently in alpha state. It's not ready for full
20
+ production use yet. Data is still incomplete, and the tools are
21
+ limited. Feedback and input is appreciated.
19
22
  %p
20
- If you have questions of comments please feel free to contact
21
- = link_to( "Cornelius Schumacher", "mailto:schumacher@kde.org" ) + "."
23
+ If you have questions of comments please feel free to write to the Inqlude
24
+ mailing list #{link_to "inqlude@kde.org", "mailto:inqlude@kde.org"}.
25
+ %p
26
+ Inqlude was created by
27
+ = link_to "Cornelius Schumacher", "mailto:schumacher@kde.org"
28
+ with the help of many others, and is a proud member of the KDE family.
@@ -7,12 +7,12 @@
7
7
  packages.
8
8
  %p
9
9
  The meta data used by Inqlude is collected in a git repository at
10
- = link( "http://github.com/cornelius/inqlude_data" ) + "."
10
+ = link( "http://github.com/cornelius/inqlude-data" ) + "."
11
11
  It contains a manifest file in JSON format for each library, which has the
12
12
  meta data in a structured machine-readable form. JSON is easy enough for
13
13
  humans to read and edit as well.
14
14
  %p
15
- You can contribute meta data by providing patches to the inqlude_data
15
+ You can contribute meta data by providing patches to the inqlude-data
16
16
  repository. Use the github mechanisms or just send patches by email.
17
17
  Contributions are welcome.
18
18
 
@@ -30,3 +30,9 @@
30
30
  package systems on the variety of Linux distributions and other systems
31
31
  out there.
32
32
 
33
+ %h2 Mailing list
34
+
35
+ %p
36
+ If you want to discuss any aspects of Inqlude, get in contact to us, have
37
+ questions, or want to contribute in any other way, the best way is to use the
38
+ mailing list #{link_to "inqlude@kde.org", "https://mail.kde.org/mailman/listinfo/inqlude"}.
data/view/get.html.haml CHANGED
@@ -3,8 +3,9 @@
3
3
  based libraries in her projects.
4
4
  %p
5
5
  First you can just use the web site. Find the information about libraries
6
- here, and get the libraries manually with the provided links. This works,
7
- but there is a more convenient way.
6
+ here, and get the libraries using the provided links. This works and is the
7
+ recommended way for now, but there is an experimental, but more convenient
8
+ way.
8
9
  %p
9
10
  You can also use the command line client. This client makes it easy to get
10
11
  the libraries you need with just a few commands, without having to know
@@ -27,7 +28,7 @@
27
28
 
28
29
  install a library with
29
30
  .code
30
- inqlude install <library_name>
31
+ inqlude install &lt;library_name&gt;
31
32
 
32
33
  and get a list of installed libraries with
33
34
  .code
data/view/index.html.haml CHANGED
@@ -1,7 +1,23 @@
1
+ %p
2
+ The goal of Inqlude is to provide a comprehensive listing of all
3
+ existing libraries for developers of Qt applications. If you are creating
4
+ applications using the Qt toolkit, and are looking for libraries, components
5
+ or modules to use, Inqlude is the place where you find all information and
6
+ pointers to get started.
7
+ %p
8
+ This is a young project, we are still collecting information, and are
9
+ building up the web site and the tools around it. If you would like to get
10
+ involved, read more about #{link_to "how to contribute", "contribute"}, or go
11
+ to the mailing list
12
+ = link_to "inqlude.kde.org", "https://mail.kde.org/mailman/listinfo/inqlude"
13
+ to directly talk to us. See you there.
14
+
15
+ %h2 All libraries
16
+
1
17
  %table
2
- - manifests.each do |manifest|
18
+ - libraries.each do |library|
3
19
  %tr
4
20
  %td.first
5
- = link_to_manifest manifest["name"]
21
+ = link_to_manifest library.name
6
22
  %td.last
7
- = manifest["summary"]
23
+ = library.manifests.last["summary"]
@@ -1,7 +1,13 @@
1
1
  %head
2
2
  = style_sheet
3
- <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
3
+ - if enable_search
4
+ <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
5
+ <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
6
+ <script src="http://www.google.com/jsapi" type="text/javascript"></script>
4
7
  %body
8
+ .ribbon
9
+ = link_to "Alpha", "about"
10
+
5
11
  .header.center
6
12
  %h1
7
13
  %span.logo><
@@ -23,6 +29,10 @@
23
29
  |
24
30
  = link_to "About", "about"
25
31
 
32
+ - if enable_search
33
+ #cse-search-form Loading...
34
+
35
+
26
36
  .content.center
27
37
  = yank
28
38
 
@@ -33,3 +43,20 @@
33
43
  Last updated on #{Date.today}
34
44
 
35
45
  %br{ :clear => "all" }
46
+
47
+ .legal
48
+ Inqlude is a
49
+ = link_to "KDE project", "http://kde.org"
50
+ = "|"
51
+ = link_to "Legal", "http://www.kde.org/community/whatiskde/impressum.php"
52
+
53
+ - if enable_search
54
+ :javascript
55
+ google.load('search', '1', {language : 'en'});
56
+ google.setOnLoadCallback(function() {
57
+ var customSearchControl = new google.search.CustomSearchControl('012526638842992167133:g7thmrlp2uw');
58
+ customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
59
+ var options = new google.search.DrawOptions();
60
+ options.enableSearchboxOnly("#{root}search.html");
61
+ customSearchControl.draw('cse-search-form', options);
62
+ }, true);
@@ -5,6 +5,10 @@
5
5
  %em
6
6
  Version
7
7
  = m "version"
8
+ = "(#{m "maturity"})"
9
+ - if !old_versions.empty?
10
+ %span{:class => "old-versions"}
11
+ = "(older versions: #{old_versions.join(", ")})"
8
12
 
9
13
  %p
10
14
  = m "summary"
@@ -12,8 +16,27 @@
12
16
  %p
13
17
  = m "description"
14
18
 
19
+ = list_attribute "licenses"
20
+ = list_attribute "platforms"
21
+ = list_attribute "authors"
22
+
15
23
  %p
16
- = link m( "homepage" )
24
+ = link m( "urls", "homepage" )
25
+
26
+ - if more_urls?
27
+ %h3 Read more
28
+ %ul
29
+ = link_item "api_docs", "API documentation"
30
+ = link_item "readme", "README"
31
+ = link_item "tutorial", "Tutorial"
32
+ = link_item "download", "Download source"
33
+ = link_item "vcs", "Source code repository"
34
+ = custom_urls
35
+
36
+ %p{:class => "edit-link"}
37
+ = link_to "[Edit]", editor_url
38
+
39
+ %br{:clear => "all"}
17
40
 
18
41
  - if disqus_enabled?
19
42
  %hr
@@ -4,6 +4,29 @@ body {
4
4
  font-family: 'Droid Sans', arial, serif;
5
5
  }
6
6
 
7
+ .ribbon {
8
+ background-color: #a00;
9
+ overflow: hidden;
10
+ position: absolute;
11
+ left: -2em;
12
+ top: 1em;
13
+ -moz-transform: rotate(-45deg);
14
+ -webkit-transform: rotate(-45deg);
15
+ -moz-box-shadow: 0 0 1em #888;
16
+ -webkit-box-shadow: 0 0 1em #888;
17
+ }
18
+ .ribbon a {
19
+ border: 1px solid #faa;
20
+ color: #fff;
21
+ display: block;
22
+ font: bold 81.25% 'Helvetiva Neue', Helvetica, Arial, sans-serif;
23
+ margin: 0.05em 0 0.075em 0;
24
+ padding: 0.5em 3.5em;
25
+ text-align: center;
26
+ text-decoration: none;
27
+ text-shadow: 0 0 0.5em #444;
28
+ }
29
+
7
30
  .center {
8
31
  margin-left: auto;
9
32
  margin-right: auto;
@@ -32,6 +55,10 @@ h1 .subtitle {
32
55
  padding-left: 12px;
33
56
  }
34
57
 
58
+ h2 {
59
+ text-align: center;
60
+ }
61
+
35
62
  .header {
36
63
  width: 80%;
37
64
  background-color: white;
@@ -43,8 +70,16 @@ h1 .subtitle {
43
70
  background-color: green;
44
71
  padding-top: 4px;
45
72
  padding-bottom: 6px;
46
- padding-right: 10px;
47
- text-align: right;
73
+ padding-left: 10px;
74
+ text-align: left;
75
+ }
76
+
77
+ #cse-search-form {
78
+ float: right;
79
+ width: 250px;
80
+ }
81
+ #cse {
82
+ width: 90%;
48
83
  }
49
84
 
50
85
  .menu_items {
@@ -69,6 +104,10 @@ h1 .subtitle {
69
104
  margin: 6px;
70
105
  }
71
106
 
107
+ .old-versions {
108
+ font-size: 80%;
109
+ }
110
+
72
111
  table {
73
112
  margin: auto;
74
113
  }
@@ -81,3 +120,14 @@ td {
81
120
  .footer {
82
121
  float: right;
83
122
  }
123
+
124
+ .edit-link {
125
+ float: right;
126
+ font-size: 80%;
127
+ }
128
+
129
+ .legal {
130
+ margin: 4px;
131
+ text-align: center;
132
+ font-size: 70%;
133
+ }
@@ -0,0 +1,31 @@
1
+ %h2
2
+ Search results
3
+
4
+ #cse
5
+ Loading
6
+
7
+ :javascript
8
+ function parseQueryFromUrl () {
9
+ var queryParamName = "q";
10
+ var search = window.location.search.substr(1);
11
+ var parts = search.split('&');
12
+ for (var i = 0; i < parts.length; i++) {
13
+ var keyvaluepair = parts[i].split('=');
14
+ if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {
15
+ return decodeURIComponent(keyvaluepair[1].replace(/\+/g, ' '));
16
+ }
17
+ }
18
+ return '';
19
+ }
20
+ google.load('search', '1', {language : 'en'});
21
+ google.setOnLoadCallback(function() {
22
+ var customSearchControl = new google.search.CustomSearchControl('012526638842992167133:g7thmrlp2uw');
23
+ customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
24
+ var options = new google.search.DrawOptions();
25
+ options.enableSearchResultsOnly();
26
+ customSearchControl.draw('cse',options);
27
+ var queryFromUrl = parseQueryFromUrl();
28
+ if (queryFromUrl) {
29
+ customSearchControl.execute(queryFromUrl);
30
+ }
31
+ }, true);
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inqlude
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cornelius Schumacher
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-27 00:00:00 +02:00
18
+ date: 2011-10-27 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -99,18 +99,22 @@ files:
99
99
  - TODO
100
100
  - bin/inqlude
101
101
  - data/manifest.patch
102
+ - data/manifest2.patch
102
103
  - examples/qjson.manifest
103
104
  - inqlude.gemspec
104
105
  - lib/cli.rb
105
106
  - lib/distro.rb
106
107
  - lib/distros/suse.rb
107
108
  - lib/inqlude.rb
109
+ - lib/library.rb
108
110
  - lib/manifest_handler.rb
109
111
  - lib/rpm_manifestizer.rb
110
112
  - lib/settings.rb
111
113
  - lib/upstream.rb
114
+ - lib/verifier.rb
112
115
  - lib/version.rb
113
116
  - lib/view.rb
117
+ - test/library_test.rb
114
118
  - test/rpm_manifestizer_test.rb
115
119
  - test/test_helper.rb
116
120
  - view/about.html.haml
@@ -120,6 +124,7 @@ files:
120
124
  - view/layout.html.haml
121
125
  - view/library.html.haml
122
126
  - view/public/inqlude.css
127
+ - view/search.html.haml
123
128
  has_rdoc: true
124
129
  homepage: https://github.com/cornelius/inqlude
125
130
  licenses: []