Commits

Rob Lanphier  committed 3e519ec

Metadata cleanup

  • Participants
  • Parent commits 765559e
  • Tags 0.1.1

Comments (0)

Files changed (6)

+include *.txt
+include docs/*
+include jsonwidget/schema/*
-Things to get done before version 0.1
+Roadmap for future versions
 
 On deck:
-*  Improve documentation in __init__.py
-
-Roadmap
-0.1.0:
-*  Put "Add field" over in the data area
-*  "Space" and "enter" should toggle expand/collapse on parent nodes
 
 0.1.1:
 *  Get working with setuptools/easyinstall
-*  Package for Ubuntu, possibly Debian and Fedora, too.
 
 0.1.2:
+*  Package for Ubuntu
+
+0.1.3:
+*  Put "Add field" over in the data area
+*  "Space" and "enter" should toggle expand/collapse on parent nodes
 *  Implement ability to edit arbitrary JSON
 *  Highlight all children when deleting
 *  Preserve key order in json files when saving
 *  Look at SitePen internet draft to see if compatibility is feasible
 
 Someday maybe:
+*  Package for Debian
+*  Package for Fedora
 *  Implement undo/redo stack
 *  Implement "File exists.  Overwrite?"
 *  Implement immediate filename prompt when write fails
 *  Implement read-only flag
 
-Done:
-*  Basic editor
-*  Change schemaNode to schemanode
-*  Make jsonedit populate the data
-*  Break up jsonedit.py into jsonedit, jsonforms-urwid.py and jsonschema.py
-*  get rid of wrapEditFieldWidget (roll into getEditFieldWidget)
-*  Fix up the schema data structure
-*  Create function to get the unused fields
-*  Put valid field names on buttons
-*  Make the button display a list
-*  Saving json files
-*  Implement ability to add child nodes
-*  Fix deep mod problem 
 
-    def setChildData(self, key, data):
-        self.data[key]=data
-        # add this line:
-        self.parent.setChildData(self.key, self.data)
-   This will probably bomb out at the top level....figure out how to mitigate
-   that.
-*  Figure out why running with no params fails
-*  Implement title bar at top
-*  Implement help panel on bottom
-*  Implement "save"
-*  change API of GenericEditWidget to only initialize with a valid JsonNode
-*  Update data for booleans and enumerations
-*  Look up proper doc format for python comments, and start using it.
-*  Adapt browse.py from urwid into reusable TreeWalker component, and use that
-*  Implement ability to delete child nodes
-*  Don't render "Add field" row if there's no fields to add
-*  Use schema key order in editor
-*  Autopopulate required fields with blank data
-*  Fix crashing problem with deleting whole address entries in address book
-*  Disable the "delete" option when a field that can't be deleted is selected
-**  Ensure that "delete" over "add fields" area doesn't cause crash
-**  Provide alert "foo is a required field"
-*  Rename "delete node" to something less compscinerdy
-*  Keep item highlighted while deleting
-*  Change "add fields" to "add items" for sequences
-*  Clean up imports in "jsonedit"
-*  Add alias for editing address books
-*  Remove hardcoded 20 character label column
-*  Remove hardcoded 13 character "Add field" button width
-*  Graceful error on mismatched schema
-*  Minimal check for urwid and simpleparse
-

File jsonwidget/__init__.py

 
 This library allows an application developer to provide a curses-based user 
 interface for an application using not much more than a JSON schema.  The 
-current JSON schema is a subset of the Kwalify syntax described here:
-http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html#schema
+JSON schema language is described here:
+http://robla.net/jsonwidget/jsonschema/
 
 However, most people will find it much simpler to use a tool to generate a 
 schema for tweaking.  The tool available here will generate a schema from an
 import jsonwidget.termedit
 import os
 
+__version__ = "0.1.1"
 
-def run_editor(jsonfile, schemafile=None, program_name="jsonwidget 0.1"):
+def run_editor(jsonfile, schemafile=None, program_name="jsonwidget " + 
+               __version__):
     """ 
     Run a simple editor with a given jsonfile and corresponding schema file.
     """

File jsonwidget/commands.py

         jsonfile = args[0]
     else:
         jsonfile = None
+    progname = "jsonedit " + jsonwidget.__version__
     jsonwidget.run_editor(jsonfile, schemafile=options.schema, 
-                          program_name="jsonedit 0.1")
+                          program_name=progname)
 
 
 def jsonaddress():
         addressbook = None
 
     defschema = jsonwidget.find_system_schema("addressbookschema.json")
-    jsonwidget.run_editor(addressbook, 
-                          schemafile=defschema,
-                          program_name="jsonaddress 0.1")
+    progname = "jsonaddress " + jsonwidget.__version__
+    jsonwidget.run_editor(addressbook, schemafile=defschema,
+                          program_name=progname)
 
 
 if __name__ == "__main__":

File setup.cfg

-[egg_info]
-tag_build = dev
-tag_svn_revision = true
 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.1.1'
+import jsonwidget
+
+version = jsonwidget.__version__
 
 setup(name='jsonwidget',
       version=version,
       description="Dynamic form creation for JSON data structures from JSON schema file",
       long_description="""\
-The jsonwidget libraries are a set of libraries implementing a form interface 
-for editing editing arbitrary JSON files. Implementations so far:
-* jsonwidget-python: A terminal window implementation suitable for editing 
-  forms via ssh or in a local terminal window.
-* jsonwidget-javascript: A client-side Javascript library generates a basic 
-  HTML form interface in the browser
-Application designers using one of these libraries have the option of 
-providing a schema, limiting the input to a subset of valid JSON compatible 
-with whatever application is actually consuming the JSON, or using a provided 
-permissive schema that allows any valid JSON. The libraries are capable of 
-dynamically generating a form is dynamically generated using nothing more than 
-a schema and a JSON file as input.
+This library allows an application developer to provide a curses-based user 
+interface for an application using not much more than a JSON schema.  The 
+JSON schema language is described here:
+http://robla.net/jsonwidget/jsonschema/
 
-The libraries are licensed under a BSD-style license, making the licensing very
-flexible for many different applications.""",
+However, most people will find it much simpler to use a tool to generate a 
+schema for tweaking.  The tool available here will generate a schema from an
+example piece of JSON, and allow editing the resulting file:
+http://robla.net/jsonwidget/example.php?sample=byexample&user=normal
+
+This library currently only operates on a subset of JSON files, but a near-term
+goal is to allow editing of any arbitrary JSON file.
+
+Website: http://robla.net/jsonwidget""",
       # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       classifiers=["Development Status :: 3 - Alpha",
                    "Environment :: Console :: Curses",