"/home/user/prep/suc001-crazy-title.epi"') # ADN arguments parser.add_argument('--post', help='The text of your post on app.net, e.g. "New Episode of my \ #Podcast: SUC001 Crazy Title http://example.com/podcast/suc001-crazy-title"') ################################################# # Parse and process command line arguments # ################################################# # Well... parse them. args = parser.parse_args() # Init the Fism with the settings fism = Fism(args.settings) # OK, at this point, the parser hasn't detected any errors. Fine so far. # Let's check for some rudimentary consistency: # If you have one of the auphonic arguments, you need all of them. if args.audio or args.title or args.track or args.subtitle or args.summary or args.tags or args.chapters: # OK, one of them is there. Let's check if the others are there: if not (args.audio and args.title and args.track and args.subtitle and args.summary): print "It seems you want to use the auphonic module." print "Some mandatory argument for the auphonic module is missing." print "Mandatory arguments for the auphonic module are:" print "--audio, --title, --track, --subtitle, --summary" sys.exit("Please supply all mandatory arguments for auphonic.") # Check if the settings are configured to use adn as comments for the Firtz: if fism.use_adn_as_firtz_comments:
""" Data needed for the Firtz """ self.prep_epi = raw_input('Specify relative or absolute path to a prepared \ *.epi file, e.g. "prep/spc001-crazy-title.epi" or \ "/home/user/prep/spc001-crazy-title.epi". (Default: None): ') or None self.epi_dict = {} while raw_input('Do you want to specify a(nother) key-value pair for the \ epi file? E.g. "date: 1945-05-23 23:05:23" yn (Default:n): \ ') == ("y" or "Y" or "yes" or "Yes"): key = raw_input('Specify key, e.g. "date": ') value = raw_input('Specify value, e.g. "1945-05-23 23:05:23": ') self.epi_dict[key] = value def ask_adn(self): """ Data needed for ADN """ self.post = raw_input('Write your post text. (Max 256 characters): ') if __name__ == "__main__": ia = Interactive() ia.ask() # Init the Fism with the settings fism = Fism((ia.settings or 'settings.json')) # Start the Fism! fism.start(ia.slug, ia.audio, ia.title, ia.track, ia.subtitle, ia.summary, ia.post, ia.tags, ia.chapters, ia.epi_dict, ia.prep_epi)