LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2017, 02:15 AM   #1
zanculmarktum
LQ Newbie
 
Registered: Jan 2017
Distribution: Slackware
Posts: 3

Rep: Reputation: Disabled
Python script to download alienbob's multilib


Awhile back I was running other people's computer that running Windows, so I had to write Python script to download alienbob's multilib packages.
It uses aria2 as the downloader, because it has a feature to only download the file when it's newer than the local file.
You only need to modify BRANCH and MIRROR.

Here's the code:
Code:
https://ptpb.pw/UV4Q/py
 
Old 07-09-2017, 08:28 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
why not using rsync?
 
Old 07-09-2017, 12:11 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,222

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
You could have done it with either a single rsync command or a single lftp command. Either one can download directory trees using single commands, and they both have options to download only new or updated files on subsequent runs.

The following has information on how you could have done the aria2 version better. It also links to sample rsync and lftp commands:

https://stackoverflow.com/a/28553355

Your script runs aria2 once for each individual file. That's not optimal at all.

Last edited by dugan; 07-09-2017 at 07:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alienBOB's vlc.Slackbuild script fails on libavcodec.pc on Slackware64 14.0 multilib. indubitableness Slackware 19 08-20-2013 07:37 AM
slackpkg/blacklist for AlienBob's current multilib and kde 4.4.2 packages damgar Slackware 7 04-08-2010 09:33 PM
downloading alienBOB's multilib files SpelledJ Slackware 5 02-17-2010 11:19 PM
Wrapper script for alienBob's rsync_slackware_patches.sh ? Yalla-One Slackware 4 12-10-2009 07:18 AM
python script download torrents shanenin Programming 2 09-29-2005 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration