def func(): if sys.version_info[0] == 2: LogicNormal.load_log_list = [] with Capturing() as LogicNormal.load_log_list: # note the constructor argument LogicNormal.start_communicate_load() if job_id is not None: command_logger = get_logger('%s_%s' % (package_name, job_id)) LogicNormal.module_load(command, logger=command_logger) else: LogicNormal.module_load(command) for t in LogicNormal.load_log_list: LogicNormal.command_queue.put(t + '\n') else: import io from contextlib import redirect_stdout LogicNormal.load_log_list = io.StringIO() with redirect_stdout(LogicNormal.load_log_list): LogicNormal.start_communicate_load() if job_id is not None: command_logger = get_logger('%s_%s' % (package_name, job_id)) LogicNormal.module_load(command, logger=command_logger) else: LogicNormal.module_load(command) LogicNormal.command_queue.put(LogicNormal.load_log_list.getvalue() + '\n') LogicNormal.command_queue.put('<END>')
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) # 메뉴 정의 menu = { 'main': [package_name, u'플러그인샘플'], 'sub': [['sample', u'sample'], ['log', u'로그']], 'category': 'tool', 'sub2': { 'sample': [['setting', u'설정'], ['list', u'목록'], ['cardlist', u'카드목록'], ['uisample', u'UI샘플']], }, } plugin_info = { 'version': '0.1.0.0', 'name': package_name, 'category_name': 'tool', 'icon': '', 'developer': u'orial', 'description': u'Plugin sample for SJVA', 'home': 'https://github.com/byorial/%s' % package_name, 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'sample' # 기본모듈
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join(os.path.dirname(__file__), 'templates')) menu = { 'main' : [package_name, u'Podcast RSS Maker'], 'sub' : [ ['podbbang', u'팟빵'], ['google', u'구글 드라이브'], ['log', u'로그'] ], 'sub2' : { 'podbbang' : [ ['setting', u'설정'], ], 'google' : [ ['setting', u'설정'], ], }, 'category' : 'service' } plugin_info = { 'version' : '0.2.0.0', 'name' : u'Podcast RSS Maker', 'category_name' : 'service', 'developer' : 'soju6jan', 'description' : u'Podcast 지원', 'home' : 'https://github.com/soju6jan/podcast_feed_maker', 'more' : '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'podbbang'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, u'만화 다운로드'], 'sub': [['manatoki', u'마나토끼'], ['newtoki', u'뉴토끼'], ['log', u'로그']], 'category': 'service', 'sub2': { 'manatoki': [['setting', u'설정'], ['request', u'요청'], ['queue', u'큐'], ['list', u'목록']], 'newtoki': [['setting', u'설정'], ['request', u'요청'], ['queue', u'큐'], ['list', u'목록']], } } plugin_info = { 'version': '0.2.0.0', 'name': 'downloader_comic', 'category_name': 'service', 'icon': '', 'developer': 'soju6jan', 'description': u'만화 다운로드', 'home': 'https://github.com/soju6jan/download_comic', 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'manatoki'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, '봇 다운로드 - TV'], 'sub': [['torrent', '토렌트'], ['vod', 'VOD'], ['log', '로그']], 'category': 'torrent', 'sub2': { 'torrent': [['setting', '설정'], ['list', '목록']], 'vod': [['setting', '설정'], ['list', '목록']] } } plugin_info = { 'version': '0.2.0.0', 'name': 'bot_downloader_ktv', 'category_name': 'torrent', 'developer': 'soju6jan', 'description': '텔레그램 봇으로 수신한 정보로 TV 다운로드', 'home': 'https://github.com/soju6jan/bot_downloader_ktv', 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'torrent'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, u'NGINX'], 'sub': [['setting', u'설정'], ['log', u'로그']], 'category': 'tool', } plugin_info = { 'version': '0.2.0.0', 'name': u'nginx', 'category_name': 'tool', 'icon': '', 'developer': 'soju6jan', 'description': u'nginx proxy', 'home': 'https://github.com/soju6jan/nginx', 'more': '', } #ModelSetting = get_model_setting(package_name, logger) ModelSetting = None logic = None module_list = None home_module = 'setting'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join(os.path.dirname(__file__), 'templates')) menu = { 'main' : [package_name, u'봇 다운로드 - AV'], 'sub' : [ ['receive', u'수신'], ['broadcast', u'방송'], ['log', u'로그'] ], 'category' : 'torrent', 'sub2' : { 'receive' : [ ['setting', u'설정'], ['list', u'수신 목록'] ], 'broadcast' : [ ['setting', u'설정'], ['list', u'방송 목록'] ] } } plugin_info = { 'version' : '0.2.0.0', 'name' : 'bot_downloader_av', 'category_name' : 'torrent', 'developer' : 'soju6jan', 'description' : u'AV 토렌트 수신 & 방송 처리', 'home' : 'https://github.com/soju6jan/bot_downloader_av', 'more' : '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'torrent'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix=f"/{package_name}", template_folder=os.path.join( os.path.dirname(__file__), 'templates'), static_folder=os.path.join(os.path.dirname(__file__), 'static')) menu = { 'category': 'system', 'main': [package_name, '모듈'], 'sub': [['base', u'모듈 설정'], ['log', '로그']], 'sub2': { 'base': [ ['setting', '설정'], ['total', '모듈 목록'], ], } } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'base'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, u'영화 v2'], 'sub': [['basic', u'파일처리'], ['log', u'로그']], 'category': 'fileprocess', 'sub2': { 'basic': [ ['setting', u'설정'], ['list', '처리결과'], ], } } plugin_info = { 'version': '0.2.0.0', 'name': package_name, 'category_name': 'fileprocess', 'icon': '', 'developer': u'soju6jan', 'description': u'파일처리 - 영화 v2', 'home': 'https://github.com/soju6jan/%s' % package_name, 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'basic'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, u'메타데이터'], 'sub': [['movie', u'영화'], ['ktv', u'국내TV'], ['ftv', u'외국TV(개발중. 사용불가)'], ['jav_censored', u'JavCensored'], ['jav_censored_ama', u'JavCensored AMA'], ['log', u'로그']], 'category': 'tool', 'sub2': { 'ktv': [ ['setting', u'설정'], ['test', '테스트' ], #['daum', 'Daum'], ['wavve', '웨이브'], ['tving', '티빙'], ], 'movie': [ ['setting', u'설정'], [ 'test', '테스트' ], #['naver', '네이버'], ['daum', 'Daum'], ['tmdb', 'TMDB'], ['watcha', '왓챠'], ['tmdb', 'TMDB'], ['wavve', '웨이브'], ['tving', '티빙'], ], 'ftv': [ ['setting', u'설정'], ['test', '테스트'], ], 'jav_censored': [ ['setting', u'설정'], ['dmm', 'DMM'], ['javbus', 'Javbus'], ], 'jav_censored_ama': [ ['setting', u'설정'], ['jav321', 'Jav321'], ], } } plugin_info = { 'version': '0.2.0.0', 'name': package_name, 'category_name': 'tool', 'icon': '', 'developer': u'soju6jan', 'description': u'Metadata', 'home': 'https://github.com/soju6jan/%s' % package_name, 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'setting'
class PlugIn: package_name = __name__.split(".", maxsplit=1)[0] logger = get_logger(package_name) ModelSetting = get_model_setting( package_name, logger, table_name=f"plugin_{package_name}_setting") blueprint = Blueprint( package_name, package_name, url_prefix=f"/{package_name}", template_folder=os.path.join(os.path.dirname(__file__), "templates"), ) plugin_info = { "category_name": "torrent", "version": "0.1.2", "name": "torrent_info", "home": "https://github.com/wiserain/torrent_info", "more": "https://github.com/wiserain/torrent_info", "description": "토렌트 마그넷/파일 정보를 보여주는 플러그인", "developer": "wiserain", "zip": "https://github.com/wiserain/torrent_info/archive/master.zip", "icon": "", "install": "2.0.5-211206", } menu = { "main": [package_name, "토렌트 정보"], "sub": [["setting", "설정"], ["search", "검색"], ["log", "로그"]], "category": "torrent", } home_module = "search" module_list = None logic = None def __init__(self): from framework import app, path_data db_file = os.path.join(path_data, "db", f"{self.package_name}.db") app.config["SQLALCHEMY_BINDS"][ self.package_name] = f"sqlite:///{db_file}" from framework.util import Util Util.save_from_dict_to_json( self.plugin_info, os.path.join(os.path.dirname(__file__), "info.json"))
class PlugIn(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) ModelSetting = get_model_setting( package_name, logger, table_name=f'plugin_{package_name}_setting') blueprint = Blueprint(package_name, package_name, url_prefix=f'/{package_name}', template_folder=os.path.join( os.path.dirname(__file__), 'templates')) plugin_info = { "category_name": "torrent", "version": "0.1.0", "name": "tf_viewer", "home": "https://github.com/wiserain/tf_viewer", "more": "https://github.com/wiserain/tf_viewer", "description": "TF 실시간 정보를 보여주는 플러그인", "developer": "wiserain", "zip": "https://github.com/wiserain/tf_viewer/archive/main.zip", "icon": "", } menu = { 'main': [package_name, '티프리카'], 'sub': [['setting', '설정'], ['tmovie', '영화'], ['tdrama', '드라마'], ['tent', '예능'], ['tv', 'TV'], ['tani', '애니'], ['tmusic', '음악'], ['log', '로그']], 'category': 'torrent', } home_module = 'tmovie' module_list = None logic = None def __init__(self): from framework import app, path_data db_file = os.path.join(path_data, 'db', f'{self.package_name}.db') app.config['SQLALCHEMY_BINDS'][ self.package_name] = f'sqlite:///{db_file}' from framework.util import Util Util.save_from_dict_to_json( self.plugin_info, os.path.join(os.path.dirname(__file__), 'info.json'))
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix=f"/{package_name}", template_folder=os.path.join( os.path.dirname(__file__), 'templates'), static_folder=os.path.join(os.path.dirname(__file__), 'static')) plugin_info = { 'version': '0.2.0.0', 'name': package_name, 'category': 'beta', 'icon': '', 'developer': u'soju6jan', 'description': u'국내TV 파일처리 v2', 'home': f'https://github.com/soju6jan/{package_name}', 'more': '', } menu = { 'main': [package_name, u'국내TV v2'], 'sub': [['basic', u'다운로드 파일처리'], ['yaml', u'설정파일을 사용하는 다운로드 파일처리'], ['simple', u'메타 미사용 다운로드 파일처리'], ['analysis', u'방송중 폴더 분석 & 종영 처리'], ['finish', u'종영 폴더 분석'], ['manual', u'매뉴얼'], ['log', u'로그']], 'category': plugin_info['category'], 'sub2': { 'basic': [['setting', u'설정'], ['status', u'처리 상태']], 'yaml': [['setting', u'설정'], ['status', u'처리 상태']], 'simple': [['setting', u'설정'], ['status', u'처리 상태']], 'analysis': [['setting', u'설정'], ['status', u'분석']], 'manual': [['README.md', u'다운로드 파일처리'], ['manual/analysis.md', u'방송중 폴더'], ['manual/finish.md', u'종영 폴더']] } } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'basic'
class PlugIn(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) ModelSetting = get_model_setting( package_name, logger, table_name=f'plugin_{package_name}_setting') blueprint = Blueprint(package_name, package_name, url_prefix=f'/{package_name}', template_folder=os.path.join( os.path.dirname(__file__), 'templates')) plugin_info = { "category_name": "tool", "version": "1.2.0", "name": "vnStat2", "home": "https://github.com/wiserain/vnStat2", "more": "https://github.com/wiserain/vnStat2", "supported_vnstat_version": ["2.6"], "description": "vnStat 정보를 보여주는 플러그인", "developer": "wiserain", "zip": "https://github.com/wiserain/vnStat2/archive/master.zip", "icon": "" } menu = { 'main': [package_name, 'vnStat2'], 'sub': [['setting', '설정'], ['traffic', '트래픽'], ['log', '로그']], 'category': 'tool', } home_module = 'traffic' module_list = None logic = None def __init__(self): from framework import app, path_data db_file = os.path.join(path_data, 'db', f'{self.package_name}.db') app.config['SQLALCHEMY_BINDS'][ self.package_name] = f'sqlite:///{db_file}' from framework.util import Util Util.save_from_dict_to_json( self.plugin_info, os.path.join(os.path.dirname(__file__), 'info.json'))
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) menu = { 'main': [package_name, u'구글 드라이브 공유'], 'sub': [['base', u'기본'], ['user', u'유저공유'], ['log', u'로그']], 'category': 'service', 'sub2': { 'base': [ ['setting', u'기본 설정'], #['list', '목록'] ], #'av_sub' : [ # ['setting', '설정'], ['list', '목록'], ['detail', '세부정보'], ['transfer', '전송'], ['plex', 'PLEX에서 찾기'] #], 'user': [ ['setting', u'설정'], ['upload', u'업로드'], ['list', u'작업현황'] #['download_list', '다운로드 목록'], ] }, } plugin_info = { 'version': '0.2.0.0', 'name': 'gd_share_client', 'category_name': 'service', 'developer': 'soju6jan', 'description': u'구글 드라이브 공유 클라이언트', 'home': 'https://github.com/soju6jan/gd_share_client', 'more': '', 'policy_level': 3, } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'user' SERVER_URL = app.config['DEFINE']['MAIN_SERVER_URL'] plugin_small = None
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates'), static_folder=os.path.join(os.path.dirname(__file__), 'static')) menu = { 'main': [package_name, u'AV v2'], 'sub': [['jav_censored', u'JavCensored'], ['jav_censored_tool', 'JavCensored Tool'], ['log', u'로그']], 'category': 'fileprocess', 'sub2': { 'jav_censored': [ ['setting', u'설정'], ['list', '처리결과'], ], 'jav_censored_tool': [ ['cd3', u'cd3 변경'], ['purge', u'중복제거'], #['play', u'play'], ], } } plugin_info = { 'version': '0.2.0.0', 'name': package_name, 'category_name': 'fileprocess', 'icon': '', 'developer': u'soju6jan', 'description': u'파일처리 - AV v2', 'home': 'https://github.com/soju6jan/%s' % package_name, 'more': '', } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'jav_censored'
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = menu = None plugin_info = { 'version': '0.1.0.0', 'type': 'library', 'name': package_name, 'category_name': 'library', 'developer': u'orial', 'description': u'gdrive api library', 'home': 'https://github.com/byorial/%s' % package_name, 'more': '', } ModelSetting = get_model_setting(package_name, logger) @staticmethod def plugin_load(): P.logger.debug('%s plugin_load' % P.package_name) @staticmethod def plugin_unload(): P.logger.debug('%s plugin_unload' % P.package_name)
def execute_thread_function(command, command_id=-1, **kwargs): try: logger.debug('COMMAND RUN START : %s %s', command, command_id) ret = [] import platform if platform.system() == 'Windows': command = command.encode('cp949') command = command.split(' ') new_command = [] flag = False tmp = None for c in command: if c.startswith('"') and c.endswith('"'): new_command.append(c[1:-1]) elif c.startswith('"'): flag = True tmp = c[1:] elif flag and c.endswith('"'): flag = False tmp = tmp + ' ' + c[:-1] new_command.append(tmp) elif flag: tmp = tmp + ' ' + c else: new_command.append(c) command = new_command if command[0] == 'LOAD': command_logger = get_logger('%s_%s' % (package_name, command_id)) kwargs['logger'] = command_logger return LogicNormal.module_load(command, **kwargs) else: if app.config['config']['is_py2']: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, bufsize=1) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, encoding='utf8') command_logger = None logger.debug(LogicNormal.process_list) if command_id != -1: command_logger = get_logger('%s_%s' % (package_name, command_id)) if command_id in LogicNormal.process_list and LogicNormal.process_list[command_id] is not None: LogicNormal.process_close(LogicNormal.process_list[command_id]) LogicNormal.process_list[command_id] = p logger.debug(LogicNormal.process_list) with p.stdout: iter_arg = b'' if app.config['config']['is_py2'] else '' for line in iter(p.stdout.readline, iter_arg): try: line = line.decode('utf-8') except Exception as exception: try: line = line.decode('cp949') except Exception as exception: pass if command_logger is not None: command_logger.debug(line.strip()) ret.append(line.strip()) p.wait() logger.debug('COMMAND RUN END : %s', command) p = None if command_id in LogicNormal.process_list: del LogicNormal.process_list[command_id] return ret except Exception as exception: logger.error('Exception:%s', exception) logger.error(traceback.format_exc())
class P(object): package_name = __name__.split('.')[0] logger = get_logger(package_name) blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name, template_folder=os.path.join( os.path.dirname(__file__), 'templates')) try: import sqlite3 conn = sqlite3.connect( os.path.join( path_data, 'db', '{package_name}.db'.format(package_name=package_name))) cursor = conn.cursor() key = ('use_av', ) cursor.execute('SELECT value from scmanager_setting where key = ?', key) value = cursor.fetchone() if value[0] == u"True": use_av = True else: use_av = False key = ('use_setting', ) cursor.execute('SELECT value from scmanager_setting where key = ?', key) value = cursor.fetchone() if value[0] == u"True": use_setting = True else: use_setting = False conn.close() except Exception as e: logger.error('failed to get user setting') logger.error('Exception:%s', e) logger.error(traceback.format_exc()) conn.close() use_av = True use_setting = True if use_av: menu = { 'main': [package_name, u'GD바로가기관리'], 'sub': [['scmbase', u'라이브러리관리'], ['tv', 'TV목록'], ['mv', '영화목록'], ['av', 'AV목록'], ['log', u'로그']], 'category': 'service', 'sub2': { 'scmbase': [['setting', u'설정'], ['rulelist', u'경로규칙목록']], }, } else: if use_setting: menu = { 'main': [package_name, u'GD바로가기관리'], 'sub': [['scmbase', u'라이브러리관리'], ['tv', 'TV목록'], ['mv', '영화목록'], ['log', u'로그']], 'category': 'service', 'sub2': { 'scmbase': [['setting', u'설정'], ['rulelist', u'경로규칙목록']], }, } else: menu = { 'main': [package_name, u'GD바로가기관리'], 'sub': [['scmbase', u'라이브러리관리'], ['tv', 'TV목록'], ['mv', '영화목록'], ['log', u'로그']], 'category': 'service', 'sub2': { 'scmbase': [['rulelist', u'경로규칙목록']], }, } plugin_info = { 'version': '0.3.0.3', 'name': package_name, 'category_name': 'service', 'icon': '', 'developer': u'orial', 'description': u'Gdrive shorcut manager for SJVA Plugin', 'home': 'https://github.com/byorial/%s' % package_name, 'more': '', "dependency": [{ "name": "lib_gdrive", "home": "https://github.com/byorial/lib_gdrive" }, { "name": "lib_metadata", "home": "https://github.com/soju6jan/lib_metadata" }] } ModelSetting = get_model_setting(package_name, logger) logic = None module_list = None home_module = 'scmbase'
# -*- coding: utf-8 -*- import sys import requests from framework.logger import get_logger logger = get_logger('wavve') session = requests.session() config = { 'base_url': 'https://apis.pooq.co.kr', 'base_parameter' : { 'apikey' : 'E5F3E0D30947AA5440556471321BB6D9', 'credential' : 'none', 'device' : 'pc', 'partner' : 'pooq', 'pooqzone' : 'none', 'region' : 'kor', 'drm' : 'wm', 'targetage' : 'auto' }, 'headers' : { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36', 'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Language' : 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7' }, }
from framework.logger import get_logger logger = get_logger('framework.common.daum') from .tv import DaumTV from .movie_search import MovieSearch #cookies = {'TIARA':'gaXEIPluo-wWAFlwZN6l8gN3yzhkoo_piP.Kymhuy.6QBt4Q6.cRtxbKDaWpWajcyteRHzrlTVpJRxLjwLoMvyYLVi_7xJ1L'} headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Language': 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7' } import requests session = requests.Session()
import os import json from framework import utils from content.experiments.template_matching import TemplateMatchingExperiment from framework import config from framework import logger _logger = logger.get_logger() ################################################################################################# # CONFIG # ################################################################################################# description = 'template_matching_colored' methods = ['TM_CCOEFF'] amcl_experiments_paths = [ os.path.join(config.base_results_path, 'amcl', 'apr_basic', '15-08-1_15-53-1'), os.path.join(config.base_results_path, 'amcl', 'apr_basic', '15-08-1_16-55-1'), os.path.join(config.base_results_path, 'amcl', 'apr_basic', '15-08-1_19-04-1'), os.path.join(config.base_results_path, 'amcl', 'apr_basic', '15-53-1_16-55-1'), os.path.join(config.base_results_path, 'amcl', 'apr_basic', '15-53-1_19-04-1'), os.path.join(config.base_results_path, 'amcl', 'apr_basic', '16-55-1_19-04-1') ] verbose_mode = False downsample_rate = 10
# -*- coding: utf-8 -*- from framework.logger import get_logger logger = get_logger('framework.common.telegram') from .bot import TelegramBot
import traceback # third-party from flask import Blueprint, request, Response, send_file, render_template, redirect, jsonify, session, send_from_directory from flask_socketio import SocketIO, emit, send from flask_login import login_user, logout_user, current_user, login_required # sjva 공용 from framework.logger import get_logger from framework import app, db, scheduler, path_data, socketio, path_app_root, check_api from framework.util import Util from system.logic import SystemLogic # 패키지 package_name = __name__.split('.')[0] logger = get_logger(package_name) from .model import ModelSetting, ModelAutoHistory from .logic import Logic from .logic_search import LogicSearch from .logic_popular import LogicPopular from .logic_whitelist import LogicWhitelist ######################################################### ######################################################### # 플러그인 공용 ######################################################### blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name,
# -*- coding: utf-8 -*- import requests, re, json, time import traceback, unicodedata from datetime import datetime import traceback import os import json import time import copy from framework import app, SystemModelSetting, py_urllib from framework.util import Util from tool_expand import ToolExpandFileProcess from framework.logger import get_logger logger = get_logger('torrent_process') class TorrentProcess(object): @classmethod def is_broadcast_member(cls): if app.config['config']['is_server'] or app.config['config']['is_debug']: return True return False # 토렌트정보 수신 후 @classmethod def receive_new_data(cls, entity, package_name): try: if not cls.is_broadcast_member(): return if package_name == 'bot_downloader_ktv':