frameit 0.1.2 → 0.1.3
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 +10 -3
- data/lib/frameit/frame_converter.rb +9 -11
- data/lib/frameit/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: 9209d6d82a7676b5cbaee5f77e0031ffda2cc4b4
|
|
4
|
+
data.tar.gz: 9b6ffab3b82c88b66f32ec7cd00ef22dfbf4c2cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d26dc836eaded3dfacc0e8979259eaaac052523be5804b0019dd76bb642c42169b9801bae6232b673eeb15369d23e3a0959fb918dabf87099a36ab2b3d6d686d
|
|
7
|
+
data.tar.gz: 192dca599fe6a69388510c4cc2802e7bb0a2a604c349696ebbba605342c9ffb11c4672c5a9ea4564b7285ecae497eef92ba94ee03790ff59a92a209505769218
|
data/README.md
CHANGED
|
@@ -72,10 +72,17 @@ You only have to do this once per computer.
|
|
|
72
72
|
|
|
73
73
|
Why should you have to use Photoshop, just to add a frame around your screenshots?
|
|
74
74
|
|
|
75
|
-
Just navigate to your folder of screenshots and
|
|
75
|
+
Just navigate to your folder of screenshots and use the following command:
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
frameit
|
|
78
|
+
|
|
79
|
+
To use the silver version of the frames:
|
|
80
|
+
|
|
81
|
+
frameit silver
|
|
82
|
+
|
|
83
|
+
To run the setup process again to add new frames use:
|
|
84
|
+
|
|
85
|
+
frameit setup
|
|
79
86
|
|
|
80
87
|
# Tips
|
|
81
88
|
|
|
@@ -4,15 +4,9 @@ module Frameit
|
|
|
4
4
|
FRAME_PATH = '.frameit/devices_frames'
|
|
5
5
|
|
|
6
6
|
def run
|
|
7
|
-
@templates_path = "#{ENV['HOME']}/#{FRAME_PATH}"
|
|
8
|
-
|
|
9
7
|
self.setup_frames
|
|
10
8
|
end
|
|
11
9
|
|
|
12
|
-
def templates_path
|
|
13
|
-
@templates_path
|
|
14
|
-
end
|
|
15
|
-
|
|
16
10
|
def setup_frames
|
|
17
11
|
puts "----------------------------------------------------".green
|
|
18
12
|
puts "Looks like you have no device templates installed".green
|
|
@@ -31,17 +25,17 @@ module Frameit
|
|
|
31
25
|
STDIN.gets
|
|
32
26
|
|
|
33
27
|
while not frames_exist?
|
|
34
|
-
system("mkdir -p '#{
|
|
28
|
+
system("mkdir -p '#{templates_path}' && open '#{templates_path}'")
|
|
35
29
|
puts "----------------------------------------------------".green
|
|
36
30
|
puts "Extract the downloaded files into the folder".green
|
|
37
|
-
puts "'#{
|
|
31
|
+
puts "'#{templates_path}', which should be open in your Finder".green
|
|
38
32
|
puts "You can just copy the whole content into it.".green
|
|
39
33
|
puts "Press Enter when you extracted the files into the given folder".green
|
|
40
34
|
puts "----------------------------------------------------".green
|
|
41
35
|
STDIN.gets
|
|
42
36
|
|
|
43
37
|
if not frames_exist?
|
|
44
|
-
puts "Sorry, I can't find the PSD files. Make sure you unzipped them into '#{
|
|
38
|
+
puts "Sorry, I can't find the PSD files. Make sure you unzipped them into '#{templates_path}'".red
|
|
45
39
|
end
|
|
46
40
|
end
|
|
47
41
|
|
|
@@ -49,12 +43,16 @@ module Frameit
|
|
|
49
43
|
end
|
|
50
44
|
|
|
51
45
|
def frames_exist?
|
|
52
|
-
Dir["#{
|
|
46
|
+
Dir["#{templates_path}/**/*.psd"].count > 0
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def templates_path
|
|
50
|
+
"#{ENV['HOME']}/#{FRAME_PATH}"
|
|
53
51
|
end
|
|
54
52
|
|
|
55
53
|
# Converts all the PSD files to trimmed PNG files
|
|
56
54
|
def convert_frames
|
|
57
|
-
Dir["#{
|
|
55
|
+
Dir["#{templates_path}/**/*.psd"].each do |psd|
|
|
58
56
|
resulting_path = psd.gsub('.psd', '.png')
|
|
59
57
|
unless File.exists?resulting_path
|
|
60
58
|
Helper.log.debug "Converting PSD file '#{psd}'".yellow
|
data/lib/frameit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: frameit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felix Krause
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|