Skip to content

Commit

Permalink
choose filename from title/uri/number
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiye committed Feb 21, 2024
1 parent ffb30ce commit c0c995f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ internal class Program {

var useTitle = args.Length < 3 ? false : args[2] == "/t";
var useUri = args.Length < 3 ? false : args[2] == "/u";
//Write("Enter 'u' to use url as file name, or smth else to use title: ");
//var useUri = Console.ReadLine() == "u";
if (args.Length == 0) {
Write("Get file names from: 't' (title), 'u' (url), or 'n' (number, by default): ");
var value = Console.ReadLine();
useUri = value == "u";
useTitle = value == "t";
}

var coll = Regex.Matches(content, @"new BookPlayer\([\d]+,\s(\[[^\[]+\]),\s\[");
if (coll.Count == 0 || coll[0].Groups.Count < 2)
Expand Down

0 comments on commit c0c995f

Please sign in to comment.