If the appellant be found guilty of a violation of the ordinances in question, whether upon the verdict of the jury or otherwise, the Court shall ascertain by its judgment the fine or imprisonment to be paid or suffered by such defendant, having regard to the punishment prescribed by such ordinance, and shall include in any such judgment the cost incurred, by the said Town, as well as in the proceedings before the Mayor as those in Court, including a fee to the attorney for the Town of five dollars, and fees, if any of the Jailor or keeper of the Town prison; and the proceedings to enforce the collection of any such fine and costs may be as provided in section ten, eleven and twelve of Chapter thirty-six of the Code of West Virginia, except the writ mentioned in the tenth section may be issued by the Clerk upon the order of the Mayor of the Town, and the notice contemplated  by the eleventh section, shall be given to such officer. If the judgment be for the defendant, he shall recover his costs against the Town.