-
Notifications
You must be signed in to change notification settings - Fork 24
Devinstaller #6
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
Open
tsk
wants to merge
19
commits into
OpenPymeMx:develop
Choose a base branch
from
tsk:devinstaller
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Devinstaller #6
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6be40fc
Merge branch 'bottle' of /home/git/repositories/openrestaurant/proxypos
agb80 7738448
Fixed bug when printing 3rd line
agb80 ba6f30f
Merge branch 'release-1.1.0'
agb80 4990486
Start adding a gtk gui for proxypos
tsk fa56f01
Added config file with ConfigParser
tsk aadffce
Printer working with config that we read with ConfigParser. Now you c…
tsk 7228031
Save config from gui, reprint last ticket and OpenCashbox from the sy…
tsk 5a2080d
Create an installer for proxypos
tsk f5dd2db
Change vhd_tb_dir to proxypos_dir in setup.py
tsk 829ec24
Cleaning branch
tsk bbab9a1
Cleaning branch
tsk b096cfc
Adding Template capabilities. Formats (image,text): Working on image …
tsk a689817
Installer working. Templates (image in 80%)
tsk 74ccfb6
Remove unused files
tsk d799e1a
Correct path for Template testing
tsk 9be5a6e
Fix no change server port after save. Added text template support usi…
tsk a455c9f
Templates for tickets works (text 100%, image: 95%).
tsk 6bf520c
Fixed a syntax error in gtkgui.__init__.py SystrayIconApp __init__
tsk 14c3bfa
Start cleaning code
tsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| include README.md | ||
| include CHANGELOG.md | ||
| include LICENSE | ||
| include VERSION | ||
| recursive-include proxypos/config * | ||
| recursive-include proxypos/init * | ||
| recursive-include proxypos/proxypos_core/controlers/logo * | ||
| recursive-include proxypos/templates/templates * |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Copyright (c) 2013, Agustín Cruz Lozano. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +0,0 @@ | ||
| # -*- encoding: utf-8 -*- | ||
| ########################################################################### | ||
| # Copyright (c) 2013 OpenPyme - http://www.openpyme.mx/ | ||
| # All Rights Reserved. | ||
| # Coded by: Agustín Cruz Lozano ([email protected]) | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software") to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in | ||
| # all copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| # THE SOFTWARE. | ||
| # | ||
| ############################################################################## | ||
|
|
||
| import os | ||
| import logging.config | ||
|
|
||
| import yaml | ||
|
|
||
| from bottle import run | ||
| from app import app | ||
|
|
||
|
|
||
| def setup_logging( | ||
| default_path='config/logging.yaml', | ||
| default_level=logging.INFO, | ||
| env_key='LOG_CFG' | ||
| ): | ||
| """Setup logging configuration | ||
|
|
||
| """ | ||
| path = default_path | ||
| value = os.getenv(env_key, None) | ||
| if value: | ||
| path = value | ||
| if os.path.exists(path): | ||
| with open(path, 'rt') as f: | ||
| config = yaml.load(f.read()) | ||
| logging.config.dictConfig(config) | ||
| else: | ||
| logging.basicConfig(level=default_level) | ||
|
|
||
|
|
||
| def main(): | ||
| # Set default configuration | ||
| port = '8069' | ||
| path = 'config/proxypos.yaml' | ||
| # Start logg | ||
| setup_logging() | ||
| # Interactive mode | ||
| logger = logging.getLogger(__name__) | ||
| logger.info("ProxyPos server starting up...") | ||
|
|
||
| if os.path.exists(path): | ||
| with open(path, 'rt') as f: | ||
| config = yaml.load(f.read()) | ||
| port = config['port'] | ||
|
|
||
| logger.info("Listening on http://%s:%s/" % ('localhost', port)) | ||
| run(app, host='localhost', port=port, quiet=True) | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env python2 | ||
|
|
||
| from proxypos import proxypos_core | ||
| from proxypos import gtkgui | ||
| #For local testing comment avobe lines | ||
| #uncoment below | ||
| #import proxypos_core | ||
| #import gtkgui | ||
|
|
||
| if __name__ == "__main__": | ||
| gtkgui.run(proxypos_core) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think will be better if we add a command line option allowing people to launch ProxyPoS with or without a graphical interface on a central way, as far as I understand currently there are two ways to launch ProxyPoS and I guess that will be confusing for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.- An installer for the application.
For this reason we have in our bin path two commands more gtk-proxypos.py and proxypos-server. If one user want to load the gui is shorter write gtk-proxypos than proxypos-server --gtk or something like that. But if is needed give the option to load the gui as an option, it can be added, and also can be added the option to load the config file from another location "--conf=path-to-config-files"
Also I was thinking add some kind of plugin/addon manager, to avoid mess up with the main code and separate the pricipipal API from the customizations. In one hand the core API, and in the other the addons/plugins. This can help in make more easy add functionalities/hardware and keep the main code more clean, even if many people wan't to make their own customizations.
As example:
What happend if I add a custom route to the POS, I need to edit app.py to add it, but is a functionality that, in some cases, I'm the only one that is going to use it.
What happend with an addon system? The server automatically look up for addons and load them. Even can be added the posibility read the addons that you need to load from OpenERP.
The more obvious is the print receipt function. What happend if I made an improvement on some other part of the main code that I wan't to merge with the main code, but I change this function. Represent a little more work for the main code mantainer.
Or even, What if I don't need to use the ESC/POS printer. Just think in the case I develop some hardware that let you find the products in the warehouse. Enter or scan the receipt and bring the products to you, or turn on some ligths that guide you to the products. Then why load the printer or template system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think is the most idiomatic python solution (http://mundogeek.net/traducciones/python-idiomatico/)
1.- Add an option to set from command line the option to turn on/off graphical interface
2.- Keep the way you design using two different launch scripts