|
@@ -1,6 +1,8 @@
|
|
task default: %w(develop)
|
|
task default: %w(develop)
|
|
STORY_DIR=File.join(ENV['USERPROFILE'], 'Documents\\Twine\\Stories')
|
|
STORY_DIR=File.join(ENV['USERPROFILE'], 'Documents\\Twine\\Stories')
|
|
STORY_TITLE = 'Volleyball'
|
|
STORY_TITLE = 'Volleyball'
|
|
|
|
+STORY_FORMAT = 'SugarCube'
|
|
|
|
+STORY_FORMAT_VERSION = '2.25.0'
|
|
FILES = {
|
|
FILES = {
|
|
'01_intro' => '01 Intro',
|
|
'01_intro' => '01 Intro',
|
|
'02_transform' => '02 Transform',
|
|
'02_transform' => '02 Transform',
|
|
@@ -43,7 +45,8 @@ task export: %w(bundle_install) do
|
|
|
|
|
|
::Twee2Settings [twee2]
|
|
::Twee2Settings [twee2]
|
|
@story_start_name = 'Start #{file.long_name}'
|
|
@story_start_name = 'Start #{file.long_name}'
|
|
- Twee2::build_config.story_format = 'SugarCube2'
|
|
|
|
|
|
+ Twee2::build_config.story_format = 'SugarCube'
|
|
|
|
+ Twee2::build_config.story_format_version = 'SugarCube2'
|
|
|
|
|
|
::StoryIncludes
|
|
::StoryIncludes
|
|
images.tw2
|
|
images.tw2
|
|
@@ -52,9 +55,17 @@ task export: %w(bundle_install) do
|
|
#{file.source_file}
|
|
#{file.source_file}
|
|
EOF
|
|
EOF
|
|
|
|
|
|
- sh 'bundle', 'exec', 'twee2', 'export', file.wrapper_file, file.dest_file
|
|
|
|
|
|
+ sh(
|
|
|
|
+ 'bundle', 'exec', 'twee2', 'export',
|
|
|
|
+ "--format=#{STORY_FORMAT}", "--format-version=#{STORY_FORMAT_VERSION}",
|
|
|
|
+ file.wrapper_file, file.dest_file,
|
|
|
|
+ )
|
|
end
|
|
end
|
|
- sh 'bundle', 'exec', 'twee2', 'export', 'main.tw2', STORY_DIR
|
|
|
|
|
|
+ sh(
|
|
|
|
+ 'bundle', 'exec', 'twee2', 'export',
|
|
|
|
+ "--format=#{STORY_FORMAT}", "--format-version=#{STORY_FORMAT_VERSION}",
|
|
|
|
+ 'main.tw2', STORY_DIR,
|
|
|
|
+ )
|
|
end
|
|
end
|
|
|
|
|
|
desc 'import sub files from Twine 2'
|
|
desc 'import sub files from Twine 2'
|