customized maps: by tag and id

I would like to create customized osm maps. The requirement is to create a map that contains all roads of specified type but also all roads of a given list of ids.

E.g. highway=primary,secondary,tertiary but also all ids in some whitelist id file. I have a solution that creates two opl files which are then concatenated to form a single map. I am using

and

and

to convert the opl file back to osm.pbf.

Do you have a better, cleaner, more elegant solution?