There is just no freaking way such a simple programming task takes so much time!! Remember the hijri automation thingie?. Well, turns out I have not thought it thoroughly enough…
STEP 1: THE FACEPALM
I have no idea how many days is the default for each lunar month!! It could be either 29 or 30. That should also ideally be given from the MCEngine side… Hence, throw everything on ObjC instead of python:
I will leave the details for the reader to figure out as an exercise!
STEP 2: FTP OF GLORY
Then, we use python to get the offset, and access the server through FTP and update the things:
STEP 3: THE SHORTCUT
Finally, of course, we have the shortcut! Remember the post about how my blog pipeline is setup? Remember those convenient commands? Well, one coming up for the kpt update script!
This took longer than ever necessary… And I don’t feel like explaining, so I just dumped the whole code!! :D Note though, the above code could go into an infinite loop, can you figure out when?