Skip to main content

Utility to debug Zope Page Templates

Project description

zptlint

Script that runs the pagetemplate parser and output errors

Installation

Because zptlint depends on zope.pagetemplate, it depends on a lot of other zope eggs.

To avoid polluting you system python, you can install zptlint in a virtualenv:

$ virtualenv zptlint
$ cd zptlint/
$ bin/easy_install zptlint

Then make a link to the right script:

$ ln -s MYPATH/zptlint/bin/zptlint

Configuration in .vimrc

"page templates configuration
autocmd BufNewFile,BufRead *.pt,*.cpt,*.zpt setfiletype zpt
autocmd FileType zpt set
   \ makeprg=zptlint\ %
   \ errorformat=%+P***\ Error\ in:\ %f,%Z%*\\s\\,\ at\ line\ %l\\,\ column\ %c,%E%*\\s%m,%-Q

augroup filetype
  au BufWritePost,FileWritePost *.pt make
  au BufWritePost,FileWritePost *.cpt make
  au BufWritePost,FileWritePost *.zpt make
augroup END

Because zpt is defined as a new file type, you may want to copy syntax/html.vim to syntax/zpt.vim and ftplugin/html.vim to ftplugin/zpt.vim.

or usage from command-line in vim:

set makeprg=zptlint\ %
set errorformat=%+P***\ Error\ in:\ %f,%Z%*\\s\\,\ at\ line\ %l\\,\ column\ %c,%E%*\\s%m,%-Q

Credits

  • code by Balazs Ree, Greenfinity

  • eggified by Godefroid Chapelle, BubbleNet

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

zptlint-0.1dev_r1889-py2.4.egg (3.1 kB view details)

Uploaded Source

File details

Details for the file zptlint-0.1dev_r1889-py2.4.egg.

File metadata

File hashes

Hashes for zptlint-0.1dev_r1889-py2.4.egg
Algorithm Hash digest
SHA256 59300cff14a2763edb2184981b0e898a9cc53abca3e876a025ad3e73e502abab
MD5 df1fb6a951ac7a02ae703e6c7b5d7518
BLAKE2b-256 6b6a6a3f6f0d17d7ff870b708e8296010c55eec76643bc350afb3c22b4d58723

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page