Skip to content

Commit

Permalink
Update UI for console app to be able to use post filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinematics committed May 9, 2017
1 parent 4b5a867 commit 7aa79ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NetTally.Console/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class Options
[Option("usernamefilters", HelpText = "Filters used on usernames.")]
public string UsernameFilters { get; set; }

[Option("postfilters", HelpText = "Filters used on post numbers or IDs.")]
public string PostFilters { get; set; }

[Option("taskfilters", HelpText = "Filters used on tasks.")]
public string TaskFilters { get; set; }

Expand Down
6 changes: 6 additions & 0 deletions NetTally.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ private static Quest GetQuestWithOptions(Options options)
quest.CustomUsernameFilters = options.UsernameFilters;
}

if (!string.IsNullOrEmpty(options.PostFilters))
{
quest.UseCustomPostFilters = true;
quest.CustomPostFilters = options.PostFilters;
}

if (!string.IsNullOrEmpty(options.TaskFilters))
{
quest.UseCustomTaskFilters = true;
Expand Down

0 comments on commit 7aa79ee

Please sign in to comment.