Popular recipes tagged "converter" but not "bytes"http://code.activestate.com/recipes/tags/converter-bytes/2016-09-29T18:04:57-07:00ActiveState Code RecipesPut Peewee ORM data to PDF with xtopdf (Python) 2016-09-29T18:04:57-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580704-put-peewee-orm-data-to-pdf-with-xtopdf/ <p style="color: grey"> Python recipe 580704 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/formats/">formats</a>, <a href="/recipes/tags/orm/">orm</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>, <a href="/recipes/tags/peewee/">peewee</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/sqlite/">sqlite</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how some basics of how to fetch data from database tables managed by the Peewee ORM (a lightweight expressive ORM for Python) and write that data, formatted, to a PDF file. The recipe uses Python, the Peewee ORM and the xtopdf toolkit for PDF creation.</p> How to use Python to convert a web page to PDF with a POST request to SelectPdf Online API and save it on the disk (Python) 2015-11-16T14:52:17-08:00SelectPdfhttp://code.activestate.com/recipes/users/4193129/http://code.activestate.com/recipes/579126-how-to-use-python-to-convert-a-web-page-to-pdf-wit/ <p style="color: grey"> Python recipe 579126 by <a href="/recipes/users/4193129/">SelectPdf</a> (<a href="/recipes/tags/api/">api</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/htmltopdf/">htmltopdf</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/selectpdf/">selectpdf</a>). </p> <p>This code converts an url to pdf in Python using SelectPdf HTML To PDF REST API through a POST request. The parameters are JSON encoded. The content is saved into a file on the disk.</p> Image Converter (Python) 2015-01-18T19:14:38-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/579007-image-converter/ <p style="color: grey"> Python recipe 579007 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/conversions/">conversions</a>, <a href="/recipes/tags/convert/">convert</a>, <a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/pil/">pil</a>). </p> <p>Converts an image from one format to another using PIL.</p> Spoken Word to Number (Python) 2012-09-11T18:42:09-07:00Pushpendrehttp://code.activestate.com/recipes/users/4183526/http://code.activestate.com/recipes/578258-spoken-word-to-number/ <p style="color: grey"> Python recipe 578258 by <a href="/recipes/users/4183526/">Pushpendre</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/nlp/">nlp</a>, <a href="/recipes/tags/number/">number</a>, <a href="/recipes/tags/spoken/">spoken</a>). </p> <p>convert number represented the way they are spoken to actual numbers</p> Convert a youtube transcript in srt subtitle (Python) 2010-11-12T01:59:53-08:00Ginkohttp://code.activestate.com/recipes/users/4175855/http://code.activestate.com/recipes/577459-convert-a-youtube-transcript-in-srt-subtitle/ <p style="color: grey"> Python recipe 577459 by <a href="/recipes/users/4175855/">Ginko</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/srt/">srt</a>, <a href="/recipes/tags/transcript/">transcript</a>, <a href="/recipes/tags/youtube/">youtube</a>). </p> <p>A quick and dirty script to convert youtube's transcripts (xml format) to .srt subtitle files.</p> <p>To download youtube's transcript, use this url: <a href="http://video.google.com/timedtext?lang=en&amp;v=VIDEO_ID" rel="nofollow">http://video.google.com/timedtext?lang=en&amp;v=VIDEO_ID</a> (replace "VIDEO_ID" by the ID which is in the video URL).</p> <p>You can easily use this converter in a script which could download the transcript by importing it and then call the main function.</p> Convert XML into JSON (Python dicts and lists structure) (Python) 2011-08-22T13:30:33-07:00Nikolahttp://code.activestate.com/recipes/users/4176190/http://code.activestate.com/recipes/577494-convert-xml-into-json-python-dicts-and-lists-struc/ <p style="color: grey"> Python recipe 577494 by <a href="/recipes/users/4176190/">Nikola</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/xml/">xml</a>). Revision 2. </p> <p>There are many ways to convert a specific XML dialect into JSON for easier consumption by Javascript code. This recipe works for some XML-based data, where the format is not really a document and html tags are used as field placeholders. You can use it as-is, but it is intended to serve as a starting point where you can plug your specific needs.</p> iter_except -- a useful variant of __builtin__.iter() (Python) 2010-03-27T02:04:22-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577155-iter_except-a-useful-variant-of-__builtin__iter/ <p style="color: grey"> Python recipe 577155 by <a href="/recipes/users/178123/">Raymond Hettinger</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/iterator/">iterator</a>, <a href="/recipes/tags/wrapper/">wrapper</a>). </p> <p>Variant of iter(func, sentinel) that looks for an exception rather than for a sentinel value. Good for making iterators from of APIs that advance over a data and return an exception when they are done.</p> Convert PDF to plain text (Python) 2010-11-25T15:30:52-08:00ccpizzahttp://code.activestate.com/recipes/users/4170754/http://code.activestate.com/recipes/577095-convert-pdf-to-plain-text/ <p style="color: grey"> Python recipe 577095 by <a href="/recipes/users/4170754/">ccpizza</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/pdf/">pdf</a>). </p> <p>This is a very raw PDF converter which has absolutely no idea of the page layout or text positioning.</p> <p>To install the required module try <code>easy_install pypdf</code> in a console.</p> Convert Trac wiki markup to HTML (Python) 2010-03-09T08:02:36-08:00ccpizzahttp://code.activestate.com/recipes/users/4170754/http://code.activestate.com/recipes/577094-convert-trac-wiki-markup-to-html/ <p style="color: grey"> Python recipe 577094 by <a href="/recipes/users/4170754/">ccpizza</a> (<a href="/recipes/tags/converter/">converter</a>, <a href="/recipes/tags/trac/">trac</a>). </p> <p>Convert trac wiki markup to HTML Usage: %s &lt;inputfile.wiki&gt; [outputfile.html] If outputfile.html is missing output is redirected to stdout in utf8 encoding.</p>