mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

Converting powershell files to linux equivalent. #6336

Closed Azuriye closed 6 days ago

Azuriye commented 1 week ago

So I have two powershell files which takes care of scrapping images from a Twitter list and the other which scrapes the twitter IDs of the people in my twitter list.

How would I go about converting them into probably a bash script or a single liner command for linux?

Set the Twitter list URL
$listUrl = "https://twitter.com/i/lists/1537146189883265025"

Define the Start-Process parameters
$processParams = @{
    FilePath      = "gallery-dl"
    ArgumentList = "--range 1-200", $listUrl
    Wait         = $true
    WindowStyle  = "Hidden"
}

Start the process with the specified parameters
Start-Process @processParams

Would the linux equivalent be

gallery-dl --range 1-200 https://twitter.com/i/lists/1537146189883265025`

Secondly,
`Set the Twitter list URL
$listUrl = "https://twitter.com/i/lists/1537146189883265025/members"

Specify the output file
$outputFile = "D:\Documents\gallery-dl\twit_users.txt"

Run gallery-dl command and append output to the specified file
gallery-dl -g $listUrl > $outputFile

Would this just be gallery-dl -g https://twitter.com/i/lists/1537146189883265025/members > /${HOME}/.config/gallery-dl/twit_users

mikf commented 6 days ago
gallery-dl --range 1-200 https://twitter.com/i/lists/1537146189883265025

to download the first 200 files from this list.

gallery-dl -g https://twitter.com/i/lists/1537146189883265025/members > "${HOME}/.config/gallery-dl/twit_users"

to write all member URLs to twit_users