Skip to content
Permalink
Browse files

updated help for new services

  • Loading branch information...
shawnmjones committed May 10, 2019
1 parent f1792de commit 15cad37f329bbd0aad7874f26508135636f35e3f
Showing with 17 additions and 5 deletions.
  1. +15 −3 bin/raintale_cmd
  2. +1 −1 raintale/storytellers/facebook.py
  3. +1 −1 raintale/storytellers/filetemplate.py
@@ -77,18 +77,30 @@ def process_arguments(args):
discovered_storytellers, discovered_presets = generate_list_of_storytellers_and_presets()

formatted_storytellers_list = ""
storytellers_already_in_help = []

for storyteller in storytellers:
helptext = "* {} - {}\n\t".format(
storyteller, storytellers[storyteller].description
)
formatted_storytellers_list += helptext
storytellers_already_in_help.append(storyteller)

for storyteller in sorted(list(set(discovered_storytellers))):
formatted_storytellers_list += "* {} - requires -o option to specify the output file\n\t".format(storyteller)

if storyteller not in storytellers_already_in_help:
formatted_storytellers_list += "* {} - writes output to this file format, " \
"requires -o option to specify the output filename.\n\t".format(storyteller)
storytellers_already_in_help.append(storyteller)

formatted_preset_list = ""
for preset in sorted(list(set(discovered_presets))):
formatted_preset_list += "* {}\n\t".format(preset)


parser.add_argument('--storyteller', dest='storyteller',
required=True,
help="""The service or file format used to tell the story. Options are:
* twitter - publish tweets containing story data, requries -c option to specify the credentials file
* template - use a template specified by --story-template to generate the output in a file specified by -o
{}
""".format(formatted_storytellers_list)
)
@@ -15,7 +15,7 @@

class FacebookStoryTeller(ServiceStoryteller):

description = "Given input data and a template file, this storyteller publishes a story as a Facebook thread."
description = "(EXPERIMENTAL) Given input data and a template file, this storyteller publishes a story as a Facebook thread."

def load_credentials_filename(self):

@@ -9,7 +9,7 @@

class FileTemplateStoryTeller(FileStoryteller):

description = "Given input data and a template file, this storyteller generates a story formatted based on the template."
description = "Given input data and a template file, this storyteller generates a story formatted based on the template and saves it to an output file."

def generate_story(self, story_data, mementoembed_api, story_template):

0 comments on commit 15cad37

Please sign in to comment.
You can’t perform that action at this time.