plone / plone/plonecli

Add an init command

Open
#25 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

04 type: enhancement 31 needs: help
Dominant language
Python
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Description

To allow people to use plonecli command like build and serve in existing packages, we could provide an init command which will prepare a directory for plonecli.

What it needs is documented here:
https://bobtemplatesplone.readthedocs.io/en/latest/upgrade-packages.html#bobtemplate-cfg

We basically need a bobtemplate.cfg in the root directory of a package or buildout.
We should ask for a bobtemplate name like addon and write it to the bobtemplate.cfg.
The template name should be a list of existing templates, comming from the plonecli registry.
It has to be the global name, 'plone_addon' not just 'addon'.
Because the configuration is for mrbob and not only for bobtemplates.pone.

The command can be used then like:

plonecli init mybuildout

or just without a directory, for the current directory

plonecli init

also we need to update configure.zcml files to have the placeholder lines, where we inject config.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the upgrade-packages documentation linked in the issue and trace the existing plonecli command entry points and registry handling. Implement plonecli init [directory] so it writes a root bobtemplate.cfg using a selected global template name, and update configure.zcml with the required placeholder lines; verify both current-directory and named-directory usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.