You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-23Lines changed: 16 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,6 @@ Inspired by [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/), P
32
32
*[What PEB Is Not](#what-peb-is-not)
33
33
*[Limitations](#limitations)
34
34
*[History](#history)
35
-
*[Applications Based on PEB](#applications-based-on-peb)
36
35
*[License](#license)
37
36
*[Authors](#authors)
38
37
@@ -87,10 +86,9 @@ Note that PEB is created to work from any folder without installation and all fi
87
86
* Files or folders can not be selected with their full paths from web pages.
88
87
89
88
## Compiling
90
-
The only compile-time requirement of PEB is a Qt development bundle version 5.0 or any later version.
89
+
The only compile-time requirement of PEB is a Qt development bundle version 5.2 or any later version.
91
90
92
91
Compiled and tested successfully using:
93
-
*[Qt Creator 2.8.1 and Qt 5.1.1](http://download.qt.io/archive/qt/5.1/5.1.1/) on 32-bit Debian
94
92
*[Qt Creator 3.0.0 and Qt 5.2.0](http://download.qt.io/archive/qt/5.2/5.2.0/) on 32-bit Debian and 32-bit Windows XP
95
93
*[Qt Creator 3.0.1 and Qt 5.2.1](http://download.qt.io/archive/qt/5.2/5.2.1/) on 64-bit OS X 10.9.1, i5
96
94
*[Qt Creator 3.1.1 and Qt 5.3.0](http://download.qt.io/archive/qt/5.3/5.3.0/) on 64-bit Lubuntu 14.10
@@ -150,26 +148,26 @@ A minimal example of a Perl script settings object:
150
148
151
149
```javascript
152
150
var perlScriptObject = {};
153
-
perlScriptObject.path='{app}/test/test.pl';
151
+
perlScriptObject.path='{app}/perl/test.pl';
154
152
perlScriptObject.stdout='test';
155
153
```
156
154
157
-
***path:**
155
+
*``path``
158
156
This is the path of the Perl script that is going to be executed.
159
157
The keyword ``{app}`` will be replaced by the the full path of the application directory.
160
158
*This object property is mandatory.*
161
159
162
-
***stdout:**
163
-
The ``stdout`` object property must be an unique name of a valid HTML DOM element or JavaScript function. Every piece of script output is immediately inserted into the specified DOM element or passed to the specified JavaScript function as its only argument.
160
+
*``stdout``
161
+
The ``stdout`` object property must be an id of a valid HTML DOM element or the name of a JavaScript function. Every piece of script output is immediately inserted into the DOM element or passed to the JavaScript function as its only argument.
164
162
*This object property is mandatory.*
165
163
166
-
***requestMethod:**
164
+
*``requestMethod``
167
165
Only ``GET`` or ``POST`` are recognized.
168
166
169
-
***inputData:**
167
+
*``inputData``
170
168
This object property is useless if ``requestMethod`` is not set.
171
169
172
-
***inputDataHarvester:**
170
+
*``inputDataHarvester``
173
171
This object property is a function that can get input data from an HTML form or other data source and supply it to PEB.
The ``close_command`` object property designates the command used to gracefully shut down an interactive script when the containing PEB window is going to be closed. Upon receiving it, the interactive script must start its shutdown procedure.
195
193
196
-
***close_confirmation:**
194
+
*``close_confirmation``
197
195
Just before exiting an interactive script must print on STDOUT its ``close_confirmation`` to signal PEB that it completed its shutdown. All interactive scripts must exit in 5 seconds after ``close_command`` is given or any unresponsive scripts will be killed and PEB will exit.
198
196
199
197
Perl scripts running for a long time should have ``$|=1;`` among their first lines to disable the built-in buffering of the Perl interpreter. Some builds of Perl may not give any output until the script is finished when buffering is enabled.
@@ -241,7 +239,7 @@ The following code shows how to start an interactive Perl script right after a l
241
239
The ``index.htm`` file of the demo package demonstrates how to start one script in two instances immediately after a page is loaded.
242
240
243
241
## Selecting Files and Folders
244
-
Selecting files or folders with their full paths is performed by clicking a link to a pseudo filename composed from the name of the JavaScript object with the settings of the wanted dialog and a ``.dialog`` extension. Selected files or folders are seamlessly inserted into the HTML DOM of the local page using the ``target`` object property. ``target`` must be an unique name of a valid HTML DOM element or JavaScript function. All selected files or folders are inserted into the specified DOM element or passed to the specified JavaScript function as its only argument.
242
+
Selecting files or folders with their full paths is performed by clicking a link to a pseudo filename composed from the name of the JavaScript object with the settings of the wanted dialog and a ``.dialog`` extension. Selected files or folders are seamlessly inserted in any local page using the ``target`` object property. ``target`` must be an id of a valid HTML DOM element or the name of a JavaScript function which receives all selected files or folders as its only argument.
The binary file of the browser, ``peb``, ``peb.app``, ``peb.dmg`` or ``peb.exe`` by default, can be renamed without restrictions. It can take the name of the PEB-based application it is going to run. No additional adjustments are necessary after renaming the binary. If log files are wanted, they will take the name of the binary file (without the filename extension), whatever the name may be.
267
265
268
266
## Hard Coded Files and Folders
267
+
***Perl interpreter:**
268
+
PEB expects to find Perl interpreter in ``{PEB_binary_directory}/perl/bin`` folder. The interpreter must be named ``perl`` on Linux and Mac machines and ``perl.exe`` on Windows machines. If Perl interpreter is not found in the above location, PEB will try to find the first Perl interpreter on PATH. If no Perl interpreter is found, an error page is displayed instead of the start page. No Perl interpreter is a showstopper for PEB.
269
+
269
270
***Application directory:**
270
271
Application directory is ``{PEB_binary_directory}/resources/app``.
271
272
All files used by PEB, with the exception of data files, should be located within this folder.
272
273
273
274
Application directory is hard coded in C++ code for compatibility with the [Electron](http://electron.atom.io/) framework.
274
275
[Epigraphista](https://github.com/ddmitov/epigraphista) is an example of a PEB-based application, that is also compatible with [Electron](http://electron.atom.io/) and [NW.js](http://nwjs.io/).
275
276
276
-
***Perl interpreter:**
277
-
PEB expects to find Perl interpreter in ``{PEB_binary_directory}/perl/bin`` folder. The interpreter must be named ``perl`` on Linux and Mac machines and ``perl.exe`` on Windows machines. If Perl interpreter is not found in the above location, PEB will try to find the first Perl interpreter on PATH. If no Perl interpreter is found, an error page is displayed instead of the start page. No Perl interpreter is a showstopper for PEB.
278
-
279
277
***Start page:**
280
278
PEB starts always with ``{PEB_binary_directory}/resources/app/index.html``. If this file is missing, an error message is displayed. No start page is a showstopper for PEB.
These are Perl scripts that will be started immediately after the local page is loaded.
317
+
These are Perl scripts that are started immediately after a local page is loaded.
320
318
321
319
*``closeConfirmation``
322
-
When user starts closing PEB, it checks for any unsaved data in all forms. If any user data in HTML forms is detected, PEB displays a warning using the text of ``pebSettings.closeConfirmation``. If no warning text is found, PEB assumes that no warning has to be displayed and exits immediately.
320
+
This is the text displayed when user has pressed the close button, but unsaved data in local HTML forms is detected. If no warning text is found, PEB assumes that no warning has to be displayed and exits immediately.
PEB was started as a simple GUI for personal databases in 2013 by Dimitar D. Mitov.
349
347
350
-
## Applications Based on PEB
351
-
*[Epigraphista](https://github.com/ddmitov/epigraphista) is an [EpiDoc](https://sourceforge.net/p/epidoc/wiki/Home/) XML file creator.
352
-
It is a hybrid desktop or server application using [Perl Executing Browser](https://github.com/ddmitov/perl-executing-browser), [Electron](http://electron.atom.io/) or [NW.js](http://nwjs.io/) as a desktop GUI framework.
353
-
*[Camel Doctor](https://github.com/ddmitov/camel-doctor) is a Linux and Mac serverless HTML user interface for the [default Perl debugger](http://perldoc.perl.org/perldebug.html).
354
-
355
348
## License
356
349
This program is free software;
357
350
you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License,
0 commit comments