Browse Source

Project in disarray

pull/1/head
Chris Kiehl 10 years ago
parent
commit
3a361eccad
13 changed files with 168 additions and 22 deletions
  1. 55
      MANIFEST
  2. 72
      README.txt
  3. 2
      gooey/__init__.py
  4. 2
      gooey/app/dialogs/advanced_config_unittest.py
  5. 2
      gooey/app/dialogs/component_register_unittest.py
  6. 4
      gooey/app/dialogs/config_model.py
  7. 1
      gooey/app/images/__init__.py
  8. 12
      gooey/gooey_decorator.py
  9. 2
      gooey/mockapplications/mockapp.py
  10. 5
      gooey/monkey_parser.py
  11. 17
      gooey/parser_exceptions.py
  12. 6
      gooey/source_parser.py
  13. 10
      test.py

55
MANIFEST

@ -0,0 +1,55 @@
# file GENERATED by distutils, do NOT edit
LICENSE.txt
README.txt
setup.py
dist\Gooey-0.1.0\LICENSE.txt
dist\Gooey-0.1.0\README.txt
dist\Gooey-0.1.0\dist\Gooey-0.1.0\LICENSE.txt
dist\Gooey-0.1.0\dist\Gooey-0.1.0\README.txt
dist\Gooey-0.1.0\dist\Gooey-0.1.0\gooey\TODO.txt
dist\Gooey-0.1.0\gooey\TODO.txt
gooey\TODO.txt
gooey\__init__.py
gooey\codegen.py
gooey\gooey.py
gooey\i18n.py
gooey\i18n_unittest.py
gooey\monkey_parser.py
gooey\source_parser.py
gooey\source_parser_unittest.py
gooey\test_queue.py
gooey\app\__init__.py
gooey\app\dialogs\__init__.py
gooey\app\dialogs\action_sorter.py
gooey\app\dialogs\action_sorter_unittest.py
gooey\app\dialogs\advanced_config.py
gooey\app\dialogs\advanced_config_unittest.py
gooey\app\dialogs\argparse_test_data.py
gooey\app\dialogs\base_window.py
gooey\app\dialogs\basic_config_panel.py
gooey\app\dialogs\component_factory.py
gooey\app\dialogs\component_register.py
gooey\app\dialogs\component_register_unittest.py
gooey\app\dialogs\components.py
gooey\app\dialogs\components_unittest.py
gooey\app\dialogs\config_model.py
gooey\app\dialogs\controller.py
gooey\app\dialogs\display_main.py
gooey\app\dialogs\footer.py
gooey\app\dialogs\header.py
gooey\app\dialogs\imageutil.py
gooey\app\dialogs\msg_dialog.py
gooey\app\dialogs\option_reader.py
gooey\app\dialogs\option_reader_unittest.py
gooey\app\dialogs\runtime_display_panel.py
gooey\app\images\__init__.py
gooey\app\images\image_store.py
gooey\languages\__init__.py
gooey\languages\eng.py
gooey\mockapplications\__init__.py
gooey\mockapplications\example_argparse_souce_in_main.py
gooey\mockapplications\example_argparse_souce_in_try.py
gooey\mockapplications\mockapp.py
gooey\mockapplications\module_with_no_argparse.py
gooey\themes\__init__.py
gooey\themes\thm.py

72
README.txt

@ -0,0 +1,72 @@
Gooey
=====
(image)
Turn (almost) any command line program into a full GUI application with one line
What is it?
-----------
Gooey converts your Console Applications into end-user friendly GUI applications. It lets you focus on building robust, configurable programs without having to worry about how it will be presented to and interacted with by your average non-techie person.
Why?
---
Because as much as we love the command prompt, the rest of the world looks at it like some horrific relic from the '80s. As I embarked in the world of freelancing, I wanted to deliver something a little more polished than a black box with white text, and something which was easily understandable and configurable to the end-user.
How does it work?
------------------
Gooey is attached to your code via a simple decorator on your `main` method.
@gooey <--- all it takes! :)
def main():
# rest of code
At runtime, it loads the Abstract Syntax Tree of your module and parses it for all references to `ArgumentParser` (The older `optparse` is currently not supported). These references are then extracted and assigned a `component type` based on the function they provide.
Currently, the `ArgumentParser._actions` are mapped to the following components.
| Action | WxWidget |
|:----------------------|-----------|
| store | TextCtrl |
| store_const | CheckBox |
| store_true| CheckBox |
| store_False | CheckBox|
| append | TextCtrl |
| count| DropDown|
|choice| DropDown|
Installation instructions
------------------------
TODO
----
* Get this thing working.
(picture of osx)
* Themes
* update graphics
* robustify parser
* Optparse support? (do people still use it)
Wanna help?
-----------
Do you art? I'd love to swap out the graphics to something more stylistically unified. That ajax loader is pretty out of place..
Image Credits
-------------

