riven 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -8
- data/bin/riven +14 -2
- data/lib/riven/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa05e90381bb0b9fd7adb2882e108d05e495f52d
|
4
|
+
data.tar.gz: 28a6520e004ff62293249f6dd208dff89120f373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b802c9d1d5e85df1da3481da05424a7330bc3d1eced0e8727b00613fb0aeef4a2f500db81090aaf74c8a4245f538ab3e01d9c6d27f186154514b38d9a4390b9c
|
7
|
+
data.tar.gz: a2892d3acef47f7503bbbe0a0b0142fead50f820869fd99f00446871bcce51e537dd26e6176910054dee179c789738b07504951832377ce952b2f5d41cece743
|
data/README.md
CHANGED
@@ -6,13 +6,12 @@ Converts GitHub Flavored Markdown files to PDFs! Feature highlights:
|
|
6
6
|
- Syntax Highlighting with GitHub like theme
|
7
7
|
- Smart page breaks
|
8
8
|
- Smart directory based file merging
|
9
|
+
- Smart output file naming
|
9
10
|
- Page numbers (see *Prerequisites* section)
|
10
11
|
- ~~Custom CSS~~ (not finised yet, sorry)
|
11
12
|
- Covers (see *Prerequisites* section)
|
12
13
|
- Table of Contents (see *Prerequisites* section)
|
13
14
|
|
14
|
-
The gem is still under development, but it already works. In the current version the output PDF file name will always be `test.pdf`. This will change soon.
|
15
|
-
|
16
15
|
|
17
16
|
## Prerequisites
|
18
17
|
|
@@ -67,7 +66,7 @@ $ riven -o awesome.pdf example-1.md example-2.pdf
|
|
67
66
|
|
68
67
|
### A directory
|
69
68
|
|
70
|
-
This will take your `documentation` directory with all it's files and generate a `
|
69
|
+
This will take your `documentation` directory with all it's files and generate a `documentation.pdf` (the name is guessed from the directory name, but you may also specify a output file name via the `-o` param) in the same directory:
|
71
70
|
|
72
71
|
```bash
|
73
72
|
$ ls
|
@@ -80,10 +79,10 @@ chapter-3-admin-gui.md
|
|
80
79
|
chapter-4-commandline-interface.md
|
81
80
|
chapter-5-api.md
|
82
81
|
|
83
|
-
$ riven
|
82
|
+
$ riven documentation/
|
84
83
|
|
85
84
|
$ ls
|
86
|
-
|
85
|
+
documentation.pdf
|
87
86
|
documentation/
|
88
87
|
```
|
89
88
|
|
@@ -95,7 +94,7 @@ documentation/
|
|
95
94
|
You may give riven an additional CSS file with the `-s` param:
|
96
95
|
|
97
96
|
```bash
|
98
|
-
$ riven -s doc.css
|
97
|
+
$ riven -s doc.css documentation/
|
99
98
|
```
|
100
99
|
|
101
100
|
|
@@ -104,7 +103,7 @@ $ riven -s doc.css -o doc.pdf documentation/
|
|
104
103
|
You may give riven a cover MD file via the `-c` param, which will be prepended and not provided with a page number.
|
105
104
|
|
106
105
|
```bash
|
107
|
-
$ riven -c documentation/cover.md
|
106
|
+
$ riven -c documentation/cover.md documentation/
|
108
107
|
```
|
109
108
|
|
110
109
|
|
@@ -128,5 +127,5 @@ The syntax highlightning is powered by [coderay](https://github.com/rubychan/cod
|
|
128
127
|
For an automatic generated table of contents after the cover, just add the `-t` param and provide a headline for the table of contents:
|
129
128
|
|
130
129
|
```bash
|
131
|
-
$ riven -t "Contents" -c documentation/cover.md
|
130
|
+
$ riven -t "Contents" -c documentation/cover.md documentation/
|
132
131
|
```
|
data/bin/riven
CHANGED
@@ -37,8 +37,20 @@ generator = Riven::HTMLGenerator.new('_riven_tmp_file.html', markup)
|
|
37
37
|
|
38
38
|
|
39
39
|
## Step 6: Determine PDF file name
|
40
|
-
|
41
|
-
|
40
|
+
output_file = options[:output_file]
|
41
|
+
|
42
|
+
if output_file.empty?
|
43
|
+
unless options[:dir_given] === false
|
44
|
+
output_file = options[:dir_given] + '.pdf'
|
45
|
+
else
|
46
|
+
puts "No output file name given. Please specify output file name via -o param."
|
47
|
+
generator.close!
|
48
|
+
cover_generator.close!
|
49
|
+
exit
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
puts "Output file: #{output_file}" if options[:verbose]
|
42
54
|
|
43
55
|
|
44
56
|
## Step 7: Generate the PDF file from HTML file
|
data/lib/riven/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Kammerl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|