View Single Post
Old 03-25-2010, 09:21 PM   #1658
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by MichaelMSeattle View Post
Hi,
For all the recipe developers out there, what methods/tools do you use to debug and test your recipes? I know they're written in Python, but are there specific tools you use for development?
Mine are basic, but it's a matter of organization. I use three files, the GoComics_1.recipe file, a batch file that runs the recipe with the line:
Code:
ebook-convert GoComics_1.recipe GoComics_1 --test -vv> GoComics.txt
and the GoComics.txt log file that has error messages.

I keep all 3 open in my editor (I use Ultraedit, but a more dedicated Python editor might be better).

Ultraedit lets me hit a single key F10 to run the batch file, then updates the GoComics.txt log.
Edit, hit F10, check log, check output directory (GoComics_1 above) html code with Firefox.

If html output is not yet perfect and has stuff I want to remove, open the corresponding web page (the html code in the output dir has the web page source listed at the bottom) then use Firebug to inspect the source page, identify the problem tag with Firebug (right click and "Inspect this element"), modify recipe and hit F10 for another cycle.

If the recipe sort of works, but I want to make a major change or try something different, I save GoComics_1.recipe as GoComics_2.recipe, change the GoComics_1 to GoComics_2 in the batch file and continue on testing, knowing I can go back to version 1 if needed.

Read this and this and this and this.

Last edited by Starson17; 03-25-2010 at 09:28 PM.
Starson17 is offline