<commit_before>#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task renderlayer group log'''
import xml.etree.ElementTree as xmlMod
from TaskList.TaskLog.FrameLog import *


class TaskLog:
	'''class to manage task renderlayer group log'''
	
	
	def __init__(self, xml = None,
						groupName = None,
						preferences = None, 
						task = None):
		'''initialize task renderlayer group log object'''
		if xml is None:
			self.defaultInit(groupName, preferences, task)
		else:
			self.fromXml(xml)
	
	
	
	
	
	def defaultInit(self, groupName, preferences, task):
		'''initialize Task renderlayer group log object by generating from the task settings'''
		self.name = groupName
		
		if groupName = '[main]':
			self.presetName = task.preset
		else
			mainPreset = preferences.presets.getPreset(task.preset)
			self.presetName = mainPreset.groups[groupName]
		
		self.preset = preferences.presets.getPreset(self.presetName).copy()
		
		group = preferences.presets.renderlayers.groups[groupName]
		
		self.renderlayers = []
		for RL in task.info.scenes[task.scene].getActiveRenderlayers():
			if group.belongTo(RL.name)
				self.renderlayers.append(RL.name)
		
	
	
	
	
	
	def fromXml(self, xml):
		'''initialize Task renderlayer group log object with saved log'''
		
	
	
	
	
	
	def toXml(self):<commit_msg>implement frame count in GroupLog<commit_after>#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task renderlayer group log'''
import xml.etree.ElementTree as xmlMod
from TaskList.TaskLog.FrameLog import *


class TaskLog:
	'''class to manage task renderlayer group log'''
	
	
	def __init__(self, xml = None,
						groupName = None,
						preferences = None, 
						task = None):
		'''initialize task renderlayer group log object'''
		if xml is None:
			self.defaultInit(groupName, preferences, task)
		else:
			self.fromXml(xml)
	
	
	
	
	
	def defaultInit(self, groupName, preferences, task):
		'''initialize Task renderlayer group log object by generating from the task settings'''
		self.name = groupName
		
		if groupName = '[main]':
			self.presetName = task.preset
			animation = 0
		else
			mainPreset = preferences.presets.getPreset(task.preset)
			self.presetName = mainPreset.groups[groupName]
			animation = mainPreset.animation[groupName]
		
		self.preset = preferences.presets.getPreset(self.presetName).copy()
		
		group = preferences.presets.renderlayers.groups[groupName]
		
		self.renderlayers = []
		for RL in task.info.scenes[task.scene].getActiveRenderlayers():
			if group.belongTo(RL.name)
				self.renderlayers.append(RL.name)
		
		self.start = task.info.scenes[task.scene].start
		self.end = task.info.scenes[task.scene].end
		if animation != 0:
			self.end = min(self.start+animation-1, self.end)
		
		self.rendered = 0
		
		self.status = 'ready to start'
	
	
	
	
	
	def fromXml(self, xml):
		'''initialize Task renderlayer group log object with saved log'''
		
	
	
	
	
	
	def toXml(self):
{'fraction_non_alphanumeric': 0.11326530612244898, 'fraction_numerical': 0.003401360544217687, 'mean_word_length': 3.573872472783826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '2733242', 'n_tokens_mistral': 1102, 'n_tokens_neox': 911, 'n_words': 233}