├── .gitignore ├── LICENSE ├── README.rst ├── cookiecutter.json └── {{cookiecutter.repo_name}} ├── .gitignore ├── LICENSE ├── README.rst ├── android.txt ├── main.py ├── tests ├── __init__.py └── test_{{cookiecutter.repo_name}}app.py └── {{cookiecutter.repo_name}} ├── __init__.py ├── {{cookiecutter.repo_name}}.kv └── {{cookiecutter.repo_name}}app.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Vim 2 | *.swp 3 | *.swo 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | 9 | # C extensions 10 | *.so 11 | 12 | # Distribution / packaging 13 | .Python 14 | env/ 15 | bin/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | 29 | # Installer logs 30 | pip-log.txt 31 | pip-delete-this-directory.txt 32 | 33 | # Unit test / coverage reports 34 | htmlcov/ 35 | .tox/ 36 | .coverage 37 | .cache 38 | nosetests.xml 39 | coverage.xml 40 | 41 | # Translations 42 | *.mo 43 | 44 | # Mr Developer 45 | .mr.developer.cfg 46 | .project 47 | .pydevproject 48 | 49 | # Rope 50 | .ropeproject 51 | 52 | # Django stuff: 53 | *.log 54 | *.pot 55 | 56 | # Sphinx documentation 57 | docs/_build/ 58 | 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Raphael Pierzina 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | cookiecutter-kivy 3 | ================= 4 | 5 | **Please note that this project is no longer actively maintained.** 🚧 6 | 7 | Basic `Cookiecutter`_ template for NUI applications built upon the `Kivy`_ python-framework. 8 | 9 | For a feature-rich `Kivy`_ app template please check out `Cookiedozer`_. 10 | 11 | 12 | Features 13 | -------- 14 | 15 | * `MIT license`_ file 16 | * Customized README 17 | * Python gitignore 18 | 19 | 20 | Usage 21 | ----- 22 | 23 | Create a new app via:: 24 | 25 | cookiecutter https://github.com/hackebrot/cookiecutter-kivy.git 26 | 27 | 28 | Get started easily 29 | ~~~~~~~~~~~~~~~~~~ 30 | 31 | Launch the newly created app via:: 32 | 33 | cd project_directory 34 | python main.py 35 | 36 | 37 | Testsuite included 38 | ~~~~~~~~~~~~~~~~~~ 39 | 40 | Run its tests either with Python 3:: 41 | 42 | cd project_directory 43 | python -m unittest discover 44 | 45 | Or with `nose`_:: 46 | 47 | cd project_directory 48 | nosetests 49 | 50 | Or with `py.test`_:: 51 | 52 | cd project_directory 53 | py.test 54 | 55 | 56 | Deployment-ready 57 | ~~~~~~~~~~~~~~~~ 58 | 59 | The app is ready for deployment to `Kivy Launcher`_ on Android. 60 | 61 | 62 | 63 | License 64 | ------- 65 | 66 | Distributed under the terms of the `MIT license`_, cookiecutter-kivy is free and open source software 67 | 68 | 69 | Issues 70 | ------ 71 | 72 | Report bugs at https://github.com/hackebrot/cookiecutter-kivy/issues. 73 | 74 | 75 | .. _`Cookiecutter`: https://github.com/audreyr/cookiecutter 76 | .. _`Cookiedozer`: https://github.com/hackebrot/cookiedozer 77 | .. _`Kivy Launcher`: http://kivy.org/docs/guide/packaging-android.html#packaging-your-application-for-the-kivy-launcher 78 | .. _`Kivy`: https://github.com/kivy/kivy 79 | .. _`MIT License`: http://opensource.org/licenses/MIT 80 | .. _`nose`: https://github.com/nose-devs/nose/ 81 | .. _`py.test`: http://pytest.org/latest/ 82 | -------------------------------------------------------------------------------- /cookiecutter.json: -------------------------------------------------------------------------------- 1 | { 2 | "full_name": "Raphael Pierzina", 3 | "email": "raphael@hackebrot.de", 4 | "github_username": "hackebrot", 5 | "project_name": "Kivy Project", 6 | "repo_name": "{{cookiecutter.project_name|lower|replace(' ', '')}}", 7 | "project_short_description": "Cookiecutter template for applications built upon the kivy-framework.", 8 | "release_date": "2014-05-15", 9 | "year": "2014", 10 | "version": "0.1.0", 11 | "minimum_kivy_version": "1.8.0", 12 | "orientation": ["all", "landscape", "portrait"] 13 | } 14 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/.gitignore: -------------------------------------------------------------------------------- 1 | # Vim 2 | *.swp 3 | *.swo 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | 9 | # C extensions 10 | *.so 11 | 12 | # Distribution / packaging 13 | .Python 14 | env/ 15 | bin/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | 29 | # Installer logs 30 | pip-log.txt 31 | pip-delete-this-directory.txt 32 | 33 | # Unit test / coverage reports 34 | htmlcov/ 35 | .tox/ 36 | .coverage 37 | .cache 38 | nosetests.xml 39 | coverage.xml 40 | 41 | # Translations 42 | *.mo 43 | 44 | # Mr Developer 45 | .mr.developer.cfg 46 | .project 47 | .pydevproject 48 | 49 | # Rope 50 | .ropeproject 51 | 52 | # Django stuff: 53 | *.log 54 | *.pot 55 | 56 | # Sphinx documentation 57 | docs/_build/ 58 | 59 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{cookiecutter.year}} {{cookiecutter.full_name}} 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/README.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | {{cookiecutter.project_name}} 3 | ============================= 4 | 5 | {{cookiecutter.project_short_description}} 6 | 7 | 8 | Features 9 | -------- 10 | 11 | * TODO 12 | 13 | 14 | Usage 15 | ----- 16 | 17 | Launching the app 18 | ~~~~~~~~~~~~~~~~~ 19 | 20 | `Kivy`_ is compatible with Python 2 as well as Python 3:: 21 | 22 | cd {{cookiecutter.repo_name}} 23 | python main.py 24 | 25 | Running the testsuite 26 | ~~~~~~~~~~~~~~~~~~~~~ 27 | 28 | Run its testsuite either with Python3:: 29 | 30 | cd {{cookiecutter.repo_name}} 31 | python -m unittest discover 32 | 33 | Or with `nose`_:: 34 | 35 | cd {{cookiecutter.repo_name}} 36 | nosetests 37 | 38 | Or with `py.test`_:: 39 | 40 | cd {{cookiecutter.repo_name}} 41 | py.test 42 | 43 | Deploying to Android 44 | ~~~~~~~~~~~~~~~~~~~~ 45 | 46 | You can easily run the app on Android by using the `Kivy Launcher`_. 47 | 48 | 49 | License 50 | ------- 51 | 52 | Distributed under the terms of the `MIT license`_, {{cookiecutter.repo_name}} free and open source software 53 | 54 | 55 | Issues 56 | ------ 57 | 58 | Report bugs at https://github.com/{{cookiecutter.github_username}}/{{cookiecutter.repo_name}}/issues. 59 | 60 | 61 | .. _`Kivy Launcher`: http://kivy.org/docs/guide/packaging-android.html#packaging-your-application-for-the-kivy-launcher 62 | .. _`Kivy`: https://github.com/kivy/kivy 63 | .. _`MIT License`: http://opensource.org/licenses/MIT 64 | .. _`nose`: https://github.com/nose-devs/nose/ 65 | .. _`py.test`: http://pytest.org/latest/ 66 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/android.txt: -------------------------------------------------------------------------------- 1 | title={{cookiecutter.project_name}} 2 | author={{cookiecutter.full_name}} 3 | orientation={{cookiecutter.orientation}} 4 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import kivy 5 | kivy.require('{{cookiecutter.minimum_kivy_version}}') 6 | 7 | from {{cookiecutter.repo_name}}.{{cookiecutter.repo_name}}app import {{cookiecutter.repo_name|capitalize}}App 8 | 9 | if __name__ == "__main__": 10 | {{cookiecutter.repo_name|capitalize}}App().run() 11 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackebrot/cookiecutter-kivy/da841f2bc1e30509444cff3dbd822864bdd87aa2/{{cookiecutter.repo_name}}/tests/__init__.py -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}app.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import unittest 5 | 6 | from {{cookiecutter.repo_name}}.{{cookiecutter.repo_name}}app import {{cookiecutter.repo_name|capitalize}}App 7 | 8 | 9 | class Test{{cookiecutter.repo_name|capitalize}}App(unittest.TestCase): 10 | """TestCase for {{cookiecutter.repo_name|capitalize}}App. 11 | """ 12 | def setUp(self): 13 | self.app = {{cookiecutter.repo_name|capitalize}}App() 14 | 15 | def test_name(self): 16 | self.assertEqual(self.app.name, '{{cookiecutter.repo_name}}') 17 | 18 | def tearDown(self): 19 | pass 20 | 21 | if __name__ == '__main__': 22 | unittest.main() 23 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hackebrot/cookiecutter-kivy/da841f2bc1e30509444cff3dbd822864bdd87aa2/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/__init__.py -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}.kv: -------------------------------------------------------------------------------- 1 | #:kivy {{cookiecutter.minimum_kivy_version}} 2 | 3 | Button: 4 | text: 'Hello World' 5 | 6 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}app.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | 3 | 4 | class {{cookiecutter.repo_name|capitalize}}App(App): 5 | """Basic kivy app 6 | 7 | Edit {{cookiecutter.repo_name}}.kv to get started. 8 | """ 9 | 10 | def build(self): 11 | return self.root 12 | 13 | --------------------------------------------------------------------------------