Input: pink crank rotating continuously.
Output: orange shaft having reciprocating rotary motion. It’s amplitude can be more than 180 deg. or several revolutions (an ordinary 4-bar linkage can not reach such amplitude).
Black wire wraps about orange pulley 1 or many turns. Its ends are fixed to green bar. Red screw is for creating the wire tension to prevent the cable slippage. For the same purpose fix the cable middle point to the pulley if the cable is long enough.
The cable drive can be replaced with a gear-rack drive: