Use the U / Follow Active Quads unwrap option http://blender-manual.readthedocs.io/en/latest/editors/uv_image/uv_editing/unwrapping/mapping_types.html#follow-active-quads
Unwrap one face first as a square and then select all and use the unwrap method
untitled.blend (112 KB)
You’ll also need to add transparency to the appropriate areas of the texture