3.15 How to move all terms with y to one side of ode?

Given an ode (or any equation), and we want to move all terms with \(y(x)\) to left side and everything else to right side. This makes it easier to see the forcing function. Select is used for this

moveAllYToOneSide[ode_Equal,y_Symbol,x_Symbol]:=Module[{expr=ode,termsWithNoY,termsWithY}, 
expr=expr[[1]]-expr[[2]]; 
termsWithNoY=Select[expr,FreeQ[#,y]&]; 
termsWithY=Select[expr,Not[FreeQ[#,y]]&]; 
expr=termsWithY==-termsWithNoY 
]
 

Call it as

ode=y[x]*y'[x]+Sin[x]+3-1/y[x]==Sin[y[x]]+Pi*x*y[x]; 
moveAllYToOneSide[ode ,y,x]
 

Gives

-Sin[y[x]]-1/y[x]-Pi x y[x]+y[x] y'[x]==-3-Sin[x]