# Path: omnitool/tlib.py
# def get_name(f):
#     header = get_header(f)[0]
#     return header["name"].decode()
# 
# Path: omnitool/tinterface.py
# def get_worlds(source = "vanilla"):
#     """Get World files from a certain folder,
#     source locations:
#     'N' #not implemented
#     'vanilla'
#     'tApi' #not implemented
#     """
#     local = get_myterraria() / "Worlds"
#     remotes = [remote.iterdir() for remote in get_remote_terraria_dirs('worlds') if remote.is_dir()]
#     for item in chain(local.iterdir(), *remotes):
#         if item.is_file() and item.suffix == ".wld":
#             yield item


import os
import pygame
    import sys
from pgu import gui
from .tlib import get_name
from .tinterface import get_worlds
    from .shared import lang, theme
    colspan = 1
    if ptype == "rec":
        tlabel = gui.Label(lang.pl_rec)
    elif ptype == "mod":
        tlabel = gui.Label(lang.pl_mod)
    else:
        trans = True
        tlabel = gui.Label(lang.pl_trans)
        colspan = 2
    main = gui.Table()
    app.connect(gui.QUIT, exit_prog, None)
    main.td(gui.Label(Plugin.config["name"], cls="h1"), colspan=colspan)
    for line in Plugin.config["description"]:
        main.tr()
        main.td(gui.Label(line), colspan=colspan)
    main.tr()
    main.td(gui.Spacer(12, 12))
    main.tr()
    main.td(tlabel, colspan=colspan)
    main.tr()
    main.td(gui.Spacer(12, 12))
    main.tr()
    if trans:
        main.td(gui.Label(lang.pl_trans_source))
        main.td(gui.Label(lang.pl_trans_target))
        main.tr()
        data = []
        liste2 = gui.List(250, 250)
        for w in worlds:
            with w.open("rb") as f:

# Path: omnitool/tlib.py
# def get_name(f):
#     header = get_header(f)[0]
#     return header["name"].decode()
# 
# Path: omnitool/tinterface.py
# def get_worlds(source = "vanilla"):
#     """Get World files from a certain folder,
#     source locations:
#     'N' #not implemented
#     'vanilla'
#     'tApi' #not implemented
#     """
#     local = get_myterraria() / "Worlds"
#     remotes = [remote.iterdir() for remote in get_remote_terraria_dirs('worlds') if remote.is_dir()]
#     for item in chain(local.iterdir(), *remotes):
#         if item.is_file() and item.suffix == ".wld":
#             yield item


# Path: omnitool/plugingui.py
import os
import pygame
    import sys
from pgu import gui
from .tlib import get_name
from .tinterface import get_worlds
    from .shared import lang, theme

    colspan = 1
    if ptype == "rec":
        tlabel = gui.Label(lang.pl_rec)
    elif ptype == "mod":
        tlabel = gui.Label(lang.pl_mod)
    else:
        trans = True
        tlabel = gui.Label(lang.pl_trans)
        colspan = 2
    main = gui.Table()
    app.connect(gui.QUIT, exit_prog, None)
    main.td(gui.Label(Plugin.config["name"], cls="h1"), colspan=colspan)
    for line in Plugin.config["description"]:
        main.tr()
        main.td(gui.Label(line), colspan=colspan)
    main.tr()
    main.td(gui.Spacer(12, 12))
    main.tr()
    main.td(tlabel, colspan=colspan)
    main.tr()
    main.td(gui.Spacer(12, 12))
    main.tr()
    if trans:
        main.td(gui.Label(lang.pl_trans_source))
        main.td(gui.Label(lang.pl_trans_target))
        main.tr()
        data = []
        liste2 = gui.List(250, 250)
        for w in worlds:
            with w.open("rb") as f:

                name = get_name(f)