Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play import/export #10

Open
obraunsdorf opened this issue Jul 28, 2019 · 1 comment
Open

Play import/export #10

obraunsdorf opened this issue Jul 28, 2019 · 1 comment
Labels
good first issue easy for first-time contributors new feature

Comments

@obraunsdorf
Copy link
Owner

Import specific plays from another playbook file to the currently opened playbook.
Export specific plays from the current playbook to a file.
This feature should be useful for sharing only some plays from a team's playbook, e.g. for coaches to exchange certain plays, or for multiple teammates to contribute to one playbook.

@obraunsdorf obraunsdorf added enhancement good first issue easy for first-time contributors and removed enhancement labels Jul 28, 2019
obraunsdorf added a commit that referenced this issue Apr 8, 2020
This merges some code which does essentially 2 things:
- setting up a unit test infrastructure with the Boost test framework
- implementing basic functionality to import another playbook, including tests

The implemented importing functionality is one big step for issue #10. 
The API supports importing all plays, categories, formations and routes.
However, you cannot choose which particular plays to import and which not.
Furthermore, there is no exporting functionality, yet to let you choose
which particular plays/categories/.. you want to export.
There is also a GUI dialog missing to fully use the current API.
Currently, it is hardcoded that plays, categories and formations (but no
routes) are imported and that the name of everyone of these are prefixed
with 'imported_'.


To implement playbook importing there are some changes to the codebase:
There is a new class PBCController. This addresses issue #20 and is a first step for centralizing the business logic of PBC.
For now, the PBCController simply does nothing else than maintaining the active instance of PBCPlaybook.
The class PBCPlaybook is no longer a singleton. There is the one "active Playbook" object instead.
This was necessary to be able to instantiate another object of PBCPlaybook for another playbook to be imported.

Moreover several adaptions for the CI scripts were necessary.
@obraunsdorf
Copy link
Owner Author

The basis for import/export of whole playbooks has been set in commit fc28a70.

The implemented importing functionality is one big step for this issue.
The API supports importing all plays, categories, formations and routes.
However, you cannot choose which particular plays to import and which not.
Furthermore, there is no exporting functionality, yet to let you choose
which particular plays/categories/.. you want to export.
There is also no GUI dialog yet to fully use the current API.
Currently, it is hardcoded that plays, categories and formations (but no
routes) are imported and that the name of everyone of these are prefixed
with 'imported_'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy for first-time contributors new feature
Projects
None yet
Development

No branches or pull requests

1 participant