canva-render/scripts/jobgen.py
2023-12-19 14:39:13 +08:00

22 lines
No EOL
10 KiB
Python

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/khG74dSStBTjyKCwEB7kkg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-89wH4/Z3s0xW_bqb6KbO-dN8w2WA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txuAV-o/hT5AmLJYI7KqC0EYDzAxdQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-VM9fg/H4inRBCd3Gbb7bxC7GqrXA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-tKYRo/lewTq3P92qvNoct1Sns-qQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1twY7cso/SDWSH7B99EeDqnL1K2fdZg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t8US0DM/rarmbkOF5bRHpq6HL1pPmQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txZPv_4/ud5t49ikj4LDXlVyH25BJw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3CHds4/Qu6jsNQtCokAKLhPrFpAZQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tzaPvuQ/bBejCH80HbB_H4d9kUocNg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-0b2pw/dKb0-nOnJP85CBHJ5jwYAA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t5waZPw/fU8MVgGH0m3o6qSTd4jbDg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyAU2Qg/uPUw0jz6XHWnKOtrusjuIQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9cP_-k/zZ1OXI3qC10WfBOo0lqTcQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4uICuw/w_sqvDBVL_Vq_Zkn17gkWA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9Bqn9w/1adZ1oktHM54ArJkrSvYKg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t42nA9g/2OydrAl0GdEcrhdx8iATog/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t_6Pofk/9bFyTCmW5avRbfZBQ6NXjg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9Ekp8U/Nl64kMLfzljnoUNuIVbd3Q/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t8DH6_E/Iow8JNucu4I5idZLZaM9fw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t2H9JiE/S_kplr-kgxLWfQotbSH5_w/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t_seE_w/2r3VtE7rdDivL3leIPl6FQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t7SvTLY/NPcKvvjJQeThIW6FciBHKQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4HcTLY/jzgFUTi0iYktyjxBNCpD0w/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4BTiD4/6ebjdg99Cpq9XIioqRiqQw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tznJGGI/5eR9C1ens-Dy_h5Ku6-dgg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t0V5_h4/DFZqgox7fstZC9hV5eE0MA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyeUee8/XMsqfGfZNFZIg5p_K8xTug/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txJNI60/t-Sxe1Z6353sN7luiiTekw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyZX4Ag/k68p9NVGblWy6LCbk64Ubg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t2x99oU/L90tUGZxs6-MJ_xV3_mgCA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t1oDR7I/8-SgGXL9vhUlpYzZzWv45A/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tx5eNBM/lG3Cdyt4QAHYYoP88fumZw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t1gl6QE/1MD5CLHZFI2ctSTLtvz06w/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t5L6S6Y/xGf3KEnJMuN4Ork34zsHbw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txpwX9g/qfAoGtz29cPKflgaf8L4yQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t4YDmBs/YQE7YLf4JlwFYJ76pGlH4Q/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t500w1Y/oMgvj_PiThbk4qUGcs7iZA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9sVj20/Do9ze1DwEWIp5WGFs_zrgw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t_QCFKg/WwXp_SBtBgeIhA6r65I1Zw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t6Z2GCI/zveteCSlWFGZe-KKZpxtfw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t7_DXJA/PPRCTk9EsYIQTtxiLYdnLA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t3MmMFI/9vPIEMERFCtNq4g64qS4AQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t7fxfBU/X5MAofamlBVdYj_SdNwh9g/edit?continue_in_browser=true","https://www.canva.com/design/DAF1twORUYI/B1oegYMDP5gg0zl1Lh5k_Q/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9K2xHY/X1PcpgBuUtFeetdhApW6iw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t5COMeM/roaPykIVjuZ3cSNBaA-qCQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-pUFNk/sjulET8X4gGZ3nDH_U2BCA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t84Q6T0/LuHLI1ybGWTtmMkM64QIdg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tws5gBY/qf3WUqTf9EMgkTcLeaoRLw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t-6UIRU/f53BCPP5llrP_8wmNTO6Vw/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t0e6R7s/4dB9Uzr_d5bnnB__oAN30g/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t2mKpWg/CFmfZGfCRBJgTNEnfv-5RQ/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t9HRFSg/v4vqZk_74wt9ucI2rssZ8Q/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t5nGqq8/dmZnBL7v9J8ezCjvv1RBIg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1txfTrGI/Qum6gpoLma2cmIETzfglgg/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t81Ozhs/dcD_8DuyyyVbF183dXn5sA/edit?continue_in_browser=true","https://www.canva.com/design/DAF1tyzsGXc/aq5gz7hfxQY9VDupY2039g/edit?continue_in_browser=true","https://www.canva.com/design/DAF1t_50qvo/HAWouQcX9Abc4BrSSq8PYA/edit?continue_in_browser=true"]
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)