feat: added export to csv file
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace TelegramMessageCounter;
|
||||
using System.Reflection;
|
||||
|
||||
namespace TelegramMessageCounter;
|
||||
|
||||
public static class ArgumentReader
|
||||
{
|
||||
@@ -8,13 +10,12 @@ public static class ArgumentReader
|
||||
string? username = null;
|
||||
if (args.Length > 0 && args.Any(x => x == "--help"))
|
||||
{
|
||||
Console.WriteLine("Usage: TelegramMessageCounter --login (phone number) --user (username) <path>" +
|
||||
"\n login - Phone number of telegram. If argument is empty, waiting for Keyboard interrupt" +
|
||||
"\nuser - Username of telegram for individual stats. If argument is empty, analyzing all user history" +
|
||||
"\n path - Path to save results file. If argument is empty, path will be \"results.txt\"\n");
|
||||
var helpFile = Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("TelegramMessageCounter.help.txt");
|
||||
Console.WriteLine(new StreamReader(helpFile ?? new MemoryStream()).ReadToEnd());
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
||||
if (args.Any(x => x == "--user"))
|
||||
{
|
||||
var userNameArgIndex = args.ToList().IndexOf("--user");
|
||||
|
||||
Reference in New Issue
Block a user