Commit Graph
100 Commits
Author SHA1 Message Date
hallgren 2c6c85974e gfse: minor layout/formatting variation 2011-03-06 10:19:17 +00:00
hallgren 697e96f539 minibar: add icon for word alignment button 2011-03-03 19:19:47 +00:00
hallgren a0cd2c232b minibar: add a button to display word alignment 2011-03-03 19:18:09 +00:00
hallgren affdcf421e GF shell restricted mode
By setting the environment variable GF_RESTRICTED before starting GF, the shell
will be run in restricted mode. This will prevent the GF shell from starting
arbitrary system commands (most uses of System.Cmd.system are blocked) and
writing arbitrary files (most commands that use writeFile et al are blocked).

Restricted mode is intended minimize the potential security risks involved
in allowing public access to the GF shell over the internet. It should be used
in conjuction with system level protection mechanisms (e.g. file permissions)
to make sure that a publicly acessible GF shell does not give access to parts
of the system that should not be publicly accessible.
2011-03-03 15:42:57 +00:00
hallgren 65e1ea2fc4 gf.cabal: bump version number, add source repository info
I changed the version number to 3.2.1-darcs.
I think the version number of the current version from darcs should always
include the "-darcs" suffix (or "-current" perhaps?). The suffix should be
removed only momentarily when making an official release.
2011-03-03 15:24:43 +00:00
hallgren da740b51c2 minibar/support.js: recognize relative URLs as locations on the same server
This means that the relative grammar directory location in the default
configuration will result in AJAX requests rather than the less efficient
JSONP requests.
2011-03-01 14:47:20 +00:00
hallgren a27f58d6ae minibar: make the feedback form work in the generic minibar
It is still disabled by default, since some manual configuraiton of
feedback.cgi is required.
2011-03-01 13:46:00 +00:00
hallgren aad6e864b9 gfse: fix missing startcat flag bug + documentation updates 2011-02-28 16:47:25 +00:00
hallgren fe9eaf0ddd gfse: fix persmission problem in upload.cgi 2011-02-28 15:46:42 +00:00
hallgren 164018b6c0 gfse: include a -path flag to find rgl modules 2011-02-28 15:45:55 +00:00
hallgren 10f2f3e7d7 gfse: support for opening RGL modules 2011-02-28 14:18:20 +00:00
hallgren fc1471717c gfse: minor documentation and style improvements 2011-02-28 12:41:05 +00:00
hallgren b2917c5652 gfse: allow definitions to be reordered by drad-and-drop 2011-02-22 16:04:49 +00:00
hallgren 6173291ec1 gfse: fix typos 2011-02-18 14:51:06 +00:00
hallgren e2096fef35 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 f0a80d0ea6 gfse: updated screen shots 2011-02-18 14:46:18 +00:00
hallgren 1ee4844fca gfse: support for linking to the translation quiz 2011-02-18 11:44:05 +00:00
hallgren 69e7262286 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 1715f683dc Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:43:41 +00:00
hallgren b7e13dafa1 Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:42:16 +00:00
hallgren 60980e40e4 Adding the prototype GF editor for simple multilingual grammars 2011-02-17 14:38:46 +00:00
hallgren bfc91294e1 minibar: a small change to make easy to select an alternate grammar directory 2011-01-27 22:23:15 +00:00
hallgren 95055e8cd8 Translation Quiz: fix for race condition on page load 2011-01-26 16:21:23 +00:00
hallgren ad5316279b Translation quiz: improvements from Elnaz 2011-01-25 11:58:49 +00:00
hallgren 57d150c970 New item. GF is part of the CLT Toolkit 2011-01-22 14:26:15 +00:00
hallgren 60d16b8236 Fix broken links in GF Quick Reference 2011-01-22 14:14:00 +00:00
hallgren fa275c3955 News: Phrasedroid on the Android Market 2011-01-18 13:13:02 +00:00
hallgren 81a1368a95 style.css: remove border from linked GF logotypes 2011-01-18 12:59:55 +00:00
hallgren 1f9c15ea23 Release notes: added a link to documentation of the bracketed string data structure 2011-01-12 13:01:23 +00:00
hallgren 2ebf3649cf minibar: update my home page link (cs->cse) 2011-01-11 13:18:19 +00:00
hallgren b8c1a09896 The name of the fastcgi executable has changed back to pgf-service 2011-01-09 15:32:17 +00:00
hallgren ac52ae805d Download page: some more details on how to install the from darcs repository 2011-01-03 14:42:11 +00:00
hallgren 02c778356d Download page: add .deb package for easy installation in Ubuntu 2011-01-03 14:41:27 +00:00
hallgren c9ca289a7c Fix to compile GF with GHC>=7.0 2010-12-28 13:54:18 +00:00
hallgren 34e6ed3220 Switch over start page and download page to version 3.2! 2010-12-23 20:35:36 +00:00
hallgren 6e901df635 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 363ec708ab download: add 64-bit Linux version + more details in the instructions for building from source 2010-12-23 17:03:40 +00:00
hallgren da4f5cf607 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 ba70201b1a Got release not from Olga's notes. They need to be fleshed out, though. 2010-12-23 15:12:31 +00:00
hallgren 5f16e3134b build-binary-dsit.sh: make paths relative to /usr/local in the final tar file. 2010-12-23 12:40:04 +00:00
hallgren 8afbc3cbbc Use i386 rather than i486 in binary package names 2010-12-23 12:18:11 +00:00
hallgren b2b6def050 Include Urd in the default set of languages to compile 2010-12-23 11:44:40 +00:00
hallgren ebd0262b3a 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 f2e57c401a Add release notes file download/release-3.2.t2t. Someone should fill it in. 2010-12-23 11:21:19 +00:00
hallgren 99f1f4e370 Apply stylesheet to GF quickstart 2010-12-23 10:32:39 +00:00
hallgren d47da82d00 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 060f4e1866 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 0a52aaf81d PGF web service: make the generated index.html for pgf-http a bit more informative 2010-12-22 15:06:02 +00:00
hallgren 18338b0ee4 gf-server.cabal: update description of fastcgi flag 2010-12-22 15:05:10 +00:00
hallgren a5b661700b 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 5dd58dfca6 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 681c5d25dd 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 0194769f05 Add build-binary-dist.sh 2010-12-21 22:18:48 +00:00
hallgren 2c91730b9d download/index-3.2.t2t: first version of download page for GF release 3.2 2010-12-20 21:56:10 +00:00
hallgren a5ad9c789e css/style.css: a style sheet for GF web pages 2010-12-20 21:54:51 +00:00
hallgren 3816623310 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 6b6d1407c8 Add -optimize-pgf to Makefile for Foods.pgf 2010-12-17 16:47:25 +00:00
hallgren 0374f327d6 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 fb807d307c minibar/support.js: fix comment typos and add links 2010-12-17 16:42:08 +00:00
hallgren c9d9db121a 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 31c09c8846 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 72148feeb9 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 2228568fc7 numerals: add language flags
to help minibar pick the right default language
2010-12-14 16:41:28 +00:00
hallgren ab5b02d65c 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 847561d2f6 minibar/support.js: add an errorcallback parameter to ajax_http_get 2010-12-09 16:38:16 +00:00
hallgren b0cafee950 minibar.js: restore start_miniabr function for backward compatibility 2010-12-07 13:00:36 +00:00
hallgren 38e394dc8f 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 a8134994ab Let minibar keep its own copy of tree-btn.png 2010-12-01 16:28:27 +00:00
hallgren 3a432f80fe support.js: add function bind (JS OOP trick) 2010-12-01 16:20:28 +00:00
hallgren bef7f8b053 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 7669828212 Setup.hs: omit urdu when compiling the rgl, for now. 2010-11-30 16:29:36 +00:00
hallgren ee4d264896 minibar/about.html: minor adjustments 2010-11-28 11:52:48 +00:00
hallgren 5acc248546 Use the internal preprocessors mkPresent and mkMinimal 2010-11-26 18:49:01 +00:00
hallgren 92da4008e0 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 1867e6bd88 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 5fd4efd960 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 9532a34a2a 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 ab3327dab8 minibar/about.html: document recent development 2010-11-23 12:26:32 +00:00
hallgren 75323ff56c examples/numerals: adapt to current GF syntax 2010-11-12 16:46:44 +00:00
hallgren 906b185d2f Some pgf-server API documentation 2010-11-09 21:02:07 +00:00
hallgren 98bd4f9ae5 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 d0efcc035c 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 92cf1bdb85 minibar.js: code simplification 2010-11-09 11:58:38 +00:00
hallgren 48effe4922 support.js: two new functions: commonPrefix & insertFirst 2010-11-05 15:41:06 +00:00
hallgren 592206e6a8 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 c4f8fa82b7 minibar.js: bug fix: the To: menu wasn't updated properly when switching grammars 2010-10-28 11:53:50 +00:00
hallgren 4f7255dae2 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 41edd0a84f 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 dd7cd640ea minibar.js: show the type error messages that can occur for grammars with dependent types 2010-10-18 12:15:30 +00:00
hallgren 5400728ef7 minibar.js: add an option to enable/disable the Random button 2010-10-17 16:48:21 +00:00
hallgren 518a27a009 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 31d0e84617 minibar: update about.html with description of recent changes 2010-09-28 11:46:32 +00:00
hallgren 6f2a3849f3 minibar/about.html: fix typos and formatting 2010-09-24 12:57:16 +00:00
hallgren 3d2bf753d4 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 5e1f2c069f 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 c533314843 minibar.js: server API code cleanup 2010-09-14 17:15:37 +00:00
hallgren ee36bac494 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 ed9999784f minibar.js: add access keys to some of the buttons 2010-09-14 16:45:48 +00:00
hallgren fa65026136 support.js: create buttons with access keys 2010-09-10 12:20:07 +00:00
hallgren af8645a2f3 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