kamisaku 0.1.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.
@@ -0,0 +1,263 @@
1
+ <html xmlns="http://www.w3.org/1999/html">
2
+ <head>
3
+ <style>
4
+ @page {
5
+ margin: 0;
6
+ padding: 0.5in;
7
+ size: 8.3in 11.7in;
8
+ }
9
+
10
+ body {
11
+ font-family: Arial, Helvetica, sans-serif;
12
+ font-style: normal;
13
+ color: #000000;
14
+ font-size: 12px;
15
+ }
16
+
17
+ a {
18
+ color: #000000;
19
+ }
20
+
21
+ a:link {
22
+ text-decoration: none;
23
+ }
24
+
25
+ a:visited {
26
+ text-decoration: none;
27
+ }
28
+
29
+ a:hover {
30
+ text-decoration: none;
31
+ }
32
+
33
+ a:active {
34
+ text-decoration: none;
35
+ }
36
+
37
+ .flex {
38
+ display: flex;
39
+ }
40
+
41
+ .flex-grow {
42
+ flex-grow: 1;
43
+ }
44
+
45
+ .upcase {
46
+ text-transform: uppercase;
47
+ }
48
+
49
+ .heading {
50
+ border-bottom: 2px solid #000;
51
+ padding-bottom: 5px;
52
+ }
53
+
54
+ .profile {
55
+
56
+ .name {
57
+ font-size: 2em;
58
+ }
59
+
60
+ .title {
61
+ font-size: 1.3em;
62
+ }
63
+ }
64
+
65
+ .contact {
66
+ flex: 1 0 auto;
67
+ justify-content: flex-end;
68
+
69
+ .contact-item {
70
+ display: flex;
71
+ align-items: center;
72
+ }
73
+
74
+ .icon {
75
+ fill: #000000;
76
+ margin-right: 4px;
77
+
78
+ svg {
79
+ height: 0.8em;
80
+ }
81
+ }
82
+ }
83
+
84
+ .time-period {
85
+ display: flex;
86
+ align-items: center;
87
+
88
+ .time {
89
+ font-weight: bold;
90
+ }
91
+ }
92
+
93
+ .about {
94
+ flex: 0 0 100%;
95
+ font-size: small;
96
+ }
97
+
98
+ .experiences {
99
+ .experience {
100
+ .job-title {
101
+ font-weight: bold;
102
+ font-size: 1.2em;
103
+ }
104
+
105
+ .skills {
106
+ padding-top: 5px;
107
+
108
+ .label {
109
+ font-weight: bold;
110
+ }
111
+
112
+ .skill-item {
113
+ font-style: italic;
114
+ }
115
+ }
116
+
117
+ .achievements {
118
+ .achievement-item {
119
+ margin-top: 5px;
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ .education {
126
+ .achievements-section {
127
+ margin-top: 5px;
128
+ }
129
+ }
130
+ </style>
131
+ </head>
132
+ <body>
133
+ <div class="profile">
134
+ <div class="flex">
135
+ <div>
136
+ <div class="name"> <%= dig :profile, :name %></div>
137
+ <div class="title"> <%= dig :profile, :title %></div>
138
+ </div>
139
+ <div class="flex contact">
140
+ <div style="margin-right: 10px;">
141
+ <div class="contact-item">
142
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg></span>
143
+ <span><a href="https://github.com/<%= dig :contact, :github %>">github.com/<%= dig :contact, :github %></a></span>
144
+ </div>
145
+
146
+ <div class="contact-item">
147
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"/></svg></span>
148
+ <span><a href="https://linkedin.com/in/<%= dig :contact, :linkedin %>">linkedin.com/in/<%= dig :contact, :linkedin %></a></span>
149
+ </div>
150
+
151
+ <div class="contact-item">
152
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"/></svg></span>
153
+ <span><a href="https://<%= dig :contact, :website %>"><%= dig :contact, :website %></a></span>
154
+ </div>
155
+ </div>
156
+
157
+ <div>
158
+ <div class="contact-item">
159
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M0 64C0 28.7 28.7 0 64 0H256c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm64 96v64c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32zM80 352a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm56-56a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zm56-56a24 24 0 1 0 0-48 24 24 0 1 0 0 48zm24 56a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM128 48c-8.8 0-16 7.2-16 16s7.2 16 16 16h64c8.8 0 16-7.2 16-16s-7.2-16-16-16H128z"/></svg></span>
160
+ <span><a href="tel:<%= dig :contact, :mobile %>"><%= dig :contact, :mobile %></a></span>
161
+ </div>
162
+ <div class="contact-item">
163
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg></span>
164
+ <span><%= dig :contact, :email %></span>
165
+ </div>
166
+ <div class="contact-item">
167
+ <span class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/></svg></span>
168
+ <span><%= dig :contact, :location, :city %>, <%= dig :contact, :location, :country %></span>
169
+ </div>
170
+ </div>
171
+
172
+ </div>
173
+ </div>
174
+ <div class="about">
175
+ <h2 class="upcase heading">Professional Summary</h2>
176
+ <p><%= dig :profile, :about %></p>
177
+ </div>
178
+ </div>
179
+
180
+ <% if has? :skills %>
181
+ <div class="skills">
182
+ <% dig :skills do |skill| %>
183
+ <div>
184
+ <b><%= dig skill, :area %> </b>
185
+ <% dig(skill, :items).each do |item| %>
186
+ • <%= item %>
187
+ <% end %>
188
+ </div>
189
+ <% end %>
190
+ </div>
191
+ <% end %>
192
+
193
+ <% if has? :experiences %>
194
+ <div class="experiences">
195
+ <h2 class="upcase heading">Work Experience</h2>
196
+ <% dig :experiences do |experience| %>
197
+ <div class="experience">
198
+ <h3 class="job-title"><%= dig(experience, :title) %></h3>
199
+ <div class="flex">
200
+ <div class="flex-grow">
201
+ <span style="font-weight: bold">
202
+ <%= dig(experience, :organisation) %>
203
+ </span> /
204
+ <span><%= "#{dig(experience, :location, :city)}, #{dig(experience, :location, :country)}" %></span>
205
+ </div>
206
+ <div class="time-period">
207
+ <span class="time">
208
+ <%= dig(experience, :from, :month) %> <%= dig(experience, :from, :year) %> -
209
+ <%= has?(experience, :to) ? "#{dig(experience, :to, :month)} #{dig(experience, :to, :year)}" : 'Present' %>
210
+ </span>
211
+ </div>
212
+ </div>
213
+ <% if has? experience, :achievements %>
214
+ <div class="achievements">
215
+ <% dig(experience, :achievements).each do |achievement| %>
216
+ <div class="achievement-item">• <%= achievement %></div>
217
+ <% end %>
218
+ </div>
219
+ <% end %>
220
+ <div class="skills">
221
+ <span class="label">Skills</span>
222
+ <% dig(experience, :skills).each do |item| %>
223
+ <span class="skill-item">• <%= item %></span>
224
+ <% end %>
225
+ </div>
226
+ </div>
227
+ <% end %>
228
+ </div>
229
+ <% end %>
230
+
231
+ <% if has? :education %>
232
+ <div class="education">
233
+ <h2 class="upcase heading">Education</h2>
234
+ <% dig :education do |education| %>
235
+ <div class="education-item">
236
+ <h3><%= dig(education, :qualification) %></h3>
237
+ <div class="flex">
238
+ <div class="flex-grow">
239
+ <span style="font-weight: bold">
240
+ <%= dig(education, :institute) %>
241
+ </span> /
242
+ <span><%= "#{dig(education, :location, :city)}, #{dig(education, :location, :country)}" %></span>
243
+ </div>
244
+ <div class="time-period">
245
+ <span class="time">
246
+ <%= has?(education, :from) ? "#{dig(education, :from, :month)} #{dig(education, :from, :year)} - " : '' %>
247
+ <%= has?(education, :to) ? "#{dig(education, :to, :month)} #{dig(education, :to, :year)}" : 'Present' %>
248
+ </span>
249
+ </div>
250
+ </div>
251
+ <div class="achievements-section">
252
+ <% dig(education, :achievements).each do |achievement| %>
253
+ <div>
254
+ • <%= achievement %>
255
+ </div>
256
+ <% end %>
257
+ </div>
258
+ </div>
259
+ <% end %>
260
+ </div>
261
+ <% end %>
262
+ </body>
263
+ </html>
data/sig/kamisaku.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Kamisaku
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kamisaku
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sinaru Gunawardena
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Build a CV PDF from a yaml text file.
13
+ email:
14
+ - sinaru@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - ".rubocop.yml"
20
+ - ".tool-versions"
21
+ - CHANGELOG.md
22
+ - CODE_OF_CONDUCT.md
23
+ - Gemfile
24
+ - Gemfile.lock
25
+ - LICENSE.txt
26
+ - README.md
27
+ - Rakefile
28
+ - examples/john_doe.yml
29
+ - examples/plain/john_doe.pdf
30
+ - examples/sleek/john_doe.pdf
31
+ - kamisaku.png
32
+ - lib/kamisaku.rb
33
+ - lib/kamisaku/arg_parser.rb
34
+ - lib/kamisaku/cv_data.rb
35
+ - lib/kamisaku/cv_data_sections/base.rb
36
+ - lib/kamisaku/cv_data_sections/education.rb
37
+ - lib/kamisaku/cv_data_sections/experience.rb
38
+ - lib/kamisaku/cv_data_sections/interest.rb
39
+ - lib/kamisaku/cv_data_sections/parse_helpers/month_parser.rb
40
+ - lib/kamisaku/cv_data_sections/skill.rb
41
+ - lib/kamisaku/cv_generator.rb
42
+ - lib/kamisaku/meta_file_parser.rb
43
+ - lib/kamisaku/version.rb
44
+ - lib/templates/plain/template.html.erb
45
+ - lib/templates/sleek/template.html.erb
46
+ - sig/kamisaku.rbs
47
+ homepage: https://github.com/sinaru/kamisaku
48
+ licenses:
49
+ - MIT
50
+ metadata:
51
+ homepage_uri: https://github.com/sinaru/kamisaku
52
+ source_code_uri: https://github.com/sinaru/kamisaku
53
+ changelog_uri: https://github.com/sinaru/kamisaku/CHANGELOG.md
54
+ bug_tracker_uri: https://github.com/sinaru/kamisaku/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.4.3
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubygems_version: 3.6.7
70
+ specification_version: 4
71
+ summary: Build a CV PDF from a yaml text file.
72
+ test_files: []