32 lines
1.4 KiB
Bash
Executable file
32 lines
1.4 KiB
Bash
Executable file
#! Name: yolobit.sh
|
|
#! Author: kittykat
|
|
#! Version: 2024.09.20
|
|
#! Desc: Add support for downloading and processing of urls for a new host
|
|
#! Usage: Copy this file into the ./${ScriptDir}/hosts/ folder
|
|
#!
|
|
#! Notes: ! Requires nippy.sh host to download
|
|
#!
|
|
#! ------------ REQUIRED SECTION ---------------
|
|
#! @[UPDATE] HostAndDomainRegexes: This string is loaded into mad.sh and allows dynamic handling of new url data
|
|
#! Format: '/HostCode/HostNick/HostFuncPrefix:HostDomainRegex@'
|
|
#! HostCode: <aUniqueCodeForHost> (ie. 'fh' for filehaus -- cannot be used by other hosts)
|
|
#! HostNick: What is displayed throughout MAD output (ie. 'filehaus' -- "urls.txt has 10 filehaus.." will be displayed)
|
|
#! HostFuncPrefix: <aUniqueStringThatMustPrefixHostFunctions> (ie. 'fh' -- fh_DownloadFile(), fh_FetchFileInfo() .. )
|
|
#! * Note: Must begin with a letter a-z (functions beginning with numbers are no bueno)
|
|
#! HostDomainRegex: The regex used to verify matching urls
|
|
HostCode='yolo'
|
|
HostNick='yolobit'
|
|
HostFuncPrefix='yolo'
|
|
HostUrls='yolobit.com'
|
|
HostDomainRegex='^(http|https)://(.*\.)?yolobit\.com/'
|
|
#!
|
|
#! !! DO NOT UPDATE OR REMOVE !!
|
|
#! This merges the Required HostAndDomainRegexes into mad.sh
|
|
ListHostAndDomainRegexes=${ListHostAndDomainRegexes}'/'${HostCode}'/'${HostNick}'/'${HostFuncPrefix}'/'${HostUrls}':'${HostDomainRegex}'@'
|
|
#!
|
|
#!
|
|
yolo_DownloadFile() {
|
|
local pUrl="$1"
|
|
local pFileCnt="$2"
|
|
nippy_DownloadFile "$pUrl" "$pFileCnt"
|
|
}
|