Feature Requests: Browse | Submit New | Admin

[#20087] clean up left over files when generating PDFs

Date:
2008-05-12 06:53
Priority:
3
Submitted By:
Lindsay Holmwood (auxesis)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
clean up left over files when generating PDFs

Detailed description
When generating a PDF with Maruku, there are a bunch of files left over that are used when generating the PDF (.tex,
.log, .out, .aux).

Users probably don't expect a whole bunch of other files when asking for a PDF, so it'd be nice if Maruku could clean
up after itself.

Here's a patch to do just that:

Index: bin/maruku
===================================================================
--- bin/maruku	(revision 173)
+++ bin/maruku	(working copy)
@@ -165,6 +165,8 @@
 					# run twice for cross references
 					system cmd 
 					system cmd
+					# clean up stale files
+					Dir.glob("#{job}\.*[^pdf]") do |cruft| File.delete(cruft) end
 				end
 			
 			end

I couldn't find any obvious place to add tests. If there's some place I should be doing this please let me know. 

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-05-12 07:25
Sender: Lindsay Holmwood

That's sane. I knew I forgot something. :-)
Date: 2008-05-12 06:55
Sender: Andrea Censi

Ok, I will add this (but will limit to .tex,
.log, .out, .aux).

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item