← Back to team overview

zim-wiki team mailing list archive

Re: Template for embedded WEB server

 

Hi Jaap.

Indeed I've done various combinations, and also started minimalistic with:

awehler@pupillix:~$ zim --server
WARNING: Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead
ERROR: Command server takes 1 arguments

Finally added "-D" to see what's going on. Now, give it another try:


# Oh, this works, the missing argument were the Notebook, surprise :-)
# Notebook is: "~/info/Info_Zim/InfMap"
# but server is silent
zim --server ~/info/Info_Zim/InfMap


# Ohhh, this works also, giving the GUI for start/stop:
# Notebook is: "~/info/Info_Zim/InfMap"
zim --server ~/info/Info_Zim/InfMap --gui


# Oooohhhhhhhhh, this even works also, giving everything wanted:
zim --server ~/info/Info_Zim/InfMap --gui --template Default_with_index



THANKs a lot, Jaap. Just that.

Best regards,

       Andreas





On 24.02.2015 12:22, Jaap Karssenberg wrote:
> Hi Andreas,
>
> The "--server" argument really needs to be the first argument - it influences the parsing of the rest of the command list. So put the "-D" at the end.
>
> To use a combination of commandline and GUI dialog, try "--server --gui".
>
> What is missing is the template selection in the dialog - so far nobody asked for that :)
>
> Regards,
>
> Jaap
>
>
> On Tue, Feb 24, 2015 at 11:42 AM, WEHLER Andreas <andreas.wehler@xxxxxxxxxxxxxxx <mailto:andreas.wehler@xxxxxxxxxxxxxxx>> wrote:
>
>     Hello Jaap.
>
>     Thanks a lot for the hint. Thought the server would be started/stopped
>     by GUI on demand. This works with ~/.local/share/zim/templates/html/Default.html.
>
>     Now I get:
>
>     zim -D --server --template Default_with_index
>     WARNING: Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead
>     /usr/bin/zim: option --server not recognized
>
>
>          Sorry for the trouble,    Andreas
>
>
>
>
>     On 24.02.2015 11 <tel:24.02.2015%2011>:34, Jaap Karssenberg wrote:
>     > Yes, you first need to tell zim that you want to start a server:
>     >
>     >    zim --server --template ...
>     >
>     > Regards,
>     >
>     > Jaap
>     >
>     >
>      > On Tue, Feb 24, 2015 at 11:25 AM, WEHLER Andreas <andreas.wehler@xxxxxxxxxxxxxxx <mailto:andreas.wehler@xxxxxxxxxxxxxxx> <mailto:andreas.wehler@xxxxxxxxxxxxxxx <mailto:andreas.wehler@xxxxxxxxxxxxxxx>>> wrote:
>      >
>      >     Hi.
>      >
>      >     Zim 0.62; Ubuntu 14.04
>      >
>      >     While looking for the possibility to select a given template for the
>      >     built-in WEB server I've just found the related command line arguments
>      >     cited below.
>      >
>      >     But the start of zim fails this way, with any given template:
>      >
>      >           zim --template Default_with_index
>      >           /usr/bin/zim: option --template not recognized
>      >
>      >
>      >     Do I something wrong?
>      >
>      >     Thanks,
>      >
>      >          Andreas
>      >
>      >     # ======== From the help page:   Help:Commandline Options  ===============
>      >     General Options:
>      >         --gui           run the editor (this is the default)
>      >         --server        run the web server
>      >         --export        export to a different format
>      >
>      >     Server Options:
>      >         --port          port to use (defaults to 8080)
>      >         --template      name of the template to use
>      >         --gui           run the gui wrapper for the server
>      >
>      >     Export Options:
>      >         -o, --output     output directory (mandatory option)
>      >         --format         format to use (defaults to 'html')
>      >         --template       name of the template to use
>      >     _______________________________________________
>      >     Mailing list: https://launchpad.net/~zim-wiki
>      >     Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx <mailto:zim-wiki@xxxxxxxxxxxxxxxxxxx> <mailto:zim-wiki@xxxxxxxxxxxxxxxxxxx <mailto:zim-wiki@xxxxxxxxxxxxxxxxxxx>>
>      >     Unsubscribe : https://launchpad.net/~zim-wiki
>      >     More help   : https://help.launchpad.net/ListHelp
>      >
>      >
>
>

References