how would one add custom checks to the build command?

4 views
Skip to first unread message

Péter Zsoldos

unread,
Nov 14, 2012, 4:55:38 PM11/14/12
to blogofil...@googlegroups.com
Hi,

I would like to enhance blogofile so I could define custom warnings that would be triggered during and/or after build, e.g.:

  • warn if content file contains TODOs (similar to how IDEs/editors handle it in source code comments)
  • I would like to organize my posts in folders, e.g.: published & draft and warn if a post is in the wrong folder
  • warn if I forgot to specify the post date
  • etc.
Is there a hook for it already? If not, where do you think it could/should be added (if at all)?

Thanks,

Peter

--
http://www.linkedin.com/in/zsoldosp :::: http://zsoldosp.blogspot.com :::: http://twitter.com/zsepi

Doug Latornell

unread,
Nov 14, 2012, 5:13:24 PM11/14/12
to blogofil...@googlegroups.com
On Wed, Nov 14, 2012 at 1:55 PM, Péter Zsoldos <peter....@gmail.com> wrote:
Hi,

I would like to enhance blogofile so I could define custom warnings that would be triggered during and/or after build, e.g.:

  • warn if content file contains TODOs (similar to how IDEs/editors handle it in source code comments)
  • I would like to organize my posts in folders, e.g.: published & draft and warn if a post is in the wrong folder
  • warn if I forgot to specify the post date
  • etc.
Is there a hook for it already? If not, where do you think it could/should be added (if at all)?

There are 4 built-in hooks that you can define via _config.py. 3 or them are lightly documented at http://docs.blogofile.com/en/latest/config_file.html#build-hooks and the 4th is build_exception. See blogofile.default_config.py

I haven't used the hooks for anything,  but I do know that they are called in blogofile.main.do_build().

Thanks,

Peter

Doug

Péter Zsoldos

unread,
Nov 15, 2012, 6:16:32 AM11/15/12
to blogofil...@googlegroups.com
Thanks, will check them out!

On Wed, Nov 14, 2012 at 11:13 PM, Doug Latornell <d...@douglatornell.ca> wrote:
On Wed, Nov 14, 2012 at 1:55 PM, Péter Zsoldos <peter....@gmail.com> wrote:
Hi,

I would like to enhance blogofile so I could define custom warnings that would be triggered during and/or after build, e.g.:
[...]
Is there a hook for it already? If not, where do you think it could/should be added (if at all)?

There are 4 built-in hooks that you can define via _config.py. 3 or them are lightly documented at http://docs.blogofile.com/en/latest/config_file.html#build-hooks and the 4th is build_exception. See blogofile.default_config.py

I haven't used the hooks for anything,  but I do know that they are called in blogofile.main.do_build().[...]
Reply all
Reply to author
Forward
0 new messages