Esempio n. 1
0
def get():
    myaccounts_path = addonPath()
    myaccounts_version = addonVersion()
    changelogfile = joinPath(myaccounts_path, 'changelog.txt')
    r = open(changelogfile, 'r', encoding='utf-8', errors='ignore')
    text = r.read()
    r.close()
    heading = '[B]My Accounts -  v%s - ChangeLog[/B]' % myaccounts_version
    windows = TextViewerXML('textviewer.xml',
                            myaccounts_path,
                            heading=heading,
                            text=text)
    windows.run()
    del windows
Esempio n. 2
0
def get(file):
    myaccounts_path = addonPath()
    myaccounts_version = addonVersion()
    helpFile = joinPath(myaccounts_path, 'lib', 'myaccounts', 'help',
                        file + '.txt')
    r = open(helpFile, 'r', encoding='utf-8', errors='ignore')
    text = r.read()
    r.close()
    heading = '[B]My Accounts -  v%s - %s[/B]' % (myaccounts_version, file)
    windows = TextViewerXML('textviewer.xml',
                            myaccounts_path,
                            heading=heading,
                            text=text)
    windows.run()
    del windows
Esempio n. 3
0
def view_LogFile(name):
    try:
        from myaccounts.windows.textviewer import TextViewerXML
        from myaccounts.modules.control import addonPath
        log_file = joinPath(LOGPATH, '%s.log' % name.lower())
        if not existsPath(log_file):
            from myaccounts.modules.control import notification
            return notification(
                message='Log File not found, likely logging is not enabled.')
        f = open(log_file, 'r', encoding='utf-8', errors='ignore')
        text = f.read()
        f.close()
        heading = '[B]%s -  LogFile[/B]' % name
        windows = TextViewerXML('textviewer.xml',
                                addonPath(),
                                heading=heading,
                                text=text)
        windows.run()
        del windows
    except:
        error()
Esempio n. 4
0
# -*- coding: utf-8 -*-
"""
	My Accounts
"""

from myaccounts.modules import control

myaccounts_path = control.addonPath()
myaccounts_version = control.addonVersion()
changelogfile = control.joinPath(myaccounts_path, 'changelog.txt')


def get():
    r = open(changelogfile)
    text = r.read()
    r.close()
    control.dialog.textviewer(
        '[COLOR red]My Accounts[/COLOR] -  v%s - ChangeLog' %
        myaccounts_version, text)