Skip to content

Commit

Permalink
Wee hour updated README lines
Browse files Browse the repository at this point in the history
  • Loading branch information
erlange committed Oct 24, 2019
1 parent 5f840c1 commit 628999a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ Optional. You can limit the result by specifying **the earliest** timestamp in t
```
wbm-dl yoursite.com -o c:/download -f 20171101210000
```
Will download only the snapshots **on** or **after** *November 01, 2017* at *21:00:00*
Will download only the snapshots since *November 01, 2017* at *21:00:00*
```
wbm-dl yoursite.com -o c:/download -f 2017
```
Will download only the snapshots **in** or **after** the year of *2017*
Will download only the snapshots since the year of *2017*
```
wbm-dl yoursite.com -o c:/download -f 201707
```
Will download only the snapshots **in** or **after** *July 2017*
Will download only the snapshots since *July 2017*
## To Timestamp
```
Expand All @@ -180,17 +180,17 @@ Optional. You can limit the result by specifying **the latest** timestamp in the
```
wbm-dl yoursite.com -o c:/download -t 20180915220000
```
Will download only the snapshots **on** or **before** *September 15, 2018* at *22:00:00*
Will download only the snapshots until *September 15, 2018* at *22:00:00*
```
wbm-dl yoursite.com -o c:/download -t 2018
```
Will download only the snapshots **in** or **before** the year of *2018*
Will download only the snapshots until the year of *2018*
```
wbm-dl yoursite.com -o c:/download -t 201804
```
Will download only the snapshots **in** or **before** *April 2018*.
Will download only the snapshots until *April 2018*.
## Limiting Between Two Timestamps
You can combine both `-f` and `-t` parameters to limit the result between two timestamps. Since both parameters are inclusive, the from and to parameter values are included to the result.
Expand All @@ -199,19 +199,19 @@ You can combine both `-f` and `-t` parameters to limit the result between two ti
```
wbm-dl yoursite.com -o c:/download -f 20171101210000 -t 20180915220000
```
Will download only the snapshots **between** *November 01, 2017 21:00:00* **and** *September 15, 2018 22:00:00*.
Will download only the snapshots since *November 01, 2017 21:00:00* until *September 15, 2018 22:00:00*.
```
wbm-dl yoursite.com -o c:/download -f 2017 -t 201804
```
Will download only the snapshots **between** the year of *2017* **and** *April 2018*.
Will download only the snapshots since *2017* until *April 2018*.
```
wbm-dl yoursite.com -o c:/download -f 2017 -t 2017
```
Will download only the snapshots in *2017*.
Will download only the snapshots during *2017*.
## Limiting The Number of Files to Download
```
Expand Down Expand Up @@ -304,9 +304,9 @@ The JSON-formatted log file contains metadata as follows:
* `Num`
Line number.
* `Original`
Contains the original address of the URL. Not the archived location.
Contains the original location of the item.
* `Source`
Contains the archived address of the URL.
Contains the archived location of the item in the Internet Wayback Archive Machine. You can use the value for manually downloading.
* `Status`
Contains the HTTP status code. If flag `-A` is omitted and no error occured the value will be `200 (OK)`. If this value is empty an error might have occured. You can then consult the `ErrorMsg` to examine the error and use the `Source` to manually download the individual file.
* `Target`
Expand Down
18 changes: 12 additions & 6 deletions WaybackDownloader.NET.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void Main(string[] args)
}

string url = BuildOptions(opts);
//Console.WriteLine(url);
//Console.WriteLine(url);
List<Archive> archives = GetResponse(url);

if (archives.Count == 0)
Expand Down Expand Up @@ -216,6 +216,12 @@ static string BuildOptions(Options opts)

builder.Query = query.ToString();
resultUrl = builder.ToString();

if (!String.IsNullOrEmpty(opts.OnlyFilter))
resultUrl = builder.ToString() + "&filter=original:" + opts.OnlyFilter;
if (!String.IsNullOrEmpty(opts.ExcludeFilter))
resultUrl = builder.ToString() + "&filter=!original:" + opts.ExcludeFilter;

}

return resultUrl;
Expand Down Expand Up @@ -645,14 +651,14 @@ class Options
[Option('e', "exact", HelpText = "Downloads only the url provided and not the full site.")]
public bool ExactUrl { get; set; }

[Option('L', "list", HelpText = "Displays only the list in a JSON format with the archived timestamps, does not download anything.")]
[Option('L', "List", HelpText = "Displays only the list in a JSON format with the archived timestamps, does not download anything.")]
public bool ListOnly { get; set; }

//[Option("only", HelpText = "Restrict downloading to urls that match this filter.")]
//public string OnlyFilter { get; set; }
[Option('O',"Only", HelpText = "Restrict downloading to urls that match this filter.",Hidden =true)]
public string OnlyFilter { get; set; }

//[Option("exclude", HelpText = "Skip downloading of urls that match this filter.")]
//public string ExcludeFilter { get; set; }
[Option('X', "Exclude", HelpText = "Skip downloading of urls that match this filter.", Hidden = true)]
public string ExcludeFilter { get; set; }

[Option('v', "verbose", Hidden = true, HelpText = "Verbose mode. Won't display progress status. Only displays completion status.")]
public bool Verbose { get; set; }
Expand Down
1 change: 1 addition & 0 deletions WaybackDownloader.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WaybackDownloader.NET.CLI",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8E83EC4D-24EF-492E-8BE1-E71EDF98EC50}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Expand Down

0 comments on commit 628999a

Please sign in to comment.