quickpep 0.1.4 → 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
- checksums.yaml.gz.sig +0 -0
- data/lib/quickpep.rb +34 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0de11237c2ae3902d31629219f665928d639fb9cd385ea8e8534e490ec002f5a
|
|
4
|
+
data.tar.gz: b5cf353cee4215b5ed18aeaac198324d2150965fdeec08ab34662917255d12c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44d5eebb58384292c90dc76472974486d9cec5b17427c582a5c4ad309099d8e614f34d174cc753172aafc3729bb3da2c374b1342454b0e4c74f8967a4007580b
|
|
7
|
+
data.tar.gz: a68cabdf29c866f7506dd47b736c1017db128c614677e1563eea4f6d11829747425c73ed49a4e9b54ad6e2777ca157d754c2991f4c28d9d959a6b1a9c09ba62f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/quickpep.rb
CHANGED
|
@@ -60,6 +60,40 @@ class QuickPep
|
|
|
60
60
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
def to_html()
|
|
64
|
+
|
|
65
|
+
t = to_dx().to_table
|
|
66
|
+
t.labels = %w(date title debit: credit: balance: uid:)
|
|
67
|
+
table = t.display markdown: true
|
|
68
|
+
title = "Personal Budget #{Date.today.year}"
|
|
69
|
+
|
|
70
|
+
"<html>
|
|
71
|
+
<head>
|
|
72
|
+
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
73
|
+
<title>#{title}</title>
|
|
74
|
+
<style>
|
|
75
|
+
table {border-collapse: collapse; width: 700px}
|
|
76
|
+
tr:nth-child(even) {
|
|
77
|
+
background-color: #aca;
|
|
78
|
+
}
|
|
79
|
+
@media print {
|
|
80
|
+
|
|
81
|
+
tr:nth-child(even) {
|
|
82
|
+
background-color: #ccc;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
87
|
+
</head>
|
|
88
|
+
<body>
|
|
89
|
+
<h1>#{title}</h1>
|
|
90
|
+
#{RDiscount.new(table).to_html}
|
|
91
|
+
<hr/>
|
|
92
|
+
<footer>Generated by QuickPEP</footer>
|
|
93
|
+
</body>
|
|
94
|
+
</html>"
|
|
95
|
+
end
|
|
96
|
+
|
|
63
97
|
def warnings()
|
|
64
98
|
@warnings.each {|warning| puts warning.warn }
|
|
65
99
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|