Improving bobtemplates.plone

Just a note: the theme subtemplate currently adds a registration of the theme to the configure.zcml of the addon package.
We will change this, because the resulting zcml file comes from lxml then and has a different formating.
We decided to just print a note, what the developer has to do.
This will probably apply to other updating files task later as well.
But it's the best way to not mangle the files.
Be aware that the subtemplates will override files, if they already exist.
So always use a clean repository before using them!

I'm envisioning some kind alias that would allow doing something like:

./bin/plone-cli collective.todos

It would be less to think about.

yes, it's on the list but more important is the new setup now and a release.
We can wrap it later with a thing like that.

plonecli addon collective.todos

or

plonecli theme

and so on

after talking to @tmassman we realized that we need the automatic update of files like setup.py and configure.zcml at least for the tests. So I changed the behavior. Now both files are updated automatically but without a parser. I use the parser to find out if an update of the configure.zcml is needed but the update is just an insert after a marker. The setup.py is also just an insert after checking if the package is contained in any lines. That should work fine like this for now.

I just updated the bobtemplates.plone 3.0-WIP branch.
The generation of content types is improved a lot and more flexible.
Of course it's still WIP but please have a look and give feedback.

I tried to make it as flexible as possible and also choose good defaults.

We have just merged https://github.com/plone/bobtemplates.plone/pull/217 into master.
All tests are running with tox and pytest now, thx @Alexander_Loechel for your help.
Please try it out und give feedback.
The single templates and subtemplates are not fixed yet and probably never will be, so help to improve it and discuss the best practice for them here.
I'll use the template in the next days and will release an 3.0 alpha soon.

2 Likes

with a view bugfixes: https://pypi.python.org/pypi?:action=display&name=bobtemplates.plone&version=3.0.0a1 is out

Hello guys, I just released 3.0.0a2:

3.0.0a2 (2017-10-01)

Cleanup Package - remove unnecessary files from past versions [loechel]
Add vocabulary subtemplate [MrTango]

plonecli is now installable with pip or pipenv like any other package, i made a fork of the click library for now and released it under plonecli-click.

happy hacking :wink:

1 Like