Email Post: Constrained ear decompositions in graphs and digraphs