Unverified Commit 72c443e0 authored by Aral Balkan's avatar Aral Balkan
Browse files

stats: Replace --start with --startIndex and --startDomain

You can now specify whether the stats output should start at a
specific index or a specific domain.
parent b86d9617
......@@ -43,12 +43,12 @@ Statistics.generateIfNecessary(args.all || args.google).then (statistics) ->
startPrinting=true
printCount=0
if args.start? then startPrinting = false
if args.startIndex? or args.startDomain then startPrinting = false
for i in [0...statistics.sitesPerTrackerDescendingOrder.length]
entry = statistics.sitesPerTrackerDescendingOrder[i]
if not startPrinting
if entry.domain is args.start
if entry.domain is args.startDomain or (i + 1) == args.startIndex
startPrinting=true
if startPrinting
......@@ -99,12 +99,12 @@ Statistics.generateIfNecessary(args.all || args.google).then (statistics) ->
startPrinting=true
printCount=0
if args.start? then startPrinting = false
if args.startIndex? or args.startDomain then startPrinting = false
for i in [0...statistics.trackersPerSiteDescendingOrder.length]
entry = statistics.trackersPerSiteDescendingOrder[i]
if not startPrinting
if entry.domain is args.start
if entry.domain is args.startDomain or (i + 1) == args.startIndex
startPrinting=true
if startPrinting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment