Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-04 Thread Jérémy Lal
2017-09-04 3:08 GMT+02:00 Ben Finney :

> Jérémy Lal  writes:
>
> > 2017-09-03 7:24 GMT+02:00 Ben Finney :
> >
> > > Yes, I am looking for a general way to turn an HTML-page app into a
> > > stand-alone desktop app. That does mean no location bar, no tabs, no
> > > history navigation, etc.; just rendering the one HTML page with its
> > > JavaScript and other resources.
> >
> > i'd rely on epiphany-browser for that kind of job. […]
> >
> > Anyway, to get started, you can open epiphany-browser (a.k.a. "Web"),
> > go to local file url, and from sandwich menu choose "install site as
> > application". You'll find the .desktop file in
> > ~/.local/share/applications. epiphany also has probably a command-line
> > switch to enable XHR from file:// url.
>
> That is very close to what I want, thank you.
>
> Now I need a way to go from the bundle of files that Epiphany creates,
> to something I can turn into a Debian package for general installation.
>

Put everything into /usr/share/
and install /usr/share/applications/theappname.desktop
That should do most of it.

Jérémy
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-03 Thread Ben Finney
Jérémy Lal  writes:

> 2017-09-03 7:24 GMT+02:00 Ben Finney :
>
> > Yes, I am looking for a general way to turn an HTML-page app into a
> > stand-alone desktop app. That does mean no location bar, no tabs, no
> > history navigation, etc.; just rendering the one HTML page with its
> > JavaScript and other resources.
>
> i'd rely on epiphany-browser for that kind of job. […]
>
> Anyway, to get started, you can open epiphany-browser (a.k.a. "Web"),
> go to local file url, and from sandwich menu choose "install site as
> application". You'll find the .desktop file in
> ~/.local/share/applications. epiphany also has probably a command-line
> switch to enable XHR from file:// url.

That is very close to what I want, thank you.

Now I need a way to go from the bundle of files that Epiphany creates,
to something I can turn into a Debian package for general installation.

-- 
 \ “Simplicity and elegance are unpopular because they require |
  `\   hard work and discipline to achieve and education to be |
_o__)appreciated.” —Edsger W. Dijkstra |
Ben Finney


-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-03 Thread Ben Finney
Paul Gevers  writes:

> Edbrowse is shifting to use duktape, maybe that is what you are
> looking for?

Thanks for the response. I see that Duktape  is
“an embeddable Javascript engine”.

I don't see how addresses the requirement: to open an HTML file in a
window, running a single-page browser window as a desktop app.

-- 
 \ “[F]reedom of speech does not entail freedom to have your ideas |
  `\accepted by governments and incorporated into law and policy.” |
_o__)   —Russell Blackford, 2010-03-06 |
Ben Finney


-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-03 Thread Jérémy Lal
2017-09-03 7:24 GMT+02:00 Ben Finney :

> Jérémy Lal  writes:
>
> > - some browsers can run an application in "kiosk mode" - it runs the
> > app independently of any other already opened web page, usually
> > without omnibar and/or without menus.
> >
> > However i don't know if it's possible to benefit from xdg-open and
> > these browser specific cli options.
>
> That's a good point to raise.
>
> Yes, I am looking for a general way to turn an HTML-page app into a
> stand-alone desktop app. That does mean no location bar, no tabs, no
> history navigation, etc.; just rendering the one HTML page with its
> JavaScript and other resources.
>
> I think Mozilla's XULRunner would have done this, but it is reportedly
> obsolete upstream for years now. What is in Debian now that I should use
> instead?
>

i'd rely on epiphany-browser for that kind of job. I'm using that browser
(which
relies on webkitgtk which is updated regularly) everyday in both
application mode
or normal mode, and it's very stable (maybe not as stable as firefox, but
with
a much faster startup and lower footprint). Featurewise it's a bit behind,
yet
when a feature is supported it's usually with great integration with gnome
desktop
and system libraries.

Anyway, to get started, you can open epiphany-browser (a.k.a. "Web"), go to
local file url, and from sandwich menu choose "install site as application".
You'll find the .desktop file in ~/.local/share/applications.
epiphany also has probably a command-line switch to enable XHR from file://
url.

Jérémy
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-02 Thread Paul Gevers
Hi

