Appending/prepending plain-text documents via macOS Service

Is it possible to adapt this solution to my new problem??