[giv] Documentation and version updates.



commit 5f53b050490de41b1e533e24fcdcf48a70a3f051
Author: Dov Grobgeld <dov grobgeld gmail com>
Date:   Sat Jan 7 23:19:54 2012 +0200

    Documentation and version updates.

 README          |   33 ++++++++-------------------------
 SConstruct      |    2 +-
 doc/giv.html    |   38 ++++++++++++++++++--------------------
 doc/giv.phtml   |   24 +++++-------------------
 notes.org       |    6 +++++-
 src/giv-win.gob |    2 +-
 6 files changed, 38 insertions(+), 67 deletions(-)
---
diff --git a/README b/README
index 9a8a048..74ee602 100644
--- a/README
+++ b/README
@@ -1,25 +1,8 @@
-                      giv - The G(reat|tk|NU) Image Viewer
-                      Dov Grobgeld <dov grobgeld gmail com>
-                           Monday 2010-01-11 19:31 
-                           http://giv.sf.net/giv
-
-giv is a cross platform image and vector viewer. It was designed
-especially with the scientific vision and the computational geometry
-audience in mind and has support for drawing vector graphics on top of
-the image. It supports 8-bit, 16-bit, 32-bit, floating point gray and
-color images through a plugin system.
-
-Version series 0.9.0 is an almost complete refactoring
-
-Installation:
-
-    The development build environment is scons, and autoconfig is 
-    by constraint.
-    
-    * See INSTALL
-
-Documentation:
-
-    * See doc/giv.html for documentation.
-    * See doc/plugins.txt for documentation about the new plugin system.
-
+Release notes for version 0.1.21
+Friday 2012-01-06 
+
+This version adds remote control of giv through a JSonRpc protocol.
+This makes giv suitable for a remote viewer for a running application.
+There are commands available for changing the image and the vector
+view of an already running giv, as well as prompting the user to 
+click on a coordinate and retrieving the pixel coordinate.
\ No newline at end of file
diff --git a/SConstruct b/SConstruct
index e7cb104..4fea9cb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -87,7 +87,7 @@ if ARGUMENTS.get('mingw', 0):
                  "src/plugins/npy.dll",
                  ],
                 ["makensis giv.wine.nsi"])
-    env.Append(LINKFLAGS=[])
+    env.Append(LINKFLAGS=['-mwindows'])
 
     # TBD - make this installation dependent
     env['PACKAGE_DOC_DIR'] = '../doc'
diff --git a/doc/giv.html b/doc/giv.html
index c273f9a..0ea8995 100644
--- a/doc/giv.html
+++ b/doc/giv.html
@@ -22,7 +22,7 @@
     <font size=-1>Dov Grobgeld</font><br>
     <font size=-1>Homepage: <a href="http://giv.sourceforge.net/giv";>http://giv.sourceforge.net/giv</a></font><br>
     <font size=-1><a href="mailto:dov grobgeld gmail com">dov grobgeld gmail com</a></font><br>
-    <font size=-1>Last modified: 2011-12-23  </font>
+    <font size=-1>Last modified: 2012-01-07   </font>
 </h2>
 
 <h2><a name="SEC1">1. Description</a></h2>
@@ -497,7 +497,7 @@ loaders for the following formats:
 <li>npy (Numerical python)
 </ul>
 
-<h3><a name="SEC4.1">4.1. Remote access protocol</a></h3>
+<h2><a name="SEC5">5. Remote access protocol</a></h2>
 
 giv can be remote controlled through json-rpc commands. The parameters of the commands are always given in an array.
 
@@ -508,36 +508,34 @@ giv can be remote controlled through json-rpc commands. The parameters of the co
 </ul>
 
 Here is an example in python calling the <b>pick_coordinate</b> command:
-<blockquote>
-<pre>
-import httplib,json
-
-conn = httplib.HTTPConnection('localhost:8222')
 
-request = {'method':"pick_coordinate",
-           'params':[]} 
+<table border><tr><th bgcolor=#E0E0FF><a href="pick-coordinate.py">pick-coordinate.py</a><tr><td bgcolor=#FFE0E0><pre><font size=-1 color=red>  1:  </font>import httplib,json 
+<font size=-1 color=red>  2:  </font> 
+<font size=-1 color=red>  3:  </font>conn = httplib.HTTPConnection('localhost:8222') 
+<font size=-1 color=red>  4:  </font> 
+<font size=-1 color=red>  5:  </font>request = {'method':"pick_coordinate", 
+<font size=-1 color=red>  6:  </font>           'params':[]}  
+<font size=-1 color=red>  7:  </font> 
+<font size=-1 color=red>  8:  </font>conn.request("POST", url='', body= json.dumps(request)) 
+<font size=-1 color=red>  9:  </font>response = json.loads(conn.getresponse().read()) 
+<font size=-1 color=red> 10:  </font>if 'error' in response: 
+<font size=-1 color=red> 11:  </font>  print response['error']['message'] 
+<font size=-1 color=red> 12:  </font>else: 
+<font size=-1 color=red> 13:  </font>  print response['result'] </pre></table>
 
-conn.request("POST", url='', body= json.dumps(request))
-response = json.loads(conn.getresponse().read())
-if 'error' in response:
-  print response['error']['message']
-else:
-  print response['result']
-</pre>
-</blockquote>
 <p>
 giv also contains an embedded JSONRPC client that come in two forms, the simplified and the full forms.
 <p>
 The simplified form splits the arguments on whitespace and takes the first argument as the name of the remote method and the rest as the parameters.
 <pre>
-giv -remote "load_file /home/dov/pictures/maja.pgm"
+  giv -remote "load_file /home/dov/pictures/maja.pgm"
 </pre>
 The full forms allows specifying the parameters in json syntax. The following command is equivalent to the above code:
 <pre>
-./giv -json_method load_file -json_params '["/home/dov/github/giv/examples/lena.pgm"]'
+  ./giv -json_method load_file -json_params '["/home/dov/github/giv/examples/lena.pgm"]'
 </pre>
 
-<h2><a name="SEC5">5. Future plans</a></h2>
+<h2><a name="SEC6">6. Future plans</a></h2>
 
 <blockquote>
   Here is a list of possible future development. The direction taken
diff --git a/doc/giv.phtml b/doc/giv.phtml
index 525c6d9..d18e68b 100644
--- a/doc/giv.phtml
+++ b/doc/giv.phtml
@@ -98,7 +98,7 @@ sub code_snippet {   # usage: code_snippet($filename, title)
     <font size=-1>Dov Grobgeld</font><br>
     <font size=-1>Homepage: <a href="http://giv.sourceforge.net/giv";>http://giv.sourceforge.net/giv</a></font><br>
     <font size=-1><a href="mailto:dov grobgeld gmail com">dov grobgeld gmail com</a></font><br>
-    <font size=-1>Last modified: 2011-12-23  </font>
+    <font size=-1>Last modified: 2012-01-07   </font>
 </h2>
 
 <: section("Description") :>
@@ -416,7 +416,7 @@ loaders for the following formats:
 <li>npy (Numerical python)
 </ul>
 
-<: subsection("Remote access protocol") :>
+<: section("Remote access protocol") :>
 giv can be remote controlled through json-rpc commands. The parameters of the commands are always given in an array.
 
 <ul>
@@ -426,33 +426,19 @@ giv can be remote controlled through json-rpc commands. The parameters of the co
 </ul>
 
 Here is an example in python calling the <b>pick_coordinate</b> command:
-<blockquote>
-<pre>
-import httplib,json
-
-conn = httplib.HTTPConnection('localhost:8222')
 
-request = {'method':"pick_coordinate",
-           'params':[]} 
+<: code_snippet("pick-coordinate.py") :>
 
-conn.request("POST", url='', body= json.dumps(request))
-response = json.loads(conn.getresponse().read())
-if 'error' in response:
-  print response['error']['message']
-else:
-  print response['result']
-</pre>
-</blockquote>
 <p>
 giv also contains an embedded JSONRPC client that come in two forms, the simplified and the full forms.
 <p>
 The simplified form splits the arguments on whitespace and takes the first argument as the name of the remote method and the rest as the parameters.
 <pre>
-giv -remote "load_file /home/dov/pictures/maja.pgm"
+  giv -remote "load_file /home/dov/pictures/maja.pgm"
 </pre>
 The full forms allows specifying the parameters in json syntax. The following command is equivalent to the above code:
 <pre>
-./giv -json_method load_file -json_params '["/home/dov/github/giv/examples/lena.pgm"]'
+  ./giv -json_method load_file -json_params '["/home/dov/github/giv/examples/lena.pgm"]'
 </pre>
 
 <: section("Future plans") :>
diff --git a/notes.org b/notes.org
index 6279753..f65cf16 100644
--- a/notes.org
+++ b/notes.org
@@ -16,4 +16,8 @@
 
 * <2011-12-30 Fri>
 ** Async commands
-   - Something is wrong with async communication as there is no handle to the query but only to the server. What if there are several queries done simultanously. How would the server differentiate between them?
+   - Something is wrong with async communication as there is no handle to the query but only to the server. What if there are several queries done simultanously. How would the server differentiate between them? *Ok*
+* <2012-01-06 Fri>
+** Done/Todo
+   - [ ] Create a command line tool for windows with a parser like the one included in giv.
+   
diff --git a/src/giv-win.gob b/src/giv-win.gob
index 0390252..bc517ca 100644
--- a/src/giv-win.gob
+++ b/src/giv-win.gob
@@ -3003,7 +3003,7 @@ cb_menu_about(GtkAction *action,
                               "\n"
                               "<span>%s\n%sEmail: <tt>&lt;%s&gt;</tt></span>\n",
                               ("The G(reat|tk) Image Viewer"),
-                              ("Copyright &#x00a9; Dov Grobgeld, 2011\n"),
+                              ("Copyright &#x00a9; Dov Grobgeld, 2012\n"),
                               ("Programming by: Dov Grobgeld\n"),
                               ("dov grobgeld gmail com"));
     gtk_label_set_markup (GTK_LABEL (label), markup);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]