2
gooey/__init__.py

@ -0,0 +1,2 @@
from app import *

2
gooey/app/dialogs/advanced_config_unittest.py

@ -11,7 +11,7 @@ import unittest
import advanced_config
import argparse_test_data
from argparse import ArgumentParser
from app.dialogs.config_model import ConfigModel
from gooey_decorator.app.dialogs.config_model import ConfigModel
class TestAdvancedConfigPanel(unittest.TestCase):

2
gooey/app/dialogs/component_register_unittest.py

@ -18,7 +18,7 @@ class Test(unittest.TestCase):
self.test_class = FakeClassWithoutImplementation()
def testHostClassReceivesMixinFunctions(self):
pass
if __name__ == "__main__":

4
gooey/app/dialogs/config_model.py

@ -6,8 +6,8 @@ Created on Jan 23, 2014
import sys
import types
from monkey_parser import ArgumentError
from app.dialogs.action_sorter import ActionSorter
from gooey.monkey_parser import ArgumentError
from gooey.app.dialogs.action_sorter import ActionSorter

1
gooey/app/images/__init__.py

@ -12,7 +12,6 @@ I was wrong..
import os
PATH = os.path.dirname(__file__)
print PATH
def render_class(assignments):
template = '''

gooey/gooey.py → gooey/gooey_decorator.py

@ -7,15 +7,11 @@ Created on Jan 24, 2014
import os
import wx
import sys
import argparse
import source_parser
from app.dialogs.config_model import ConfigModel, EmptyConfigModel
from app.dialogs import window
from app.dialogs.base_window import BaseWindow
from app.dialogs.advanced_config import AdvancedConfigPanel
from app.dialogs.basic_config_panel import BasicConfigPanel
from i18n import I18N
from gooey.app.dialogs.config_model import ConfigModel, EmptyConfigModel
from gooey.app.dialogs.base_window import BaseWindow
from gooey.app.dialogs.advanced_config import AdvancedConfigPanel
from gooey.app.dialogs.basic_config_panel import BasicConfigPanel
from functools import partial

2
gooey/mockapplications/mockapp.py

@ -8,7 +8,7 @@ import hashlib
from time import time as _time
from time import sleep as _sleep
from argparse import ArgumentParser
from gooey import Gooey
from gooey_decorator import Gooey

5
gooey/monkey_parser.py

@ -6,10 +6,9 @@ Created on Feb 8, 2014
import types
from argparse import ArgumentParser
from parser_exceptions import ArgumentError
class ArgumentError(Exception):
'''Thrown when the parser is supplied with an incorrect argument format'''
pass
class MonkeyParser(object):
'''

17
gooey/parser_exceptions.py

@ -0,0 +1,17 @@
'''
Created on Feb 10, 2014
@author: Chris
'''
class ParserError(Exception):
'''Thrown when the parser can't find argparse functions the client code'''
pass
class ArgumentError(Exception):
'''Thrown when the parser is supplied with an incorrect argument format'''
pass
if __name__ == '__main__':
pass

6
gooey/source_parser.py

@ -16,11 +16,7 @@ import codegen
from itertools import chain
from monkey_parser import MonkeyParser
from app.dialogs.action_sorter import ActionSorter
class ParserError(Exception):
'''Thrown when the parser can't find argparse functions the client code'''
pass
from parser_exceptions import ParserError

10
test.py

@ -0,0 +1,10 @@
'''
Created on Feb 9, 2014
@author: Chris
'''
from gooey import gooey
if __name__ == '__main__':
pass
Loading…
Cancel
Save