<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#  IkaLog
#  ======
#  Copyright (C) 2015 <NAME>
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#

from IkaUtils import *
from IkaScene_PlazaUserStat import * #Fixme...

import cv2
import time

# Needed in GUI mode
try:
	import wx
except:
	pass

## IkaOutput_Screenshot: IkaLog Output Plugin for Screenshots
#
# Save screenshots on certain events
class IkaOutput_Screenshot:

	def ApplyUI(self):
		self.resultDetailEnabled = self.checkResultDetailEnable.GetValue()
		self.miiverseDrawingEnabled = self.checkMiiverseDrawingEnable.GetValue()
		self.dir =               self.editDir.GetValue()

	def RefreshUI(self):
		self._internal_update = True
		self.checkResultDetailEnable.SetValue(self.resultDetailEnabled)
		self.checkMiiverseDrawingEnable.SetValue(self.miiverseDrawingEnabled)

		if not self.dir is None:
			self.editDir.SetValue(self.dir)
		else:
			self.editDir.SetValue('')

	def onConfigReset(self, context = None):
		self.resultDetailEnabled = False
		self.miiverseDrawingEnabled = False
		self.dir = './screenshot/'

	def onConfigLoadFromContext(self, context):
		self.onConfigReset(context)<commit_msg>IkaOutput_Screenshot: Update for GUI alpha release<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#  IkaLog
#  ======
#  Copyright (C) 2015 <NAME>
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#

from IkaUtils import *
from IkaScene_PlazaUserStat import * #Fixme...

import cv2
import time
import os

# Needed in GUI mode
try:
	import wx
except:
	pass

## IkaOutput_Screenshot: IkaLog Output Plugin for Screenshots
#
# Save screenshots on certain events
class IkaOutput_Screenshot:

	def ApplyUI(self):
		self.resultDetailEnabled = self.checkResultDetailEnable.GetValue()
		self.miiverseDrawingEnabled = self.checkMiiverseDrawingEnable.GetValue()
		self.dir =               self.editDir.GetValue()

	def RefreshUI(self):
		self._internal_update = True
		self.checkResultDetailEnable.SetValue(self.resultDetailEnabled)
		self.checkMiiverseDrawingEnable.SetValue(self.miiverseDrawingEnabled)

		if not self.dir is None:
			self.editDir.SetValue(self.dir)
		else:
			self.editDir.SetValue('')

	def onConfigReset(self, context = None):
		self.resultDetailEnabled = False
		self.miiverseDrawingEnabled = False
		self.dir = os.path.join(os.getcwd(), 'screenshots')

	def onConfigLoadFromContext(self, context):
		self.onConfigReset(context)
{'fraction_non_alphanumeric': 0.0922809053975624, 'fraction_numerical': 0.006384213580963436, 'mean_word_length': 4.360808709175739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7113446', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1042, 'n_words': 319}