voice_chapters 0.0.1 → 0.0.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: ef4055750ce2b9dd0694488a1169cd0f8f10af4c
4
- data.tar.gz: 9fbad6245cd2e28f3b707d5fbe1bef16144e0c99
3
+ metadata.gz: 5e4800182680c4d8c77cfe6d4687c538a6f7177a
4
+ data.tar.gz: afe0e1758bda85939f02ba448ffd5ec1a54610a0
5
5
  SHA512:
6
- metadata.gz: e467aba908c660f9e370d4f63c08d097bd01c4c99db11d89db086ab0b0f4c27ff03779ebb3b24f223841b6864730c6481059bb0fae23b5f065fad14f13b72872
7
- data.tar.gz: 37205f23fd950eb6a3f094feaeb82bbbd62e5475faa5088885ac34b8d14f5ced125e8be68311f8ad43fe5156b326c5c5b8e2007ed69618dbd92b119d9693e893
6
+ metadata.gz: 66f4307fea5e75523ff9adc01566eb1b38235e60ab42a8efc5d13b8182f0d4861d04cd0c6eca09e638fd88d3c85305a7b8a615ddf77f29f43a4a77f03f73fa77
7
+ data.tar.gz: e1def82206a33d94656eb1c08757a85df6706d8afa70cd5647a002adda4b2c8778ff164358652d393a1bdd5de526b3fb85d536c763901f6a5f1ed5f041d22d02
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # VoiceChapters
1
+ # Voice Chapters
2
2
 
3
- TODO: Write a gem description
3
+ Using Mac system text to speech it will read some text and using a regex capture group to define chapter markers the gem will create a m4a file with chapters.
4
4
 
5
5
  ## Installation
6
6
 
@@ -17,8 +17,15 @@ Or install it yourself as:
17
17
  $ gem install voice_chapters
18
18
 
19
19
  ## Usage
20
+ require 'voice_chapters'
21
+ text = 'In the beginning, God created the heavens and the earth.2 The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters. 3 And God said, “Let there be light,” and there was light. 4 And God saw that the light was good. And God separated the light from the darkness. 5 God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day.'
20
22
 
21
- TODO: Write usage instructions here
23
+ Voice_Chapters.new(text: text,
24
+ file_name: 'In_the_Beginning',
25
+ marker: /(\D+)/) # Mark by verse
26
+
27
+ #Will save the file in the current directory under
28
+ #/audio/:file_name, make sure the directory audio exists.
22
29
 
23
30
  ## Contributing
24
31
 
@@ -11,12 +11,17 @@ class Voice_Chapters
11
11
  @file_name = file_name
12
12
  chapter_marker(marker)
13
13
  create_uuid
14
+ create_audio_folder
14
15
  create_audio_for_chapters
15
16
  create_audio_for_text
16
17
  set_chapter_marker
17
18
  clean_chapter_file
18
19
  end
19
20
 
21
+ def create_audio_folder
22
+ Dir.mkdir(Dir.pwd) unless File.directory? @feed_path
23
+ end
24
+
20
25
  def chapter_marker(expression)
21
26
  @chapters = @text.scan expression
22
27
  end
@@ -1,3 +1,3 @@
1
1
  module VoiceChapters
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -5,7 +5,7 @@ require 'voice_chapters/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "voice_chapters"
8
- spec.version = '0.0.1'
8
+ spec.version = '0.0.3'
9
9
  spec.authors = ["Dustin Zeisler"]
10
10
  spec.email = ["dustin@zive.me"]
11
11
  spec.description = %q{Using Mac system text to speech
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voice_chapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler