Coder Social home page Coder Social logo

snag-eps's People

Contributors

dgets avatar quique avatar

Watchers

 avatar

Forkers

quique

snag-eps's Issues

If the 'endpoint' number isn't perfect, it blows up

determine_numbering_scheme
leading_zero=$?

counter=$((min))
#in the following conditional, $max MAY be entered as a 0x digit; if this is
#the case we'll need to prune that frontal 0
while [ $counter -le $((max)) ]; do

$completeURL being changed to all lower case

This one is interesting. Never bumped into this in shell script before...

When $completeURL is utilized on the command line, the entire string has had all uppercase letters shifted to lower case. Other than that it appears to be building the command line perfectly well.

Continue mode

There should be an option for enabling --continue for wget...

Check command line arguments (at least the count) better

Seriously, I forgot to put a space where I split the URL, and it thought that it was in primitive mode, when it had a wrong argument count due to my type-o. Also, no warning, or error message, was displayed, so yeah--that needs to be done, and stuff.

Verbose mode?

I guess there might be some reasons to try to have a verbose mode in this script, as well...

Conditional in line 41 isn't behaving

Not sure what on earth is going on, but at line 41's conditional test of $minStartChar is refusing. The correct value is (last I checked) ending up in that variable, but the '[' test is borked. None of the comparison operators seem to work. Very strange being as other conditionals that don't seem to have any outstanding syntactical differences are working just fine...

Add parallel snagging capability

Once the general algorithm is hashed out here, it'd be good to be able to specify a certain number of wget threads that can be pulling files concurrently. Might be useful for situations where the host is limiting each connection's bandwidth.

Prepending 0 issues

for cntr in $(seq $min $max) ; do
	#if num is parsed straight from the command line we may need to prune
	#the '0' that we just determined the potential leading zero on
	if [ $leading_zero -eq $TRUE ] ; then
		#so yeah, no double zeros here
		#also if $cntr >= 10, don't prepend that 0
		num="0$cntr"
	else
		num=$cntr
	fi

	completeURL="${urlString1}${num}${urlString2}"
	$WGET $completeURL
done

In the preceding code snippet there are issues with the way the prepended '0' issue has been handled. As you can see in the comments (which have not been committed, at least as of now), there are issues where the number is going to end up with an invalid '00' prefix. Also, there is no checking for whether or not $cntr is greater than ten, in which case we need to omit adding another '0' to it.

Simple fixes, just wanted to get them noted in here in case I get interrupted from coding here and forget what I was working on.

Broken URL user arguments are obtuse

Obviously I need to brush up on sed, and do the searching & splitting of the URL within the script. Having the human parse a pasted URL example specially edited for the script is ridiculous.

Add rate limiting

Now that I see that wget supports rate limiting, it would probably be a handy feature to include variable rate limiting. Hell, maybe even time scheduled rate limiting, though that's probably overkill extreme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.