Opened 16 years ago
Closed 16 years ago
#3481 closed defect (fixed)
Some cleaning and fixing
Reported by: | Álvaro Iradier | Owned by: | Diorgenes Felipe Grzesiuk |
---|---|---|---|
Priority: | normal | Component: | TracWikiToPdfPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Hi,
after having some problems with the plugin, I decided to do some cleanup and fixing.
- Avoid using a title file when titlefile option is missing. It caused some trouble.
- Changed VERSAO and DATA in title template page to VERSION and DATE, and update example template.
- Fix identation.
- Remove duplicated code to convert from wiki->html and from html->pdf (execute htmldoc).
- Some minor cleanups.
- Updated version to 2.1
Next step is migrating to Genshi :)
I'm attaching the .diff file, and also the full source in .zip, so anyone can download and try.
Attachments (3)
Change History (6)
Changed 16 years ago by
Attachment: | wiki_to_pdf_clean_and_fix.patch added |
---|
Changed 16 years ago by
Attachment: | wikitopdf_2.1.zip added |
---|
comment:1 Changed 16 years ago by
I still get this error when using this updated version: 2008-08-12 13:44:54,843 Trac[formatter] ERROR: Macro Image(visma2.jpg, 200px) failed Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 468, in _macro_formatter
return macro.process(args, in_paragraph=True)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 179, in process
text = self.processor(text)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 166, in _macro_processor
text)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/macros.py", line 425, in expand_macro
if attachment and 'ATTACHMENT_VIEW' in formatter.perm(attachment):
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 523, in has_permission
return self._has_permission(action, resource)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 537, in _has_permission
check_permission(action, perm.username, resource, perm)
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 432, in check_permission
(username, action, resource))
File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/resource.py", line 111, in repr
return '<Resource %r>' % (', '.join(reversed(path)))
TypeError: sequence item 0: expected string, NoneType found
This means that all images in the generated pdf shows up as a error message instead of the attached file.
comment:2 Changed 16 years ago by
Updated the patch to apply cleanly to version 4160.
Changes version 2.1.1 to 2.1.2
Fixed a bug with exporting a "book" from the Admin interface, where the 'pathtocover' variable was not configured correctly.
Ported over the changes introduced in version 2.1.1
Changed 16 years ago by
Attachment: | wikitopdf_2.1.1_to_2.1.2.patch added |
---|
Port the patch to apply to version 2.1.1
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi Friends
Thanks you for correction!
I applied patchs in version 2.2
Regards
Diorgenes F. Grzesiuk
Full code with patch applied