mikf / gallery-dl

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

Start numbering filenames at zero? #5704

Closed SAI13103 closed 2 weeks ago

SAI13103 commented 2 weeks ago

I'm still learning the syntax, but is it possible to start numbering the filenames in downloaded twitter posts with zero, instead of starting at one? "filename": "[{date:Olocal/%y-%m-%d}] {tweet_id}_p{num}.{extension}"

I live in UTC+9 "filename": "\fF [{date:%y-%m-%d}] {tweet_id}_p{num-1}.{extension}" "filename": "\fE '[{}] {}_p{}.{}'.format(date.strftime('%y-%m-%d'), tweet_id, num-1, extension)"

mikf commented 2 weeks ago

I live in UTC+9

You need to add (or subtract) a timedelta(hours=9) to each date to replicate {date:Olocal}:

{date + timedelta(hours=9):%y-%m-%d}
SAI13103 commented 2 weeks ago

thank you!