voice_chapters 0.0.1 → 0.0.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/voice_chapters.rb +5 -0
- data/lib/voice_chapters/version.rb +1 -1
- data/voice_chapters.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e4800182680c4d8c77cfe6d4687c538a6f7177a
|
4
|
+
data.tar.gz: afe0e1758bda85939f02ba448ffd5ec1a54610a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66f4307fea5e75523ff9adc01566eb1b38235e60ab42a8efc5d13b8182f0d4861d04cd0c6eca09e638fd88d3c85305a7b8a615ddf77f29f43a4a77f03f73fa77
|
7
|
+
data.tar.gz: e1def82206a33d94656eb1c08757a85df6706d8afa70cd5647a002adda4b2c8778ff164358652d393a1bdd5de526b3fb85d536c763901f6a5f1ed5f041d22d02
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Voice Chapters
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
|
data/lib/voice_chapters.rb
CHANGED
@@ -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
|
data/voice_chapters.gemspec
CHANGED
@@ -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.
|
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
|