Hacker News new | ask | show | jobs
by lameiam 1988 days ago
answering my question

this works:

wget https://archive.org/download/Dungeon_Magazine_006/Dungeon_Ma...

I just wrote a quick scrip to increment the issues

mobi = "wget https://archive.org/download/Dungeon_Magazine_{count}/Dungeo..." pdf = "wget https://archive.org/download/Dungeon_Magazine_{count}/Dungeo..."

with open("grab_dragon.sh", "w") as file1: for index in range(200):

        str_index = str(index)
        if len(str_index) != 3:
            str_index = str_index.zfill(3)
        pdf_format = pdf.format(count=str_index)
        mobi_format = mobi.format(count=str_index)

        file1.write(pdf_format + "\n")
        file1.write(mobi_format + "\n")
3 comments

Throw in two spaces before each code line and that will be formatted much better:

  with open("grab_dragon.sh", "w") as file1:
    for index in range(200):
      ...
The script's redering by HN is off. Maybe you should change the indentation somehow?