lknovel 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/Gemfile +1 -0
- data/README.md +4 -0
- data/lib/lknovel/app.rb +0 -1
- data/lib/lknovel/image.rb +2 -1
- data/lib/lknovel/meta.rb +1 -1
- data/lib/lknovel/templates/front.html.erb +2 -0
- data/test/minitest_helper.rb +6 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# Lknovel
|
2
|
+
[![Build Status](https://travis-ci.org/azuwis/ruby-lknovel.png)](https://travis-ci.org/azuwis/ruby-lknovel)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/azuwis/ruby-lknovel/badge.png)](https://coveralls.io/r/azuwis/ruby-lknovel)
|
4
|
+
[![Dependency Status](https://gemnasium.com/azuwis/ruby-lknovel.svg)](https://gemnasium.com/azuwis/ruby-lknovel)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/lknovel.png)](http://badge.fury.io/rb/lknovel)
|
2
6
|
|
3
7
|
Generate epub from http://lknovel.lightnovel.cn/
|
4
8
|
|
data/lib/lknovel/app.rb
CHANGED
data/lib/lknovel/image.rb
CHANGED
@@ -40,7 +40,8 @@ module Lknovel
|
|
40
40
|
need_crop = yield(width, height) if block_given?
|
41
41
|
cropped = false
|
42
42
|
if need_crop
|
43
|
-
|
43
|
+
success = system('convert', input, '-crop', operation, output)
|
44
|
+
if success and File.exists?(output)
|
44
45
|
cropped = true
|
45
46
|
end
|
46
47
|
end
|
data/lib/lknovel/meta.rb
CHANGED
@@ -5,7 +5,9 @@
|
|
5
5
|
<link href="<%= "../#{Lknovel::STYLESHEET_DIR}/default.css" %>" rel="stylesheet" type="text/css"/>
|
6
6
|
</head>
|
7
7
|
<body>
|
8
|
+
<% if @cover_image -%>
|
8
9
|
<img class="page-break" src="<%= "../#{Lknovel::IMAGE_DIR}/#{@cover_image}" %>">
|
10
|
+
<% end -%>
|
9
11
|
<h1>简介</h1>
|
10
12
|
<p><%= @intro %></p>
|
11
13
|
<nav epub:type="toc" id="toc">
|
data/test/minitest_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lknovel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|