How to use the tts.preferences 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_gui.py View on Github external
def __init__(self,root):
    self.log=tts.logger()
    self.log.setLevel(logging.WARN)
    self.preferences=tts.preferences.Preferences()
    self.root=root

    if self.preferences.firstRun:
      messagebox.showinfo("TTS Manager","First run detected.\nOpening preferences pane.")
      self.showPreferences()

    if not self.preferences.validate():
      messagebox.showwarning("TTS Manager","Invalid preferences detected.\nOpening preferences pane.")
      self.showPreferences()

    self.reload_filesystem()
    mode_notebook = ttk.Notebook(root)
    list_frame = ttk.Frame(mode_notebook)
    self.populate_list_frame(list_frame)
    export_frame = ttk.Frame(mode_notebook)
    self.populate_export_frame(export_frame)
github cwoac / TTS-Manager / tts_cli.py View on Github external
def __init__(self):
    self.preferences=tts.preferences.Preferences()

    parser = argparse.ArgumentParser(description="Manipulate Tabletop Simulator files")
    parser.add_argument("-d","--directory",help="Override TTS cache directory")
    parser.add_argument("-l","--loglevel",help="Set logging level",choices=['debug','info','warn','error'])
    subparsers = parser.add_subparsers(dest='parser',title='command',description='Valid commands.')
    subparsers.required=True

  # add list command
    parser_list = subparsers.add_parser('list',help="List installed mods.",description='''
    List installed mods.
    If no id is provided, then this will return a list of all installed modules.
    If an id is provided, then this will list the contents of that modules.
    ''')
    group_list=parser_list.add_mutually_exclusive_group()
    group_list.add_argument("-w","--workshop",action="store_const",metavar='save_type',dest='save_type',const=tts.SaveType.workshop,help="List workshop files (the default).")
    group_list.add_argument("-s","--save",action="store_const",metavar='save_type',dest='save_type',const=tts.SaveType.save,help="List saves.")
github cwoac / TTS-Manager / tts_manager.py View on Github external
def __init__(self,root):
    self.log=tts.logger()
    self.log.setLevel(logging.WARN)
    self.preferences=tts.preferences.Preferences()
    self.root=root
    Tk.Grid.rowconfigure(self.root,0,weight=1)
    Tk.Grid.columnconfigure(self.root,0,weight=1)
    self.log_window=tts.TTS_LOGGER(root)

    if self.preferences.firstRun:
      messagebox.showinfo("TTS Manager","First run detected.\nOpening preferences pane.")
      self.showPreferences()

    if not self.preferences.validate():
      messagebox.showwarning("TTS Manager","Invalid preferences detected.\nOpening preferences pane.")
      self.showPreferences()

    self.filesystem=self.preferences.get_filesystem()
    self.populate_manage_frame(root)