On 03-09-17 07:24, Ben Finney wrote:
> I think Mozilla's XULRunner would have done this, but it is reportedly
> obsolete upstream for years now. What is in Debian now that I should use
> instead?

Edbrowse is shifting to use duktape, maybe that is what you are looking for?

Paul



signature.asc
Description: OpenPGP digital signature
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-09-02 Thread Ben Finney
Jérémy Lal  writes:

> - some browsers can run an application in "kiosk mode" - it runs the
> app independently of any other already opened web page, usually
> without omnibar and/or without menus.
>
> However i don't know if it's possible to benefit from xdg-open and
> these browser specific cli options.

That's a good point to raise.

Yes, I am looking for a general way to turn an HTML-page app into a
stand-alone desktop app. That does mean no location bar, no tabs, no
history navigation, etc.; just rendering the one HTML page with its
JavaScript and other resources.

I think Mozilla's XULRunner would have done this, but it is reportedly
obsolete upstream for years now. What is in Debian now that I should use
instead?

-- 
 \   “Anyone who puts a small gloss on [a] fundamental technology, |
  `\  calls it proprietary, and then tries to keep others from |
_o__)   building on it, is a thief.” —Tim O'Reilly, 2000-01-25 |
Ben Finney


-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-08-23 Thread Ben Finney
Jonas Smedegaard  writes:

> Quoting Jérémy Lal (2017-08-23 09:27:54)
> > xdg-open  ?
>
> Not sure, but I think sensible-browser is better: As I understand it
> XDG covers only graphical desktop environments, whereas sensible-*
> tools cover console environments as well.

In the case of essentially graphical programs like the ones I'm thinking
of (e.g. “MuscleBook”), a pixel-based graphical browser would be
required. That means ‘xdg-open’ is better for this purpose.

So I would make a package that “Depends: xdg-utils”, and install a
simple ‘/usr/bin/musclebook’ shell script:

#! /bin/sh

exec xdg-open /usr/share/musclebook/index.html

Would that be fragile in some way? Is there something I am overlooking?

-- 
 \ “It's my belief we developed language because of our deep inner |
  `\  need to complain.” —Jane Wagner, via Lily Tomlin |
_o__)  |
Ben Finney


-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-08-23 Thread Jérémy Lal
2017-08-23 11:31 GMT+02:00 Jonas Smedegaard :

> Quoting Jérémy Lal (2017-08-23 09:27:54)
> > 2017-08-23 8:50 GMT+02:00 Ben Finney :
> >
> > > Ben Finney  writes:
> > >
> > > > I am interested in packaging for Debian some JavaScript code that is
> a
> > > > self-contained program.
> > > >
> > > > Such programs are designed, by their authors, to be downloaded to a
> > > > directory and loaded from there into the user's choice of browser.
> > >
> > > An example of such a work is “MuscleBook”, which “has no server and
> > > works completely offline”  cfilipov/MuscleBook.net
> > > >.
> > >
> > > > To package such a program for Debian – into a hypothetical Debian
> > > > binary package ‘ipsum’ – I expect that installing that package will
> > > > give a command-line executable program, which launches and runs.
> > >
> > > So, I would expect after installing the hypothetical ‘musclebook’
> Debian
> > > package, that a command such as ‘/usr/bin/musclebook’ is installed.
> > >
> > > Then, running ‘/usr/bin/musclebook’ at the command line invokes a new
> > > browser tab (or a new browser window is started) visiting the
> MuscleBook
> > > ‘index.html’.
> > >
> > > I understand how to install the files (to ‘/usr/share/musclebook/’, for
> > > example). What comes next is to work correctly with the Debian web
> > > browser convention, and have a command-line program load the file
> > > ‘/usr/share/musclebook/index.html’ in the currently-running browser.
> > >
> > > How would a Debian package do that nicely with our conventions?
> > >
> >
> > xdg-open  ?
>
> Not sure, but I think sensible-browser is better: As I understand it XDG
> covers only graphical desktop environments, whereas sensible-* tools
> cover console environments as well.
>

Also eventually some browsers will be able to run without graphical
environment,
at least chromium is working toward that.
So it will make sense to launch such an app from console.

Jérémy
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-08-23 Thread Jonas Smedegaard
Quoting Jérémy Lal (2017-08-23 09:27:54)
> 2017-08-23 8:50 GMT+02:00 Ben Finney :
> 
> > Ben Finney  writes:
> >
> > > I am interested in packaging for Debian some JavaScript code that is a
> > > self-contained program.
> > >
> > > Such programs are designed, by their authors, to be downloaded to a
> > > directory and loaded from there into the user's choice of browser.
> >
> > An example of such a work is “MuscleBook”, which “has no server and
> > works completely offline”  > >.
> >
> > > To package such a program for Debian – into a hypothetical Debian
> > > binary package ‘ipsum’ – I expect that installing that package will
> > > give a command-line executable program, which launches and runs.
> >
> > So, I would expect after installing the hypothetical ‘musclebook’ Debian
> > package, that a command such as ‘/usr/bin/musclebook’ is installed.
> >
> > Then, running ‘/usr/bin/musclebook’ at the command line invokes a new
> > browser tab (or a new browser window is started) visiting the MuscleBook
> > ‘index.html’.
> >
> > I understand how to install the files (to ‘/usr/share/musclebook/’, for
> > example). What comes next is to work correctly with the Debian web
> > browser convention, and have a command-line program load the file
> > ‘/usr/share/musclebook/index.html’ in the currently-running browser.
> >
> > How would a Debian package do that nicely with our conventions?
> >
> 
> xdg-open  ?

Not sure, but I think sensible-browser is better: As I understand it XDG 
covers only graphical desktop environments, whereas sensible-* tools 
cover console environments as well.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-08-23 Thread Jérémy Lal
2017-08-23 8:50 GMT+02:00 Ben Finney :

> Ben Finney  writes:
>
> > I am interested in packaging for Debian some JavaScript code that is a
> > self-contained program.
> >
> > Such programs are designed, by their authors, to be downloaded to a
> > directory and loaded from there into the user's choice of browser.
>
> An example of such a work is “MuscleBook”, which “has no server and
> works completely offline”  >.
>
> > To package such a program for Debian – into a hypothetical Debian
> > binary package ‘ipsum’ – I expect that installing that package will
> > give a command-line executable program, which launches and runs.
>
> So, I would expect after installing the hypothetical ‘musclebook’ Debian
> package, that a command such as ‘/usr/bin/musclebook’ is installed.
>
> Then, running ‘/usr/bin/musclebook’ at the command line invokes a new
> browser tab (or a new browser window is started) visiting the MuscleBook
> ‘index.html’.
>
> I understand how to install the files (to ‘/usr/share/musclebook/’, for
> example). What comes next is to work correctly with the Debian web
> browser convention, and have a command-line program load the file
> ‘/usr/share/musclebook/index.html’ in the currently-running browser.
>
> How would a Debian package do that nicely with our conventions?
>

xdg-open  ?

Jérémy
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Re: [Pkg-javascript-devel] JavaScript in-browser program, packaged in Debian

2017-08-23 Thread Ben Finney
Ben Finney  writes:

> I am interested in packaging for Debian some JavaScript code that is a
> self-contained program.
>
> Such programs are designed, by their authors, to be downloaded to a
> directory and loaded from there into the user's choice of browser.

An example of such a work is “MuscleBook”, which “has no server and
works completely offline” .

> To package such a program for Debian – into a hypothetical Debian
> binary package ‘ipsum’ – I expect that installing that package will
> give a command-line executable program, which launches and runs.

So, I would expect after installing the hypothetical ‘musclebook’ Debian
package, that a command such as ‘/usr/bin/musclebook’ is installed.

Then, running ‘/usr/bin/musclebook’ at the command line invokes a new
browser tab (or a new browser window is started) visiting the MuscleBook
‘index.html’.

I understand how to install the files (to ‘/usr/share/musclebook/’, for
example). What comes next is to work correctly with the Debian web
browser convention, and have a command-line program load the file
‘/usr/share/musclebook/index.html’ in the currently-running browser.

How would a Debian package do that nicely with our conventions?

-- 
 \“But it is permissible to make a judgment after you have |
  `\examined the evidence. In some circles it is even encouraged.” |
_o__)—Carl Sagan, _The Burden of Skepticism_, 1987 |
Ben Finney


-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel