55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using System.IO;
|
|
|
|
public class SplitNRelatorio : MonoBehaviour
|
|
{
|
|
string pathToFile = "C:/Users/Ryann/Documents/logNewCastle.txt";
|
|
string saveFile = "C:/Users/Ryann/Documents/Aqui/relatorionewcastle.txt";
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
string fileContent = File.ReadAllText(pathToFile);
|
|
|
|
var fileLines = fileContent.Split('\n');
|
|
|
|
int loginNbrs = 0;
|
|
int classesCad = 0;
|
|
int classesMatCad = 0;
|
|
int contAula = 0;
|
|
|
|
foreach (var item in fileLines)
|
|
{
|
|
if (item.Contains("authUser"))
|
|
{
|
|
loginNbrs++;
|
|
}
|
|
|
|
if (item.Contains("classes/insert"))
|
|
{
|
|
classesCad++;
|
|
}
|
|
|
|
if (item.Contains("classes/insertmaterial"))
|
|
{
|
|
classesMatCad++;
|
|
}
|
|
|
|
if (item.Contains("classescontent/insert"))
|
|
{
|
|
contAula++;
|
|
}
|
|
}
|
|
|
|
File.WriteAllText(saveFile, "Logins: " + loginNbrs + "\nCadastro de aulas: " + classesCad + "\nCadastro de materiais de aula: "
|
|
+ classesMatCad + "\nConteudo de aulas: " + contAula);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|