How to use the tts.get_default_fs function in TTS

To help you get started, we’ve selected a few TTS examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cwoac / TTS-Manager / tts_cli.py View on Github external
if args.loglevel:
      logmap={
        'debug':logging.DEBUG,
        'info':logging.INFO,
        'warn':logging.WARN,
        'error':logging.ERROR
       }
      tts.logger().setLevel(logmap[args.loglevel])
    else:
      tts.logger().setLevel(logging.WARN)

    # load filesystem values
    if args.directory:
      self.filesystem = tts.filesystem.FileSystem(os.path.abspath(args.directory))
    else:
      self.filesystem = tts.get_default_fs()

    if (args.parser=='list' or args.parser=='export') and not args.save_type:
      # set default
      args.save_type = tts.SaveType.workshop

    if (args.parser=='config' and args.parser_config=='set' and not args.mod_location and not args.tts_location):
      #parser_config.print_usage()
      parser_config_set.error("At least one of -m or -t is required.")

    rc,message = args.func(args)
    if message:
      print(message)
    sys.exit(rc)
github cwoac / TTS-Manager / tts / preferences.py View on Github external
def get_filesystem(self):
    if self.locationIsUser:
      return tts.get_default_fs()
    return tts.filesystem.FileSystem(tts_install_path=self.TTSLocation)
github cwoac / TTS-Manager / tts_gui.py View on Github external
def reload_filesystem(self):
    if self.preferences.locationIsUser:
      self.filesystem=tts.get_default_fs()
    else:
      self.filesystem=tts.filesystem.FileSystem(tts_install_path=self.preferences.TTSLocation)