md2key 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bf3372d25640ed9712e7448a44282d821a19ca4
4
- data.tar.gz: 7c0def31d4368cb7ce5c4e937079fbc0b77869f2
3
+ metadata.gz: cd515b14ad74d002e0ae91bc868149359f04dc5b
4
+ data.tar.gz: c45239e78b4c18217d2b7214508f91f04016de7e
5
5
  SHA512:
6
- metadata.gz: f008ec28023e80ab3911b591850422f8a8fe01ff966c13e95da32e641544c468ca24f99aa3aff7e4da93e266939f3aeb7ee2df02fc012dd6b745e507e6ffab5a
7
- data.tar.gz: 406465a82cef73f131d84ef61030c143753d0cd653e0926f9ff7ba27777552df19e253bb2ee9d490f79fad5479dabf3e07b1b67273d2f57f95abd098dcea6863
6
+ metadata.gz: 092762b159e56c5019b328119be0d1536bbbf525f8d95b7aa4567a916b6099728cf111820ab22e496b9612ab7414184bdc2dd58f898879f9a0aa5404918c0dd7
7
+ data.tar.gz: 879b241ded9e1b00a3e6aa985675ca7ed0416e57e3d7d182c8601bcca8509cc59f1d2a53451a7a07dae1fd23e94e2cc750b039f15cb19803a840d58489873708
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v0.3.3
2
+
3
+ - Don't pull the Keynote window in the front
4
+ - Always use the front document to convert
5
+
1
6
  # v0.3.2
2
7
 
3
8
  - You no longer need to select the second slide by hand
@@ -20,7 +20,6 @@ module Md2key
20
20
  private
21
21
 
22
22
  def prepare_document_base
23
- Keynote.activate
24
23
  Keynote.ensure_template_slide_availability
25
24
  Keynote.delete_extra_slides
26
25
  end
@@ -6,16 +6,10 @@ module Md2key
6
6
  TEMPLATE_SLIDE_INDEX = 2
7
7
 
8
8
  class << self
9
- def activate
10
- tell_keynote(<<-APPLE.unindent)
11
- activate
12
- APPLE
13
- end
14
-
15
9
  # You must provide a first slide as a cover slide.
16
10
  def update_cover(title, sub)
17
11
  tell_keynote(<<-APPLE.unindent)
18
- tell document 1
12
+ tell the front document
19
13
  tell slide #{COVER_SLIDE_INDEX}
20
14
  set object text of default title item to "#{title}"
21
15
  set object text of default body item to "#{sub}"
@@ -28,7 +22,7 @@ module Md2key
28
22
  return if slides_count >= 2
29
23
 
30
24
  tell_keynote(<<-APPLE.unindent)
31
- tell document 1
25
+ tell the front document
32
26
  make new slide
33
27
  end
34
28
  APPLE
@@ -37,12 +31,12 @@ module Md2key
37
31
  # All slides after a second slide are unnecessary and deleted.
38
32
  def delete_extra_slides
39
33
  tell_keynote(<<-APPLE.unindent)
40
- set theSlides to slides of document 1
34
+ set theSlides to slides of the front document
41
35
  set n to #{slides_count}
42
36
 
43
37
  repeat with theSlide in theSlides
44
38
  if n > 2 then
45
- delete slide n of document 1
39
+ delete slide n of the front document
46
40
  end if
47
41
 
48
42
  set n to n - 1
@@ -52,7 +46,7 @@ module Md2key
52
46
 
53
47
  def delete_template_slide
54
48
  tell_keynote(<<-APPLE.unindent)
55
- tell document 1
49
+ tell the front document
56
50
  delete slide #{TEMPLATE_SLIDE_INDEX}
57
51
  end tell
58
52
  APPLE
@@ -60,7 +54,7 @@ module Md2key
60
54
 
61
55
  def create_slide(title, content)
62
56
  tell_keynote(<<-APPLE.unindent)
63
- tell document 1
57
+ tell the front document
64
58
  -- Workaround to select correct master slide. In spite of master slide can be selected by name,
65
59
  -- name property is not limited to be unique.
66
60
  -- So move the focus to second slide and force "make new slide" to use the exact master slide.
@@ -78,7 +72,7 @@ module Md2key
78
72
  # Insert image to the last slide
79
73
  def insert_image(path)
80
74
  tell_keynote(<<-APPLE.unindent)
81
- tell document 1
75
+ tell the front document
82
76
  set theSlide to slide #{slides_count}
83
77
  set theImage to POSIX file "#{path}"
84
78
  set docWidth to its width
@@ -104,7 +98,7 @@ module Md2key
104
98
  def slides_count
105
99
  tell_keynote(<<-APPLE.unindent).to_i
106
100
  set n to 0
107
- set theSlides to slides of document 1
101
+ set theSlides to slides of the front document
108
102
  repeat with theSlide in theSlides
109
103
  set n to n + 1
110
104
  end repeat
@@ -1,3 +1,3 @@
1
1
  module Md2key
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun