Commit Graph
100 Commits
Author SHA1 Message Date
hallgren 8b76047cda gfse: allow definitions to be reordered by drad-and-drop 2011-02-22 16:04:49 +00:00
hallgren 27f4ad15e3 gfse: fix typos 2011-02-18 14:51:06 +00:00
hallgren a74a0ae980 gfse: document that grammars can be uploaded and tested in the GF shell, the minibar and the translation quiz 2011-02-18 14:47:20 +00:00
hallgren e0030daaa7 gfse: updated screen shots 2011-02-18 14:46:18 +00:00
hallgren 173a5e3db2 gfse: support for linking to the translation quiz 2011-02-18 11:44:05 +00:00
hallgren 8dd2a1ddc0 gfse: some small fixes
+ 'make install' to copy all required files to the server
+ configuration options and error checks in upload.cgi
2011-02-17 17:35:22 +00:00
hallgren c1f0d57210 Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:43:41 +00:00
hallgren 41d37dd353 Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:42:16 +00:00
hallgren cc2f9d012c Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:38:46 +00:00
hallgren eb21e14991 minibar: a small change to make easy to select an alternate grammar directory 2011-01-27 22:23:15 +00:00
hallgren 76736a6662 Translation Quiz: fix for race condition on page load 2011-01-26 16:21:23 +00:00
hallgren 62d1ea5a34 Translation quiz: improvements from Elnaz 2011-01-25 11:58:49 +00:00
hallgren 5d2b203901 New item. GF is part of the CLT Toolkit 2011-01-22 14:26:15 +00:00
hallgren 991a433b17 Fix broken links in GF Quick Reference 2011-01-22 14:14:00 +00:00
hallgren 4fda9b5b63 News: Phrasedroid on the Android Market 2011-01-18 13:13:02 +00:00
hallgren e3d390d81d style.css: remove border from linked GF logotypes 2011-01-18 12:59:55 +00:00
hallgren f8eed920ff Release notes: added a link to documentation of the bracketed string data structure 2011-01-12 13:01:23 +00:00
hallgren 11d6326fae minibar: update my home page link (cs->cse) 2011-01-11 13:18:19 +00:00
hallgren 5d8d1999d8 The name of the fastcgi executable has changed back to pgf-service 2011-01-09 15:32:17 +00:00
hallgren a985ea56ef Download page: some more details on how to install the from darcs repository 2011-01-03 14:42:11 +00:00
hallgren aa290678d6 Download page: add .deb package for easy installation in Ubuntu 2011-01-03 14:41:27 +00:00
hallgren 3f34dee15b Fix to compile GF with GHC>=7.0 2010-12-28 13:54:18 +00:00
hallgren 55c2b7a083 Switch over start page and download page to version 3.2! 2010-12-23 20:35:36 +00:00
hallgren ac6a3eace9 Somewhat better release notes, but more things could be added and some thing could be explained better. 2010-12-23 19:57:41 +00:00
hallgren 345d737e63 download: add 64-bit Linux version + more details in the instructions for building from source 2010-12-23 17:03:40 +00:00
hallgren 730bfd6c11 gf-server.cabal: changes to stop cabal from demanding hsql even when content-server is not going to be built 2010-12-23 17:02:13 +00:00
hallgren bbc90b70f8 Got release not from Olga's notes. They need to be fleshed out, though. 2010-12-23 15:12:31 +00:00
hallgren 37dc9fac42 build-binary-dsit.sh: make paths relative to /usr/local in the final tar file. 2010-12-23 12:40:04 +00:00
hallgren 231ce72bb4 Use i386 rather than i486 in binary package names 2010-12-23 12:18:11 +00:00
hallgren bde22eadb5 Include Urd in the default set of languages to compile 2010-12-23 11:44:40 +00:00
hallgren 46ac2b60e7 Update version number to 3.2.
Code freeze for generation of binary distribution packages is imminent.
2010-12-23 11:26:33 +00:00
hallgren 9a8c660f5e Add release notes file download/release-3.2.t2t. Someone should fill it in. 2010-12-23 11:21:19 +00:00
hallgren 96c1a86e75 Apply stylesheet to GF quickstart 2010-12-23 10:32:39 +00:00
hallgren 0b4aad88f6 Setup.hs: build both alltenses and present by default
Now you can specify more than one mode when building and installing the RGL.
For example to build all modes, run

        runhaskell Setup.hs build alltenses present minimal

The default is to build alltenses and present, which means that a single
command,

        cabal install

is enough to obtain a normal installation of GF. Without this change, additional
build and install commands would be required before you can compile example
grammars, like Foods and Phrasebook.

The build-binary-dist.sh script has been simplified accordingly.
2010-12-22 21:18:47 +00:00
hallgren 40b84d25e3 Documentation fixes
+ Rename some txt2tags file from .txt to .t2t and remove abandoned .txt files.
+ Add program update_html that finds all .t2t documents and updates the
  corresponding .html file. It can be invoked with 'make html'.
+ Add style to some .html documents
2010-12-22 16:57:53 +00:00
hallgren 59b36e0e4a PGF web service: make the generated index.html for pgf-http a bit more informative 2010-12-22 15:06:02 +00:00
hallgren 6eb3d8ae9c gf-server.cabal: update description of fastcgi flag 2010-12-22 15:05:10 +00:00
hallgren ee018154c8 gf-server.cabal: make hsql-mysql optional like fastcgi
content-service depends on hsql-mysql, which depends on a C library, so like
fastcgi, only compile it if you ask for it explicitly with -ffastcgi.
2010-12-22 14:59:49 +00:00
hallgren 5b68ac537f gf-server.cabal: Change the default for the flag fastcgi to False
If you want the fastcgi server, use cabal install -ffastcgi.

This is to avoid problems when you only want to compile pgf-http and the
fastcgi library fails to install, which it usually does, since it depends on
a C library which is not installed automatically with cabal.
2010-12-22 14:49:17 +00:00
hallgren 505d99ec37 PGF web service: Use Content-Type text/javascript from JSON output
The Content-Type used to be text/json, but this caused warning messages in
some web browers.
2010-12-22 14:47:35 +00:00
hallgren 4bab82398c Add build-binary-dist.sh 2010-12-21 22:18:48 +00:00
hallgren ad736fc7b1 download/index-3.2.t2t: first version of download page for GF release 3.2 2010-12-20 21:56:10 +00:00
hallgren 82d32af410 css/style.css: a style sheet for GF web pages 2010-12-20 21:54:51 +00:00
hallgren 9cb4b5db83 gf.cabal: version 3.1.91, remove pgf-http
The version of cabal distributed with Ubuntu 10.10 is too old to handle
executables that refer to the library in the same package, so to not make it
too complicated for Ubuntu users to compile GF from source, pgf-http is no
longer part of the main gf.cabal. :-(
2010-12-17 16:59:35 +00:00
hallgren e8e13a6315 Add -optimize-pgf to Makefile for Foods.pgf 2010-12-17 16:47:25 +00:00
hallgren 65b717c362 minibar.html: omit explicit grammars_url option
The grammars will then by default be fetched from the same server as
minibar.html. This means that everything will be served locally when accessing
minibar through a locally running pgf-http.
2010-12-17 16:43:11 +00:00
hallgren 9ad094577a minibar/support.js: fix comment typos and add links 2010-12-17 16:42:08 +00:00
hallgren 2e6269ddb4 pgf-http now uses $datadir/www instead of ./www as the document root
Along with the changes to Setup.hs it should now be enough to do

	cabal install
	pgf-http
	open http://localhost:41296/

to run the PGF service locally and play with some example grammars in minibar.
2010-12-17 16:35:59 +00:00
hallgren 7ebdacc884 RunHTTP.hs: remove hardcoded document root
The document root is now part of the arguments passed to runHTTP.
2010-12-17 16:33:54 +00:00
hallgren c51d1f9833 Install minibar and some example grammars along with pgf-http
Together with the changes to pgf-http, this should make it much easier to run
the PGF service and minibar locally.
2010-12-17 16:29:22 +00:00
hallgren 13bddae588 numerals: add language flags
to help minibar pick the right default language
2010-12-14 16:41:28 +00:00
hallgren 42259d2957 Update version number to 3.1.90 to indicate that we are getting close to the 3.2 release 2010-12-14 15:43:35 +00:00
hallgren 8bb09fd64a minibar/support.js: add an errorcallback parameter to ajax_http_get 2010-12-09 16:38:16 +00:00
hallgren b39d69eeae minibar.js: restore start_miniabr function for backward compatibility 2010-12-07 13:00:36 +00:00
hallgren 18e3687832 minibar: rewrite minibar.js in a more idiomatic JS OOP style
This provides easier access to minibar internals for people who want to extend
it, but probably also reveals too much of the internal machinery...
2010-12-01 16:37:14 +00:00
hallgren b0027c3305 Let minibar keep its own copy of tree-btn.png 2010-12-01 16:28:27 +00:00
hallgren a2b9a684c0 support.js: add function bind (JS OOP trick) 2010-12-01 16:20:28 +00:00
hallgren acfa9722e2 Setup.hs: improved langs=... option
Instead of just giving an explicit list of languages to compile, you can
now also add and remove languages from the default list by using langs=+...
or langs=-...

Examples:

	cabal build langs=Eng,Swe,Ger   -- as before, compile the given 3 langs
	cabal build langs=-Fin          -- use default languages, but omit Fin 
	cabal build langs=+Urd		-- use default languages + Urd

("cabal build ..." is the same as "runhaskell Setup.hs build ...")
2010-11-30 16:49:15 +00:00
hallgren 47c276a656 Setup.hs: omit urdu when compiling the rgl, for now. 2010-11-30 16:29:36 +00:00
hallgren 8e6421a03e minibar/about.html: minor adjustments 2010-11-28 11:52:48 +00:00
hallgren 4b45cc6b48 Use the internal preprocessors mkPresent and mkMinimal 2010-11-26 18:49:01 +00:00
hallgren 52eb1dcc37 Add builtin preprocessors. Avoid creating tmp file. Fix multipreprocessor bug.
* The gf command line options -preproc=mkPresent and -preproc=mkMinimal now
  refer to internal preprocessors equivalent to lib/src/mkPresent
  and lib/src/mkMinimal.

* The temporary file _gf_preproc.tmp is not created when running an
  internal preprocessor, unless there is an error, since errors messages
  refer to locations in the preprocessed file. (Possibly allowing the rgl
  build to be parallelized.)

* After running an external preprocessor, the temporary file is deleted,
  unless there was an error.

* (Bug fix) Before, when running more than one preprocessor, the same file name
  would be used for both input and output, e.g.,

	mkPresent _gf_preproc.tmp > _gf_preproc.tmp

  which would result in an empty file being processed. Now, the input and
  output files will always be different.
2010-11-26 18:25:29 +00:00
hallgren 4c6b772934 Adding rules for pgf-http to main gf.cabal file
pgf-http is now part of the standard GF build & install.
2010-11-26 15:44:43 +00:00
hallgren 72d2d9b204 Split pgf-server into pgf-fcgi and pgf-http.
The dependency on the fastcgi package made pgf-server difficult to compile, so
it is now split into

  - pgf-fgci (main module in pgf-fcgi.hs), which is built only if fastcgi is
    already installed or if you turn on the fastcgi flag (e.g. by doing
    'cabal install -f fastcgi').

  - pgf-http (main module in pgf-http.hs) which is always built (and hopefully
    has no problematic dependencies.) 

The modules FastCGIUtils and PGFService no longer depend on fastcgi.
2010-11-26 14:30:51 +00:00
hallgren 75ad59b121 pgf-server: more useful JSON output from lineraizeAll
Example:

Request: http://www.grammaticalframework.org:41296/grammars/Quiz.pgf?command=linearizeAll&tree=Run+YouPl

Response: [{"to":"QuizEng","texts":["you run"]},
           {"to":"QuizSwe","texts":["ni l??per","ni springer"]}]

Compared to the old command linearize:

Request: http://www.grammaticalframework.org:41296/grammars/Quiz.pgf?command=linearize&tree=Run+YouPl'

Response: [{"to":"QuizEng","text":"you run"},
           {"to":"QuizSwe","text":"ni l??per"}]
2010-11-25 18:30:30 +00:00
hallgren ee85111d38 minibar/about.html: document recent development 2010-11-23 12:26:32 +00:00
hallgren b46442ab0b examples/numerals: adapt to current GF syntax 2010-11-12 16:46:44 +00:00
hallgren 41df4e00ff Some pgf-server API documentation 2010-11-09 21:02:07 +00:00
hallgren b0594eb545 pgf_online.js: if a grammar list is supplied, you don't have to call switch_grammar. 2010-11-09 16:29:04 +00:00
hallgren 61837063a1 Make PGFService.hs compile again
+ PGFService.hs: add Nothing arguments in calls to PGF.parse_ and
  PGF.getPArseOutput
+ gf-server.cabal: mark content-server as not buildable, since required source
  files are missing.
2010-11-09 15:08:37 +00:00
hallgren 91ba2c01bf minibar.js: code simplification 2010-11-09 11:58:38 +00:00
hallgren e07098e31f support.js: two new functions: commonPrefix & insertFirst 2010-11-05 15:41:06 +00:00
hallgren 524fb1a6bc minibar.js: bug fix: when not using group translation, and a particular language is chosen in the To: menu, the translation would not be displayed 2010-10-28 12:39:56 +00:00
hallgren 7fac5dc089 minibar.js: bug fix: the To: menu wasn't updated properly when switching grammars 2010-10-28 11:53:50 +00:00
hallgren 5fc0e059c5 minibar: restructured code and improved user interface
* Keyboard input and completion should now work much more smoothly:
  + When you press space, the current word will be completed (if incomplete)
    and a new magnet will be created. If there is more than one possible
    completion, no magnet is created, but the common prefix of the possible
    completions is added to the text box.
  + Instead of asking the server for possible completions every time a new
    letter is added to the curent word, minibar only ask for completions for
    whole words and then filters the list locally when more letters are entered,
    speeding things up when server responses are slow.

* Code restructuring:
  + The PGF server API has been moved to its own file: pgf_online.js. This
    allows it to be reused in other applicaitons without importing the entire
    minibar. It also allows minibar to be used with different server interfaces.
  + The minibar code has been rewritten to avoid storing state information
    in the document tree and accessing it by referring to named document
    elements. The code now also avoids using string literals contaning
    the names of top-level functions to specify event handlers for buttons
    and menus. (The code is no longer introspective, so alpha conversion will
    not change its meaning.)
2010-10-26 12:42:33 +00:00
hallgren 1e51a2e9e5 support.js: some enhancements and new functions
+ ajax_http_get(url,callback) now checks the HTTP response status and shows an
  error message if the status is not OK (is not 200)
+ New function node(tag,attrs,children) to create document nodes with arbitraty
  attributes and children. The functions node() and text() should now be enough
  to construct arbitrary document trees in an easy, functional way, and many of
  the more specialized functions could be removed.
+ When calling the function button(label,action,key), the action can be a
  function instead of a string, so you can use local/anonymous functions.
+ New function debug(str) adds text to the element with id=debug, if it
  exists.
2010-10-26 11:52:04 +00:00
hallgren d803d2a925 minibar.js: show the type error messages that can occur for grammars with dependent types 2010-10-18 12:15:30 +00:00
hallgren 26da60d0a9 minibar.js: add an option to enable/disable the Random button 2010-10-17 16:48:21 +00:00
hallgren 8b7d27fe4c minibar: work on adding back support for typing multiple words without pressing enter in between
It mostly works now, but some minor issues still need to be fixed.
2010-09-29 13:03:40 +00:00
hallgren 66672d8af1 minibar: update about.html with description of recent changes 2010-09-28 11:46:32 +00:00
hallgren 1ac7a8bd7c minibar/about.html: fix typos and formatting 2010-09-24 12:57:16 +00:00
hallgren 72fe93a8c4 minibar.html: specify charset, move initialization
Added a meta tag to specify that the file is in UTF-8. This makes the browser
(at least Firefox) assume that the JavaScript files are also in UTF-8, it seems.

Moved the call to start_minibar() from the <body onload="..."> to the end of
the file. The onload action is not executed until all images in the document
has been loaded, while javascipt at the end of the file is executed as soon
as the HTML file has been loaded. (Calling start_minibar() from the head of
the document would be too soon, since it refers to elements in the body,
which hasn't been loaded yet.)
2010-09-24 12:47:18 +00:00
hallgren 8ce7ef3bdd pgf-server HTTP mode: omit charset from ContentType for static files
When pfg-server servers a static file in HTTP mode, it is output as is, so
specifying charset="iso-8859-1" could be wrong. 

Note: the a charset can be specified with a meta tag in HTML files,
e.g. for files in UTF-8:

<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
2010-09-24 12:34:38 +00:00
hallgren 1b6d9ee29d minibar.js: server API code cleanup 2010-09-14 17:15:37 +00:00
hallgren 1f06415774 minibar.js: bug fix: the current word should be accepted when you press enter if it matches one of the possible completions exactly
The current word is also accepted if there is only one remaining possible
completion.
2010-09-14 16:48:20 +00:00
hallgren 7581451852 minibar.js: add access keys to some of the buttons 2010-09-14 16:45:48 +00:00
hallgren 17cf4e1276 support.js: create buttons with access keys 2010-09-10 12:20:07 +00:00
hallgren 2d75820da4 pgf-server HTTP mode: support the Accept-Language header
It is needed for the userLanguage field in the grammar info from pgf-server
2010-09-10 11:20:49 +00:00
hallgren e13e47be8a minibar: default input language is now the user's preferred language, if possible
This is implemented using the userLanguage field in the grammar info output by
pgf-server.
2010-09-10 11:03:46 +00:00
hallgren 46da64cc72 minibar: use AJAX instead of JSONP when possible
Using AJAX instead of JSONP can give better caching in the browser, since the
URL doesn't need to contain a (dynamically generated) callback function name.
But because of the same origin policy in JavaScript, AJAX can only be used when
the HTML file is served from the same server as the PGF. The new function
http_get_json in support.js uses AJAX if this is the case, and falls back to
JSONP otherwise.
2010-09-10 08:38:11 +00:00
hallgren 5290659c2c Minibar: PGF server API: pass callback functions directly instead of passing function names as strings. 2010-09-05 18:06:45 +00:00
hallgren c85c1e1c11 minibar: fix broken link to brushed-metal background
Solution: include a local copy of brushed-metal.png
2010-09-05 18:01:44 +00:00
hallgren 5b09b82f31 pgf-server HTTP mode: workaround for bugs in the httpd-shed package that prevented the fridge and translate web apps from working
queryToArguments "?&input=bla+bla"
           returns [("&input","bla+bla")]
 but should return [("input","bla bla")]
2010-09-03 13:12:08 +00:00
hallgren b1bf971066 pgf-server HTTP mode feature: return the contents of index.html when the URL refers to a directory 2010-09-02 14:10:07 +00:00
hallgren daa726d742 Bug fix: add missing error handler for statically served files in pgf-server HTTP mode 2010-09-02 13:54:16 +00:00
hallgren ac23280320 Standalone HTTP version of pgf-server
pgf-server can now act as a standalone HTTP server. To activate this mode,
start it with

	pfg-server http

to use the default port number (41296), or give an explicit port number, e.g.,

	pgf-server http 8080

The HTTP server serves PGF files in the same way as the old FastCGI interface.
In addition, it also serves static files. The document root for static files
is the www subdirectory of the current directory where pgf-server is started.

In spite of these addition, backwards compatibility is maintaned. The old
FastCGI interface continues to work as before. (It is activated when
pgf-server is started without arguments.)
2010-09-01 14:08:52 +00:00
hallgren 509ccb0db0 Adapt minibar.js to the current GF web service API
Quick fix. More work needed for correct behaviour when multiple words are
entered at once.
2010-08-27 16:46:14 +00:00
hallgren a2fa22ed74 Add missing <td> tags in the HTML constructed by functio show_groupedtranslations 2010-07-13 11:54:42 +00:00
hallgren 2e2d190fd4 Bug fix in minibar.js: no translations where shown when using option show_grouped_translations: false
This affected minibar.html but not phrasebook.html and was
caused by accidental shadowing of function tr in function show_translations.
2010-07-13 11:35:28 +00:00
hallgren d0954d2f20 Make minibar.js work again after backwards incompatible changes to the data structures output by pgf-server.
The canParse field was removed without notice.
2010-07-13 10:22:03 +00:00