Text Conversion and Scripting
Quick Briefing
Using CodeAnywhere, I was able to take a portion of a poem and convert it into a document, PDF, HTML, and ODT formats. A simple script was written to follow commands for text conversions for the sample text. These conversions were pushed to a local repository.
Break Down
Pandoc and TexLive were installed into codeanywhere which are programs that convert text into different formats. Next, a basic BASH script was used to create and execute commands inside a file. A shebang was created to ensure that the correct file was used for the execution. Using Pandoc, a simple command was written for the text conversions. In the SSH, the script was tested and a simple output command told me what the document had been converted to.
What was Converted
This sample of text was taken from A Lady’s Delight, written by: Anonymous from Project Gutenburg
…No more shall Duchesses to Bath repair, Or fly to Tunbridge to procure an Heir; Spring-Gardens can supply their every Want, For here whate’er they ask the Swain wil grant, And future Lords (if they’ll confess the right) Shall owe their Being to this blessed Night; Hence future Wickedness shall take its Rise, (For Masquerade to this is paultry Vice) An Aera of new Crimes shall hence begin, And H—-gg—-r chief Devil be of Sin; No more shall Ugliness be his Disgrace, His Head mends all the Frailties of his Face; When Masques and Balls to their Conclusion drew, To this his last Resort the Hero flew; So by degrees the Errant Knights of old To Glory rose, and by Degrees grew bold; A while content the common Road they trod, ‘Till some great Act at last confess the God.
Links