It seems that this post could be quite useful for what I’m trying to do:
Will just leave it here in case someone else stumbles upon my request.