Eric at Lucii.org on 11 Jun 2013 10:27:35 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] wget options to retrieve file from github


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Does anyone know if there is a way to use wget to download a file and
have it use the actual file name instead of the part after the last
slash?  For example, this URL:

  https://github.com/mehrpadin/Superfish-for-Drupal/zipball/master

I know that I can use -O filename.zip to rename the download file
but I have no idea what the file should be named (other than maybe
"superfish".)  I can guess it's a zip file from the URL element
"zipball".

When I do this:

  wget --spider https://github.com/mehrpadin/Superfish-for-Drupal/zipball/master

Spider mode enabled. Check if remote file exists.
- --2013-06-11 10:36:22--  https://github.com/mehrpadin/Superfish-for-Drupal/zipball/master
Resolving github.com... 204.232.175.90
Connecting to github.com|204.232.175.90|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/mehrpadin/Superfish-for-Drupal/legacy.zip/master [following]
Spider mode enabled. Check if remote file exists.
- --2013-06-11 10:36:22--  https://codeload.github.com/mehrpadin/Superfish-for-Drupal/legacy.zip/master
Resolving codeload.github.com... 204.232.175.86
Connecting to codeload.github.com|204.232.175.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 55979 (55K) [application/zip]
Remote file exists.

...I see that there is a sort-of actual filename in the URL: legacy.zip


Any hints/tips/tricks/cheat codes/insights would be appreciated,

Oops, stumbled upon this:

  https://addons.mozilla.org/en-US/firefox/addon/cliget/

Very clever program - I think I'll use it even if I have to switch back
to FireFox sometimes.

Eric
- -- 
#  Eric Lucas
#
#                "Oh, I have slipped the surly bond of earth
#                 And danced the skies on laughter-silvered wings...
#                                        -- John Gillespie Magee Jr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlG3Xg0ACgkQ2sGpvXQrZ/5zWwCeNChxzpc7VQwutHmIQKpNhZRp
QkwAniTlgvzkrZnAsMk/pRG8RySz5tUE
=6HLF
-----END PGP SIGNATURE-----
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug