kamisaku 0.1.2 → 0.2.1
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/CHANGELOG.md +11 -1
- data/Gemfile +0 -3
- data/Gemfile.lock +1 -13
- data/README.md +5 -1
- data/examples/paper/john_doe.pdf +0 -0
- data/kamisaku.gemspec +38 -0
- data/lib/kamisaku/cv_generator.rb +8 -1
- data/lib/kamisaku/version.rb +1 -1
- data/template.yml +59 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c810e820b25f0105dcd4bda49ea0de6aa29a9d802079105fc6ee8b6f055d39e5
|
|
4
|
+
data.tar.gz: 63a00b823e8881454a73a660f4e74b0c467c0cf2e1cdc49af37bff7ec70221a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0a4b2ff2d49eeafaaae02f00a7d7765ffd0958eca484047deea258b06e3a914ac5a9dc66bc590b564b2296874c4ee3706a5e3acd8ddca98cb1c5a4a94c7c2bc
|
|
7
|
+
data.tar.gz: 16afe349ee8f3696d08eca40f98241a5d05f6e647790fb9596c6b1eaf42d4597ace2cd42c3383658fbe39ebbbc6dc6a937a669b5e9c2dbc1f14bd4089e6acb88
|
data/CHANGELOG.md
CHANGED
|
@@ -13,7 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
13
13
|
|
|
14
14
|
### Removed
|
|
15
15
|
|
|
16
|
-
## [0.1
|
|
16
|
+
## [0.2.1] - 2025-05-28
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Fix pdfkit gem reference
|
|
20
|
+
|
|
21
|
+
## [0.2.0] - 2025-05-24
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Soft removing metadata in generated PDF using `exiftool`
|
|
25
|
+
|
|
26
|
+
## [0.1.2] - 2025-05-24
|
|
17
27
|
|
|
18
28
|
### Changed
|
|
19
29
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
kamisaku (0.1
|
|
4
|
+
kamisaku (0.2.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
ast (2.4.3)
|
|
10
|
-
bigdecimal (3.1.9)
|
|
11
10
|
json (2.12.0)
|
|
12
11
|
language_server-protocol (3.17.0.5)
|
|
13
|
-
matrix (0.4.2)
|
|
14
12
|
minitest (5.25.5)
|
|
15
13
|
parallel (1.27.0)
|
|
16
14
|
parser (3.3.8.0)
|
|
17
15
|
ast (~> 2.4.1)
|
|
18
16
|
racc
|
|
19
|
-
pdf-core (0.10.0)
|
|
20
|
-
pdfkit (0.8.7.3)
|
|
21
|
-
prawn (2.5.0)
|
|
22
|
-
matrix (~> 0.4)
|
|
23
|
-
pdf-core (~> 0.10.0)
|
|
24
|
-
ttfunk (~> 1.8)
|
|
25
17
|
prism (1.4.0)
|
|
26
18
|
racc (1.8.1)
|
|
27
19
|
rainbow (3.1.1)
|
|
@@ -47,8 +39,6 @@ GEM
|
|
|
47
39
|
rubocop-rake (0.6.0)
|
|
48
40
|
rubocop (~> 1.0)
|
|
49
41
|
ruby-progressbar (1.13.0)
|
|
50
|
-
ttfunk (1.8.0)
|
|
51
|
-
bigdecimal (~> 3.1)
|
|
52
42
|
unicode-display_width (2.6.0)
|
|
53
43
|
|
|
54
44
|
PLATFORMS
|
|
@@ -58,8 +48,6 @@ PLATFORMS
|
|
|
58
48
|
DEPENDENCIES
|
|
59
49
|
kamisaku!
|
|
60
50
|
minitest (~> 5.0)
|
|
61
|
-
pdfkit
|
|
62
|
-
prawn
|
|
63
51
|
rake (~> 13.0)
|
|
64
52
|
rubocop (= 1.57.2)
|
|
65
53
|
rubocop-minitest (~> 0.33.0)
|
data/README.md
CHANGED
|
@@ -68,7 +68,9 @@ education:
|
|
|
68
68
|
achievements:
|
|
69
69
|
- # Things you have achieved or did
|
|
70
70
|
```
|
|
71
|
-
|
|
71
|
+
|
|
72
|
+
## Template
|
|
73
|
+
For a list of templates availble for CV generation, check the [examples](/examples) directory where each directory name is a template name.
|
|
72
74
|
|
|
73
75
|
## Installation
|
|
74
76
|
|
|
@@ -79,6 +81,8 @@ This is a Ruby gem. So you can either install as a gem or clone the repo and use
|
|
|
79
81
|
- Ensure that [Google Chrome](https://www.google.com/chrome/) is installed.
|
|
80
82
|
- Chrome must be accessible from the terminal as `google-chrome`.
|
|
81
83
|
- Kamisaku uses Chrome's [headless mode](https://developer.chrome.com/docs/chromium/headless/) to generate PDF files.
|
|
84
|
+
- Ensure `exiftool` is installed available in command line.
|
|
85
|
+
- exiftool is used to soft remove metadata added by chrome in the PDF file.
|
|
82
86
|
|
|
83
87
|
Add this line to your application's Gemfile:
|
|
84
88
|
|
data/examples/paper/john_doe.pdf
CHANGED
|
Binary file
|
data/kamisaku.gemspec
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/kamisaku/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "kamisaku"
|
|
7
|
+
spec.version = Kamisaku::VERSION
|
|
8
|
+
spec.authors = ["Sinaru Gunawardena"]
|
|
9
|
+
spec.email = ["sinaru@gmail.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Build a CV PDF from a yaml text file."
|
|
12
|
+
spec.description = "Build a CV PDF from a yaml text file."
|
|
13
|
+
spec.homepage = "https://github.com/sinaru/kamisaku"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
spec.required_ruby_version = ">= 3.4.3"
|
|
16
|
+
|
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/sinaru/kamisaku"
|
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/sinaru/kamisaku/blob/main/CHANGELOG.md"
|
|
20
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/sinaru/kamisaku/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug"
|
|
21
|
+
|
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
spec.bindir = "bin"
|
|
30
|
+
spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
|
|
31
|
+
spec.require_paths = ["lib"]
|
|
32
|
+
|
|
33
|
+
# Uncomment to register a new dependency of your gem
|
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
|
35
|
+
|
|
36
|
+
# For more information and examples about making a new gem, check out our
|
|
37
|
+
# guide at: https://bundler.io/guides/crea ting_gem.html
|
|
38
|
+
end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "erb"
|
|
4
|
-
require "pdfkit"
|
|
5
4
|
|
|
6
5
|
module Kamisaku
|
|
7
6
|
class CvGenerator
|
|
@@ -18,6 +17,7 @@ module Kamisaku
|
|
|
18
17
|
generated_html_file do |file_path|
|
|
19
18
|
FileUtils.cp(file_path, html_location) if html_location
|
|
20
19
|
html_file_to_pdf_file(file_path, pdf_location)
|
|
20
|
+
soft_remove_metadata_from_pdf_file(pdf_location)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -35,6 +35,13 @@ module Kamisaku
|
|
|
35
35
|
raise "PDF generation failed" unless File.exist?(pdf_file_path)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def soft_remove_metadata_from_pdf_file(file_path)
|
|
39
|
+
command = <<~CMD
|
|
40
|
+
exiftool -all= #{file_path} -overwrite_original
|
|
41
|
+
CMD
|
|
42
|
+
system(command)
|
|
43
|
+
end
|
|
44
|
+
|
|
38
45
|
def generated_html_file
|
|
39
46
|
temp_html_file = Tempfile.new(%w[kamisaku .html])
|
|
40
47
|
temp_html_file.write(cv_html)
|
data/lib/kamisaku/version.rb
CHANGED
data/template.yml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Template structure for CV. The content should be in YAML format.
|
|
2
|
+
# If you are not familiar with YAML, refer: https://devhints.io/yaml
|
|
3
|
+
# Some hints:
|
|
4
|
+
# - comments start with "#"
|
|
5
|
+
|
|
6
|
+
version: 1
|
|
7
|
+
profile:
|
|
8
|
+
name: # Your name
|
|
9
|
+
title: # Your current job title
|
|
10
|
+
about: # Some sleek details about your experience
|
|
11
|
+
|
|
12
|
+
contact:
|
|
13
|
+
github: # Github username
|
|
14
|
+
mobile: # Mobile number
|
|
15
|
+
email: # email address
|
|
16
|
+
linkedin: # Linkedin username
|
|
17
|
+
location:
|
|
18
|
+
country: # country name
|
|
19
|
+
city: # city name
|
|
20
|
+
|
|
21
|
+
skills:
|
|
22
|
+
- area: # specific skill area you are specialized in
|
|
23
|
+
items:
|
|
24
|
+
- # sub item such as a technology you have the skill in under the specialized area
|
|
25
|
+
|
|
26
|
+
experiences:
|
|
27
|
+
- title: # job title
|
|
28
|
+
organisation: # Name of the place you worked
|
|
29
|
+
location:
|
|
30
|
+
city: # city name
|
|
31
|
+
country: # country name
|
|
32
|
+
from:
|
|
33
|
+
month: # month integer number that you started
|
|
34
|
+
year: # year integer number that you started
|
|
35
|
+
# if following is not given, it is assumed you are still working
|
|
36
|
+
to:
|
|
37
|
+
month: # month integer number that you stopped
|
|
38
|
+
year: # year integer number that you stopped
|
|
39
|
+
skills:
|
|
40
|
+
- # a short name for a specialized skilled you gained
|
|
41
|
+
achievements:
|
|
42
|
+
- # Things you have achieved or did as a sentence. Consider reflecting the impact it made.
|
|
43
|
+
|
|
44
|
+
education:
|
|
45
|
+
- institute: # name of the place you studied
|
|
46
|
+
location:
|
|
47
|
+
city: # city name
|
|
48
|
+
country: # country name
|
|
49
|
+
qualification: # name of the degree/diploma qualification
|
|
50
|
+
field: # name of the field such as Computer Science
|
|
51
|
+
from:
|
|
52
|
+
month: # month integer number that you started
|
|
53
|
+
year: # year integer number that you started
|
|
54
|
+
# if following is not given, it is assumed you are still studying
|
|
55
|
+
to:
|
|
56
|
+
month: # month integer number that you stopped
|
|
57
|
+
year: # year integer number that you stopped
|
|
58
|
+
achievements:
|
|
59
|
+
- # Things you have achieved or did
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kamisaku
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sinaru Gunawardena
|
|
@@ -29,6 +29,7 @@ files:
|
|
|
29
29
|
- examples/paper/john_doe.yml
|
|
30
30
|
- examples/sleek/john_doe.pdf
|
|
31
31
|
- examples/sleek/john_doe.yml
|
|
32
|
+
- kamisaku.gemspec
|
|
32
33
|
- kamisaku.png
|
|
33
34
|
- lib/kamisaku.rb
|
|
34
35
|
- lib/kamisaku/arg_parser.rb
|
|
@@ -45,6 +46,7 @@ files:
|
|
|
45
46
|
- lib/templates/paper/template.html.erb
|
|
46
47
|
- lib/templates/sleek/template.html.erb
|
|
47
48
|
- sig/kamisaku.rbs
|
|
49
|
+
- template.yml
|
|
48
50
|
homepage: https://github.com/sinaru/kamisaku
|
|
49
51
|
licenses:
|
|
50
52
|
- MIT
|