canva-render/scripts/jobgen.py

22 lines
10 KiB
Python
Raw Normal View History

2023-12-19 06:39:13 +00:00
import datetime
from itertools import cycle
# Get the current time
now = datetime.datetime.now()
# Format the time as a string without spaces
time_string = now.strftime("%Y%m%d%H%M%S")
canva_edit_urls = ["https://www.canva.com/design/DAF1t2W8fWM/QAfCC_VopoVw9S15lT7tHw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6RtRJ8/d2dYtsTBDquX6yv0P7BDUQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4AVupg/6lzL6W2ZJ7GSPXG305shEg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1twgXTPg/tDXxnayvsJOyUeToxywG1g/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t0Y6ozA/BbKi3f5nHieDXPQ7NW4bTw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tzVk3SM/2UENqHuwg-T-zkMocAjHZg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9BRHjs/b-PEz6waxK3KSskLyxT-qw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t2MYfIM/pD5R8iWgwn4r-WxmcF9Sdg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1twQz9k8/IZv9DuClI0UoZKz2w-FfZQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6Vxdps/AvrSWBZU8vsyEc5Mrnw8bg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txSsGLA/qzTMmacg3BXxkFmCfzO9YQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3TGU7E/9zfUSriMfe8qgXe_b2clFg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t35Q-DY/L4QflwVCwOoMkAtgr2XoKw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t8ar3YI/S6tU3J_JwPLn2SUwf3EMjw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t7S7KNo/koYBUsfJ9crMcuS_Wx-YEw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6K-aLc/hTCNKQkIWjrVVk6EG5sBFQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6Ek_nM/u5FIQQ_ZwYJlOvxnEL37pw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t79yBIw/qHmFFkM_8DwQotT2GLb1Vw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txC5Rws/Wv_wP3Nfrt02uqe7t9SW9Q/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t00-GOc/CrpShiltyrfs9z2v2FpgjA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t5qvyUk/bBtMWbh_TMRPfsXqELyeFw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3t5S3I/KseVhhnROHdGkB5KfuEABw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1twFHzPA/QyIxfzzF8pgC5fAzjJpkoQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyF3VVs/u6zMeU9fXzH-yYyheuYNhA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t70R6q0/yOXAUFV3pHKF-931QPfJ2w/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6zXyBs/wZWhgFAqO0Rvu13RYFj4XA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3Q2AQY/pKqn8qjgY1SwI9KmCC2M7A/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3tmwiE/iHOwhTVTNIOaTyMthxNfUw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyZmqSs/w1G-09PJ1h48_5BRrdNZgw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4VlEzs/ZZoMUzCxB_0KrewZYwZfDQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-gXgkM/dQ9g0dbnBOHY9K235UShnQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t8I6Df4/Hbkmtm7YSmfHKEOLEir63A/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t0oFGWg/R11nydpqQ1A0qn55jyLGJQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t8WhEso/T3j1vTf2E6pfpYeXdzwM9g/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-oo2Hc/YSqB3dONqvgeN9jnGRndzQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4k0LSo/HlBqtYKcYKCZxcgTsLpLxQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t68vt9w/M11qS1G6HpJdPsONWSZEOA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4iTSWU/GldaZI6s6MAplvXzGLCIOQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tzsfE9o/rjSQ4hTqxgN0_r_e2uIdWg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t1ZcHqs/NcWLRR0-YjKN57_F70s7Gw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9_LqkA/sSvVOS4s7iJrHV6gVtKxYg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t1--24w/oTvVexQut3P6esc6ZyhtFw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tzKz1XU/kh
TEMPLATE = \
"""
- name: job {:03}
sku: G1
command:
- sh run.sh /mnt/v-lixinyang/cdf-11.30/x{:03}.json \"{}\""""
print("jobs: ", end="")
url_iter = cycle(canva_edit_urls)
canva_edit_url = next(url_iter)
for i in range(200):
print(TEMPLATE.format(i, i, canva_edit_url), end="")
canva_edit_url = next(url_iter)