Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Marko Mahnič

  
  
On 29. 06. 2021 20:20, John R. Marks,
  IV wrote:


  The next thing I'll be working on is getting it to generate an RSS feed, but I think this whole deal begs the question -- could this functionality be replicated on export, or in some other way internal to zim and is there interest? I've looked at the templating system, but I'm not seeing exactly how to do what I'm thinking about, especially the image stuff. I'm guessing there might be a plugin way to do it as well, but I'm not (yet) familiar with enough python and was curious if anyone else liked this idea? I'll be pushing forward with it regardless.



There is a plugin way: I've created a Zim plugin that generates
  sites using pandoc. It was developed for 0.68 but I haven't
  updated it since, so it probably doesn't work with the latest
  version. You can check the documentation for the plugin that was
  generated with the plugin: https://mmahnic.github.io/zim-siteexporter-doc/index.html
  .  The news system was supposed to be used as a blog https://mmahnic.github.io/zim-siteexporter-doc/page-type/news.html
  .

The code for the plugin is here: https://github.com/mmahnic/zim-plugin-siteexporter
Marko

  


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Agustin Lobo
By some reason, cannot export MHTML: once I select the output file,
click OK and nothing happens.
Print to Browser does not work either.
Using 0.73.5 on linux

Agustin Lobo
aloboa...@gmail.com

On Tue, Jun 29, 2021 at 10:34 AM Jaap Karssenberg
 wrote:
>
> No. Html does not (really) allow for embedding the images into the html, they 
> are typically exported as separate files. Maybe you can use the MHTML (Web 
> archive) export format ?  It is not as widely supported, but it does allow 
> creating a single file.
>
> -- Jaap
>
> On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:
>>
>> Is it possible to export to html so that the images get included
>> within the html file itself?
>> Thanks
>>
>> Agustin Lobo
>> aloboa...@gmail.com
>>
>> ___
>> Mailing list: https://launchpad.net/~zim-wiki
>> Post to : zim-wiki@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread John R. Marks, IV
Speaking of; a big picture thing I've been hacking together, and I wonder if 
there's any interest and/or easy way to accomplish.  

Basically, zim as a simple blogging platform; I'm doing a bit of it now because 
I wanted something simpler than Wordpress.

Current procedure for me is to use the Journal as the jump-off point; I get 
dates and can do an "overview" that way, so any page under a date is 
"recognized" by my system as an entry.

Right now, all my "system" entails is a few bash scripts that edit the exported 
html before it's pushed to my server; the changes being "addition of metadata 
for the social media platforms," specifically
- Adds "title" metadata from the title
- Adds "subtitle" metadata from the first italicized line after the title
- Adds "image" metadata" from the first image it encounters.

Mine does both Open Graph (facebook/linkedin) and Twitter cards, so when you 
share the page, you get the "preview" deal that you see all over, I can share 
to github or similar if interested (FYI note that you may have to "upload" the 
page to facebook/twitter BEFORE you share it to get it to show up, it's a 
developer thing) 

Here's an example page, you can view the source to see what else it produces. 
(please ignore the opinion if its not your deal :) )
https://jrm4.com/Journal/2021/06/16/Why_Cryptocurrency_is_Here_to_Stay.html


The next thing I'll be working on is getting it to generate an RSS feed, but I 
think this whole deal begs the question -- could this functionality be 
replicated on export, or in some other way internal to zim and is there 
interest? I've looked at the templating system, but I'm not seeing exactly how 
to do what I'm thinking about, especially the image stuff. I'm guessing there 
might be a plugin way to do it as well, but I'm not (yet) familiar with enough 
python and was curious if anyone else liked this idea? I'll be pushing forward 
with it regardless.

John


On Tue, Jun 29, 2021 at 10:34:24AM +0200, Jaap Karssenberg wrote:
> No. Html does not (really) allow for embedding the images into the html,
> they are typically exported as separate files. Maybe you can use the MHTML
> (Web archive) export format ?  It is not as widely supported, but it does
> allow creating a single file.
> 
> -- Jaap
> 
> On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:
> 
> > Is it possible to export to html so that the images get included
> > within the html file itself?
> > Thanks
> >
> > Agustin Lobo
> > aloboa...@gmail.com
> >
> > ___
> > Mailing list: https://launchpad.net/~zim-wiki
> > Post to : zim-wiki@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~zim-wiki
> > More help   : https://help.launchpad.net/ListHelp
> >

> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to hml with images

2021-06-29 Thread Jaap Karssenberg
No. Html does not (really) allow for embedding the images into the html,
they are typically exported as separate files. Maybe you can use the MHTML
(Web archive) export format ?  It is not as widely supported, but it does
allow creating a single file.

-- Jaap

On Mon, Jun 28, 2021 at 8:05 PM Agustin Lobo  wrote:

> Is it possible to export to html so that the images get included
> within the html file itself?
> Thanks
>
> Agustin Lobo
> aloboa...@gmail.com
>
> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export to hml with images

2021-06-28 Thread Agustin Lobo
Is it possible to export to html so that the images get included
within the html file itself?
Thanks

Agustin Lobo
aloboa...@gmail.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-08 Thread Jaap Karssenberg
On Tue, Jul 7, 2020 at 7:59 PM Johan Vromans  wrote:

> On Tue, 7 Jul 2020 19:54:32 +0200, Jaap Karssenberg
>  wrote:
>
> > My guess would be that
>
> Your guess? I thought you programmed it :)
>

Sure - if only everything behaved as I intended it when I wrote it :/



> >
> >[% IF page.meta.get("Templat") %]
> >
> > is what you are looking for. The "meta" attribute is a dict, not "page".
>
> This yields: AssertionError: Not a valid function: page.meta.get .
>
> Besides, the reference to page.meta already gives warnings if there's no
> metadata (as is the case for most of my pages).
>

Have to look into this - quick glance at the code suggests "meta" always
exists and gets initialized as an empty dict even when no content. So
something goes wrong in wrapping it for access from the template.

-- Jaap
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 19:54:32 +0200, Jaap Karssenberg
 wrote:

> My guess would be that

Your guess? I thought you programmed it :)

> 
>[% IF page.meta.get("Templat") %]
> 
> is what you are looking for. The "meta" attribute is a dict, not "page".

This yields: AssertionError: Not a valid function: page.meta.get .

Besides, the reference to page.meta already gives warnings if there's no
metadata (as is the case for most of my pages).

-- Johan

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 18:57:21 +0200, Jaap Karssenberg
 wrote:

> Yes the template syntax should support the python "get" function.

And how is this supposed to work?

[% FOR page IN pages %]
[% IF page.get("meta") %]

yields AssertionError: Not a valid function: page.get
TypeError: 'PageProxy' object is not subscriptable

-- Johan

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Jaap Karssenberg
Yes the template syntax should support the python "get" function. There is
a list of supported methods here:
https://zim-wiki.org/manual/Help/Templates.html

Regards,

Jaap

Op di 7 jul. 2020 16:50 schreef Johan Vromans :

> > Not really, but you could construct a template that is one big "if ...
> > else ..." and includes the two templates.
>
> To select the appropriate template I'd like to use a meta setting,
> something similar to:
>
> Content-Type: text/x-zim-wiki
> Wiki-Format: zim 0.4
> Template: foo
>
> And in the template:
>
> [% IF page.meta.Template == "Foo" %] ... [% END %]
>
> Technically this works, but generates an awful amount of warnings.
> I couldn't find a way to test whether a page has a meta, and whether this
> meta has the key.
>
> Did I miss a hidden equivalent to the python 'key in dict' test?
>
>
> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
> Not really, but you could construct a template that is one big "if ...
> else ..." and includes the two templates.

To select the appropriate template I'd like to use a meta setting,
something similar to:

Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Template: foo

And in the template:

[% IF page.meta.Template == "Foo" %] ... [% END %]

Technically this works, but generates an awful amount of warnings.
I couldn't find a way to test whether a page has a meta, and whether this
meta has the key.

Did I miss a hidden equivalent to the python 'key in dict' test?


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 12:18:32 +0200, Jaap Karssenberg
 wrote:

> Not really, but you could construct a template that is one big "if ...
> else ..." and includes the two templates.

Hmmm. I get

TODO also allow files from template resources

(both master and develop branch)

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export templates

2020-07-07 Thread Jaap Karssenberg
Not really, but you could construct a template that is one big "if ... else
..." and includes the two templates.

Regards,

Jaap

Op ma 6 jul. 2020 19:53 schreef Johan Vromans :

> I'm trying to export a web site from Zim. However, some of the documents
> (pages) need a different template.
>
> Is it possible to select different templates for different documents?
>
> -- Johan
>
> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export templates

2020-07-06 Thread Johan Vromans
I'm trying to export a web site from Zim. However, some of the documents
(pages) need a different template.

Is it possible to select different templates for different documents?

-- Johan

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export sub-notebook using the command line

2017-01-11 Thread Paulo van Breugel

Dear Karthik,

Thank you for your response. It didn't give me any message. Strangely 
though, I tried today, and it works.


Perhaps for clarification, the docs I used was the name of the page I 
wanted to export. So, the syntax I used, and which works is:


zim --export -r --output=(Name of Folder) --format=html (path to folder 
notebook) (name of folder)


Best wishes,

Paulo


On 10-01-17 11:05, Karthik Tayur wrote:
Perhaps changing docs with regard to the index reference might help? 
For instance, :x:docs?

Could you elaborate on what the error messages are in the terminal?

On 10 January 2017 at 09:02, Karthik Tayur > wrote:


What does 'docs' refer to? Is 'path-to-notebook' actually the path
to the folder which contains the desired page?
zim --export -r --output=~(Name of Folder) --format=html ~(path of
the folder)
This works fine in my computer. I have omitted the template
because I wasn't particular about it.

Regards
Karthik Tayur


On 9 January 2017 at 15:57, Paulo van Breugel
> wrote:

Hi Jaap and others,

I am trying to export a sub-notebook. This goes fine when
using the menu, but now I am not sure how to do this on the
command line.

output=Output_folder
template='path_to_template'
notebook='path to notebook'

If docs the note is that I want to export (including the
sub-notes of this note), I thought to do something like:

zim --export -r --output=$output --format=html
--template=$template $notebook docs

But this doesn't work. Any hints how to go about this?

Best wishes,

Paulo



___
Mailing list: https://launchpad.net/~zim-wiki

Post to : zim-wiki@lists.launchpad.net

Unsubscribe : https://launchpad.net/~zim-wiki

More help   : https://help.launchpad.net/ListHelp






___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] export sub-notebook using the command line

2017-01-09 Thread Paulo van Breugel

Hi Jaap and others,

I am trying to export a sub-notebook. This goes fine when using the 
menu, but now I am not sure how to do this on the command line.


output=Output_folder
template='path_to_template'
notebook='path to notebook'

If docs the note is that I want to export (including the sub-notes of 
this note), I thought to do something like:


zim --export -r --output=$output --format=html --template=$template 
$notebook docs


But this doesn't work. Any hints how to go about this?

Best wishes,

Paulo



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export in one click

2016-05-26 Thread Charles Nepote

Great! That seem perfect.
It will simplify my script and maybe also other usages in the future. 
Thanks a lot Jaap.


My best,
Charles.


Le 26/05/2016 08:33, Jaap Karssenberg a écrit :

Hi Charles,

I added the "%p" argument to the custom tool commandline parameters. 
Checked in as revision 833, will show up in next release.


This should make the script much easier :)

Regards,

Jaap


On Thu, May 5, 2016 at 12:14 AM Charles Nepote > wrote:


Hi all,


I wrote a little bash script as a "Custom tool" to export a page
in one
click (see code attached).

To wrote this script, I was facing the problem that calls to Custom
tools does not provide a "pagename" parameter
(Page:SubPage:SubPage) to
supply the --export parameter. I had to extract this information with
regexps.

It would be nice:
* to provide a %p parameter for the name of the page
* or let --export function to accept %s as the [PAGE] to be exported

Am I clear enough? Did I miss something?
My next step is to provide the ability to rsync the result in one
click.

My goal is to manually export and publish some static pages on the
web.
The current ability to --export a whole notebook is not good for
me as I
want to publish only some pages and not all ones.


Thanks for zim.


Charles Nepote.

___
Mailing list: https://launchpad.net/~zim-wiki

Post to : zim-wiki@lists.launchpad.net

Unsubscribe : https://launchpad.net/~zim-wiki

More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export in one click

2016-05-26 Thread Jaap Karssenberg
Hi Charles,

I added the "%p" argument to the custom tool commandline parameters.
Checked in as revision 833, will show up in next release.

This should make the script much easier :)

Regards,

Jaap


On Thu, May 5, 2016 at 12:14 AM Charles Nepote  wrote:

> Hi all,
>
>
> I wrote a little bash script as a "Custom tool" to export a page in one
> click (see code attached).
>
> To wrote this script, I was facing the problem that calls to Custom
> tools does not provide a "pagename" parameter (Page:SubPage:SubPage) to
> supply the --export parameter. I had to extract this information with
> regexps.
>
> It would be nice:
> * to provide a %p parameter for the name of the page
> * or let --export function to accept %s as the [PAGE] to be exported
>
> Am I clear enough? Did I miss something?
> My next step is to provide the ability to rsync the result in one click.
>
> My goal is to manually export and publish some static pages on the web.
> The current ability to --export a whole notebook is not good for me as I
> want to publish only some pages and not all ones.
>
>
> Thanks for zim.
>
>
> Charles Nepote.
>
> ___
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export in one click

2016-05-05 Thread nathan . king
I have a plugin that I think does what you want but unfortunately the highest 
version of Zim it works with is 0.60.  I would love help upgrading the plugin, 
I just have not prioritized the effort and am still using 0.60.  Attached are 
some screen shots and the 0.60 compatible plugin.  Below is a summary of my 
concept.


Use Case

Using one large notebook, it is often necessary to share a single page with 
others.  When sharing, it is preferable to avoid static methods like email 
attachments and instead use more dynamic methods like exporting to a web 
servers or network shares.

Current Situation
-
With default Zim features the best option is using the print to browser plugin, 
from the browser printing a pdf, and attaching the pdf to an email.  The 
disadvantages of this method are: multiple step process, the attachment is 
stale (if I make a change I need to make another pdf and send another email), 
links don't work, attachments are not included, etc.

Solution, the Quick Export Plugin
-
Create plugin that quickly exports a single page to a local file system, 
network file system, or web server.  Have the results automatically open in the 
default web browser (if necessary using a resolved domain name).  The user can 
then copy and paste the URL into an email.  The disadvantage of this method is 
that there may be some broken links because all pages need to be individually 
exported, a future enhancement could be pursued that would add a user defined 
option to recursively export linked pages.

From: Zim-wiki 
[mailto:zim-wiki-bounces+nathan.king=daimler@lists.launchpad.net] On Behalf 
Of Charles Nepote
Sent: Thursday, May 05, 2016 2:03 AM
To: Paulo van Breugel; zim-wiki@lists.launchpad.net
Subject: Re: [Zim-wiki] Export in one click

Le 05/05/2016 08:07, Paulo van Breugel a écrit :
Which version are you using? It should be possible to export single pages under 
File - Export.
Yes I know the export process under File -> Export but it's quite long. There's 
at least 6 clicks to export a page:
File (click)
Export (click)
Single page (click)
Next (click)
Next (click) [more clicks if you don't use the Default model which is my case]
Enter (click)

It's ok when you don't do it very often. But it's very boring when you do (and 
at least when you are using the same format, templates and destination).

My little script allow a single click for the whole process. And the next 
version will allow the publication on a web server via rsync (optional).
A good way to create a static web site.

Charles.





On 05-05-16 00:14, Charles Nepote wrote:
Hi all,


I wrote a little bash script as a "Custom tool" to export a page in one
click (see code attached).

To wrote this script, I was facing the problem that calls to Custom
tools does not provide a "pagename" parameter (Page:SubPage:SubPage) to
supply the --export parameter. I had to extract this information with
regexps.

It would be nice:
* to provide a %p parameter for the name of the page
* or let --export function to accept %s as the [PAGE] to be exported

Am I clear enough? Did I miss something?
My next step is to provide the ability to rsync the result in one click.

My goal is to manually export and publish some static pages on the web. The 
current ability to --export a whole notebook is not good for me as I want to 
publish only some pages and not all ones.


Thanks for zim.


Charles Nepote.





___

Mailing list: https://launchpad.net/~zim-wiki<https://launchpad.net/%7Ezim-wiki>

Post to : zim-wiki@lists.launchpad.net<mailto:zim-wiki@lists.launchpad.net>

Unsubscribe : https://launchpad.net/~zim-wiki<https://launchpad.net/%7Ezim-wiki>

More help   : https://help.launchpad.net/ListHelp



If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.



quickexport.py
Description: quickexport.py
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export in one click

2016-05-05 Thread Charles Nepote

Le 05/05/2016 08:07, Paulo van Breugel a écrit :
Which version are you using? It should be possible to export single 
pages under File - Export.


Yes I know the export process under File -> Export but it's *quite 
long*. There's _at least_ *6 clicks* to export a page:

File (click)
Export (click)
Single page (click)
Next (click)
Next (click) [more clicks if you don't use the Default model which is my 
case]

Enter (click)

It's ok when you don't do it very often. But it's very boring when you 
do (and at least when you are using the same format, templates and 
destination).


My little script allow a single click for the whole process. And the 
next version will allow the publication on a web server via rsync 
(optional).

A good way to create a static web site.

Charles.






On 05-05-16 00:14, Charles Nepote wrote:

Hi all,


I wrote a little bash script as a "Custom tool" to export a page in one
click (see code attached).

To wrote this script, I was facing the problem that calls to Custom
tools does not provide a "pagename" parameter (Page:SubPage:SubPage) to
supply the --export parameter. I had to extract this information with
regexps.

It would be nice:
* to provide a %p parameter for the name of the page
* or let --export function to accept %s as the [PAGE] to be exported

Am I clear enough? Did I miss something?
My next step is to provide the ability to rsync the result in one click.

My goal is to manually export and publish some static pages on the 
web. The current ability to --export a whole notebook is not good for 
me as I want to publish only some pages and not all ones.



Thanks for zim.


Charles Nepote.



___
Mailing list:https://launchpad.net/~zim-wiki
Post to :zim-wiki@lists.launchpad.net
Unsubscribe :https://launchpad.net/~zim-wiki
More help   :https://help.launchpad.net/ListHelp




___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export in one click

2016-05-05 Thread Paulo van Breugel
Which version are you using? It should be possible to export single 
pages under File - Export.




On 05-05-16 00:14, Charles Nepote wrote:

Hi all,


I wrote a little bash script as a "Custom tool" to export a page in one
click (see code attached).

To wrote this script, I was facing the problem that calls to Custom
tools does not provide a "pagename" parameter (Page:SubPage:SubPage) to
supply the --export parameter. I had to extract this information with
regexps.

It would be nice:
* to provide a %p parameter for the name of the page
* or let --export function to accept %s as the [PAGE] to be exported

Am I clear enough? Did I miss something?
My next step is to provide the ability to rsync the result in one click.

My goal is to manually export and publish some static pages on the 
web. The current ability to --export a whole notebook is not good for 
me as I want to publish only some pages and not all ones.



Thanks for zim.


Charles Nepote.



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export in one click

2016-05-04 Thread Charles Nepote

Hi all,


I wrote a little bash script as a "Custom tool" to export a page in one
click (see code attached).

To wrote this script, I was facing the problem that calls to Custom
tools does not provide a "pagename" parameter (Page:SubPage:SubPage) to
supply the --export parameter. I had to extract this information with
regexps.

It would be nice:
* to provide a %p parameter for the name of the page
* or let --export function to accept %s as the [PAGE] to be exported

Am I clear enough? Did I miss something?
My next step is to provide the ability to rsync the result in one click.

My goal is to manually export and publish some static pages on the web. 
The current ability to --export a whole notebook is not good for me as I 
want to publish only some pages and not all ones.



Thanks for zim.


Charles Nepote.



export.sh
Description: application/shellscript
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export tempale help

2016-02-06 Thread Gene Petkevich

Hi all,

I have trouble exporting wiki pages.  In manual 
(http://zim-wiki.org/manual/Help/Templates.html) I see that it's 
possible to choose a base section for index:

index(section, collapse, ignore_empty)

However, when I try to do this, by having something like:
[% index(section=":homepage") %]
I get the following error:

  File "/usr/lib/pymodules/python2.7/zim/index.py", line 1271, in walk
if path is None or path.isroot:
AttributeError: 'str' object has no attribute 'isroot'

I've tried to rewrite in slightly different ways, but still no success.  
I also wonder if the manual page mentioned above is the only source of 
help for the template writing (with a few examples on wiki and templates 
installed with zim)?  Are there any other examples?


Best regards,
Eugene

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html: No top level in left Index

2015-06-13 Thread Jaap Karssenberg
Will commit fix in next revision.

-- Jaap

On Thu, May 14, 2015 at 10:55 AM, Agustin Lobo aloboa...@gmail.com wrote:

 When I export the current page + subpages to html,
 the left index does not feature the top level page, thus if
 I navigate (in html) to the lower levels there is no obvious way to
 go back to the higher level page.
 Any trick besides using the arrows of the browser?

 --
 Agustin Lobo
 aloboa...@gmail.com

 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to : zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] How to export attachments in zim wiki export, and one bug.

2015-06-13 Thread Jaap Karssenberg
Both issues to be fixed in next revision.

Regards,

Jaap


On Sun, May 3, 2015 at 6:17 PM, Radek radek.hnil...@gmail.com wrote:

 Hello,


 I have one question.  I lately upgraded zim to version 0.62 and
 noticed that the export templating is different.  It took me some time
 to put it in work, but one thing is not working at all, attachments.
 I use following code to render attachments and my problem is it
 generates local uri instead of web.  It means that the uri(file) is
 like
 file:///home/radek/tmp/zim-radek-public/Public/Software/Typesetting/Groff/groff-book.pdf

 [% IF page.attachments %]
 brAttachments:/br
 brLinks are broken!/br
 table
 [%- FOR file IN page.attachments -%]
 tr
 tda href='[% uri(file) %]'[% file.basename
 %]/a/td
 tdnbsp;|nbsp;/td
 td[% file.size %]/td
 tdnbsp;|nbsp;/td
 td[% file.mtime %]/td
 tdnbsp;|nbsp;/td
 td([% file %])/td
 /tr
 [%- END -%]
 /table
 [% END %]

 I look through the documentation, which is sparse.  And did not find any
 help.


 Next thing I noticed that ZIM do not like, if I wrote:

 '''
 '''

 When I press save before entering the code in between the ''' it shows
 dialog saying:

 Could not save page: Public:Programming:Building Compiler Easy:030
 Program Template in C

 'NoneType' object has no attribute 'insert'

 To continue, you can save a copy of this page or discard
 any changes. If you save a copy, changes will also be
 discarded, but you can restore the copy later.



 --
 Radek

 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to : zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export to html: No top level in left Index

2015-05-14 Thread Agustin Lobo
When I export the current page + subpages to html,
the left index does not feature the top level page, thus if
I navigate (in html) to the lower levels there is no obvious way to
go back to the higher level page.
Any trick besides using the arrows of the browser?

-- 
Agustin Lobo
aloboa...@gmail.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export html template options?

2015-05-13 Thread David Kačerek
Hello,
i would like to export a bunch of pages to the html format. But what should i 
add to a template to specifiy a font for headings and the regular text 
independently?
Then I would also like to insert the page name on top of every exported page. 
Thank you.

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export with index (zeroFiveEight template)

2014-12-01 Thread Agustin Lobo
When exporting one page with zeroFiveEight template, Is there a way to
get an index with the selected
page and its sub-pages only? Currently I get the whole Notebook index.

Thanks

-- 
Agustin Lobo
aloboa...@gmail.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] export template question

2014-11-14 Thread Paulo van Breugel
Hi,
I am trying to understand the variables and functions is available in the 
export template. One thing I am wondering is if it is possible to loop through 
the headings on a page and based on the text in a heading, or the level of that 
heading, the text below can be threated one way or another (usingthe IF and 
ELSIF conditionals)?
In the presentation template I see an example of how loop and conditional 
statements are used to create a table with the navigation. I am looking for 
something similar, e.g., using one type of div for all text, except when the 
header contains a certain text, or is of a certain level, in which case the 
text is defined by a different div type. Something along the lines:
For ... loop through all headingsIF heading contains the text 'block' (of is of 
a certain level, or...)
    div class='alt'    [text below that heading]    /divELSE    div 
class='default'    [text below the heading]    /divEND
END

Is this possible at all? And if so, could somebody point at an example how to 
implement this?

Cheers,
Paulo


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export

2014-10-09 Thread NorfCran
Good evening,

just to point out existing solution, there has been already a discussion
regarding mentioned recursive extraction, so possibly it may be useful to
somebody: https://lists.launchpad.net/zim-wiki/msg01864.html

All the best, JK

On 8 October 2014 09:55, Paulo van Breugel p_vanbreu...@yahoo.com wrote:

 I can't help with the technical question, but would certainly be
 interested to test any solution :-)


   On Tuesday, October 7, 2014 4:46 PM, NorfCran norfc...@gmail.com
 wrote:


 Hi Paulo,

 it is quite handy feature, at some point I was looking for something
 similar some. I have made a dirty python script to cover my demands.

 I would like to share a use case also related to export of content
 (recursively). Initially the script went through content from
 currently opened page (top page), collected links (kept order of links
 in text). In this way each link to a subpage was replaced with its
 content (recursively for each page until it reached end page with no
 more links to subpages). At the same time the script also generated
 table of content with few other adjustments to content of each page.
 It allowed me to structure each chapter like a subpage and when time
 came I applied the mentioned script, got one long page in a clipboard,
 created a new page of derived content from the hierarchical structure,
 exported it to latex and my thesis got almost ready to be shipped :D

 So in deed I am interested in this feature and possibly I can try to
 create the plugin. The only technical question I have is about the
 insex, whether it is possible to get order of links from a page
 content and if not, than I am interested how difficult would it be to
 make it possible? I often use links to subpages and would like to
 reflect the order in index of the side panel, this is useful for
 switching pages by Alt-PgUp and Alt-PgDn. Thank you for any feedback.

 All the best,
 NorfCran

 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to: zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help  : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export

2014-10-08 Thread Paulo van Breugel
I can't help with the technical question, but would certainly be interested to 
test any solution :-)
 

 On Tuesday, October 7, 2014 4:46 PM, NorfCran norfc...@gmail.com wrote:
   

 Hi Paulo,

it is quite handy feature, at some point I was looking for something
similar some. I have made a dirty python script to cover my demands.

I would like to share a use case also related to export of content
(recursively). Initially the script went through content from
currently opened page (top page), collected links (kept order of links
in text). In this way each link to a subpage was replaced with its
content (recursively for each page until it reached end page with no
more links to subpages). At the same time the script also generated
table of content with few other adjustments to content of each page.
It allowed me to structure each chapter like a subpage and when time
came I applied the mentioned script, got one long page in a clipboard,
created a new page of derived content from the hierarchical structure,
exported it to latex and my thesis got almost ready to be shipped :D

So in deed I am interested in this feature and possibly I can try to
create the plugin. The only technical question I have is about the
insex, whether it is possible to get order of links from a page
content and if not, than I am interested how difficult would it be to
make it possible? I often use links to subpages and would like to
reflect the order in index of the side panel, this is useful for
switching pages by Alt-PgUp and Alt-PgDn. Thank you for any feedback.

All the best,
NorfCran

___
Mailing list: https://launchpad.net/~zim-wiki
Post to    : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help  : https://help.launchpad.net/ListHelp


   ___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export

2014-10-07 Thread Jaap Karssenberg
Not at the moment, you would have to write your own index function and put
it in a plugin.

Regards,

Jaap


On Tue, Oct 7, 2014 at 11:18 AM, Paulo van Breugel p.vanbreu...@gmail.com
wrote:

 Hi,

 Is there a way to limit the number of levels of sub-pages that are
 included in the index as exported with the index(section, collapse,
 ignore_empty) function ?

 E.g., I would like to limit the number of links in the index to two levels
 deep (counting from the home page)


 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to : zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export

2014-10-07 Thread NorfCran
Hi Paulo,

it is quite handy feature, at some point I was looking for something
similar some. I have made a dirty python script to cover my demands.

I would like to share a use case also related to export of content
(recursively). Initially the script went through content from
currently opened page (top page), collected links (kept order of links
in text). In this way each link to a subpage was replaced with its
content (recursively for each page until it reached end page with no
more links to subpages). At the same time the script also generated
table of content with few other adjustments to content of each page.
It allowed me to structure each chapter like a subpage and when time
came I applied the mentioned script, got one long page in a clipboard,
created a new page of derived content from the hierarchical structure,
exported it to latex and my thesis got almost ready to be shipped :D

So in deed I am interested in this feature and possibly I can try to
create the plugin. The only technical question I have is about the
insex, whether it is possible to get order of links from a page
content and if not, than I am interested how difficult would it be to
make it possible? I often use links to subpages and would like to
reflect the order in index of the side panel, this is useful for
switching pages by Alt-PgUp and Alt-PgDn. Thank you for any feedback.

All the best,
NorfCran

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Jaap Karssenberg
PLease make sure you have rev706 when testing.

Maybe I should roll back partly and put the CSS solution in our HTML
templates?

Regards,

Jaap



On Fri, Aug 22, 2014 at 9:54 AM, Paulo van Breugel p_vanbreu...@yahoo.com
wrote:

  Hi Jaap,

 A blank line in between the two headers is still replaced by a br. From
 below I am not sure I understand whether that is the intended behaviour or
 not?


 h2TOC amp; web links/h2brh3Collaboration/h3


 Another option would be to replace empty lines by p/p? Html pages
 generated that way resemble more the way the text looks in Zim (tested in
 Firefox and Chrome), which is because these browsers seem to ignore empty
 paragraphs.

 Another option is to follow the same rule as for paragraphs. As far as I
 can see, empty line between two paragraphs are not exported. Two empty
 lines between paragraphs are exported as one break. I think that would be
 the best option in terms of how easy it is to regulate the appearance of
 the html page through CSS).







 On 21-08-14 12:20, Jaap Karssenberg wrote:

  Committed new revision where I changed the whitespace handling in the
 HTML export. Basically removed all BR elements outside of paragraphs.
 Downside is that some rendering may look different than in the source page
 if you have additional blank lines, but best I can do with the HTML
 assumptions for line spacing.

  -- Jaap



 On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel p_vanbreu...@yahoo.com
  wrote:

  When exporting to html, the export places a break between two
 consecutive headers as in the example below.  Is there a way to prevent
 this?


  = TOC  web links =


  Collaboration 

 * test




 Becomes:

  h2TOC amp; web 
 links/h2brh3Collaboration/h3pullitest/li/ul/p





___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Colin Tedford

 My feeling is that I should roll back and put CSS snippet in the template
 to get more accurate HTML version of the wiki page. However that makes the
 HTML rendering without CSS ugly.

 Jaap


It seems like common practice on the web is to use CSS to add some space
under headers so your thought sounds sensible to me, but I haven't tinkered
with the templates -- is it common to render without CSS?

Colin
colintedford.com
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Colin Tedford

 It seems like common practice on the web is to use CSS to add some space
 under headers


Sorry, or to manage the space under the headers, I guess we're not adding
here.

Colin
colintedford.com
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Mariano Draghi
2014-08-22 12:38 GMT-03:00 Jaap Karssenberg jaap.karssenb...@gmail.com:

 My feeling is that I should roll back and put CSS snippet in the template
 to get more accurate HTML version of the wiki page. However that makes the
 HTML rendering without CSS ugly.

 Compromise would be to make the newline handling an option you can control
 from the template. This could help to make vanilla HTML export look
 decent while templates with CSS can set the BR how they want it.


Personally I'd prefer a clean HTML output by default. I don't like the BR
tags, and I don't think that the HTML export should try to replicate any
arbitrary spacing in the wiki text. The HTML would easily turn into a mess.

Most wiki engines and markdown processors ignore whitespace when rendering,
and have a specific tag/syntax for explicitly adding a blank line. Maybe
that's the way to go.

--
Mariano
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Paulo van Breugel
I think there is a consensus here not to use br :-). 



On Friday, August 22, 2014 6:29 PM, Colin Tedford co...@colintedford.com 
wrote:
 


It seems like common practice on the web is to use CSS to add some space under 
headers

Sorry, or to manage the space under the headers, I guess we're not adding here.




Colin
colintedford.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Paulo van Breugel
Sounds like a useful feature, providing maximum flexibility. Brilliant!

On 22 August 2014 19:06:11 CEST, Jaap Karssenberg jaap.karssenb...@gmail.com 
wrote:
On Fri, Aug 22, 2014 at 6:56 PM, Paulo van Breugel
p_vanbreu...@yahoo.com
wrote:

 You wrote: Now as you commented correctly this results in a lot of
 whitespace below the H2. But there is also space below the H1 that is
not
 in the wiki text.
 -- This is just the default space after headers. As you mention
below,
 this can be easily handled using CSS.

 You wrote: If I use CSS to remove the padding/margin between heading
and
 paragraph it looks again same as the source text. But in that case
the BR
 is crucial.
 -- I don't see why the BR is crucial in that case.



Well, for those that expect WYSIWYG behavior, this BR is crucial to
achieve
the same result as in the wiki page.



 You wrote: Compromise would be to make the newline handling an
option you
 can control from the template. This could help to make vanilla HTML
 export look decent while templates with CSS can set the BR how they
want
 it.
 -- It seems setting the height of the BR, and that doesn't seem to
be
 easy:

http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br


That is not what I meant. By making it a template option, you would
allow
to choose in the template whether or not the BR are inserted at all.

Similar there can be an option to add BR at the end of line in a
paragraph
or not.

This would be in the zim output code, so independent of what you can do
with CSS on top of that.



 I think the situation is that in Zim, being text based (and given
that the
 text files should remain human readible), spaces between headers and
text
 can only be created by adding empty lines. In HTML such spaces should
not
 be done by adding breaks, but by using CSS. For this reason, the way
empty
 lines are handled in revision 706 is the correction one I think and
the
 changes should not be rolled back i.m.o.

 I am not sure if I understand the last option, but if that means the
user
 has the option to determine how empty lines are handled by the export
 (being replaced by brakes or ignored), that would be a very nice
feature.


Yep, that's what I meant :)

Sounds like there is need for both options.

Regards,

Jaap

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Jaap Karssenberg
On Fri, Aug 22, 2014 at 6:56 PM, Paulo van Breugel p_vanbreu...@yahoo.com
wrote:

 You wrote: Now as you commented correctly this results in a lot of
 whitespace below the H2. But there is also space below the H1 that is not
 in the wiki text.
 -- This is just the default space after headers. As you mention below,
 this can be easily handled using CSS.

 You wrote: If I use CSS to remove the padding/margin between heading and
 paragraph it looks again same as the source text. But in that case the BR
 is crucial.
 -- I don't see why the BR is crucial in that case.



Well, for those that expect WYSIWYG behavior, this BR is crucial to achieve
the same result as in the wiki page.



 You wrote: Compromise would be to make the newline handling an option you
 can control from the template. This could help to make vanilla HTML
 export look decent while templates with CSS can set the BR how they want
 it.
 -- It seems setting the height of the BR, and that doesn't seem to be
 easy:
 http://stackoverflow.com/questions/1409649/how-to-change-the-height-of-a-br


That is not what I meant. By making it a template option, you would allow
to choose in the template whether or not the BR are inserted at all.

Similar there can be an option to add BR at the end of line in a paragraph
or not.

This would be in the zim output code, so independent of what you can do
with CSS on top of that.



 I think the situation is that in Zim, being text based (and given that the
 text files should remain human readible), spaces between headers and text
 can only be created by adding empty lines. In HTML such spaces should not
 be done by adding breaks, but by using CSS. For this reason, the way empty
 lines are handled in revision 706 is the correction one I think and the
 changes should not be rolled back i.m.o.

 I am not sure if I understand the last option, but if that means the user
 has the option to determine how empty lines are handled by the export
 (being replaced by brakes or ignored), that would be a very nice feature.


Yep, that's what I meant :)

Sounds like there is need for both options.

Regards,

Jaap
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Syv Ritch
On Fri, 22 Aug 2014 19:06:11 +0200
Jaap Karssenberg jaap.karssenb...@gmail.com wrote:

 Well, for those that expect WYSIWYG behavior, this BR is crucial to
 achieve the same result as in the wiki page.

Hi,

I'm sorry to butt in, especially that it's possible that I'm
completely out to lunch.

Zim uses the same syntax as Dokuwiki, and Dokuwiki does the
rendering properly. 

How does Dokuwiki do it? and what about doing something similar in
python?

sknahT

vyS

-- 
Thanks
http://www.foto-biz.com
The Business Of Being A Photographer -- Lightroom QA

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-22 Thread Jaap Karssenberg
OK, now pushed revision 710 to the repository.

Default behavior is back to as released in 0.61, using br elements.
However the default templates have CSS to remove margins so it renders the
same as in the editor: WYSIWYG.

When you don't line the default behavior you can use the template option
empty_lines to switch them off.
Also there is an option line_breaks to switch the br elements at the
end of line within a paragraph.

See the manual page on templates for the syntax etc.

Hope this makes everybody happy :)

Regards,

Jaap




On Fri, Aug 22, 2014 at 7:42 PM, Syv Ritch s...@foto-biz.com wrote:

 On Fri, 22 Aug 2014 19:06:11 +0200
 Jaap Karssenberg jaap.karssenb...@gmail.com wrote:

  Well, for those that expect WYSIWYG behavior, this BR is crucial to
  achieve the same result as in the wiki page.

 Hi,

 I'm sorry to butt in, especially that it's possible that I'm
 completely out to lunch.

 Zim uses the same syntax as Dokuwiki, and Dokuwiki does the
 rendering properly.

 How does Dokuwiki do it? and what about doing something similar in
 python?

 sknahT

 vyS

 --
 Thanks
 http://www.foto-biz.com
 The Business Of Being A Photographer -- Lightroom QA

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to html

2014-08-21 Thread Paulo van Breugel
Great, I'll give it a try



On Thursday, August 21, 2014 12:20 PM, Jaap Karssenberg 
jaap.karssenb...@gmail.com wrote:
 


Committed new revision where I changed the whitespace handling in the HTML 
export. Basically removed all BR elements outside of paragraphs. Downside 
is that some rendering may look different than in the source page if you have 
additional blank lines, but best I can do with the HTML assumptions for line 
spacing.

-- Jaap





On Wed, Aug 20, 2014 at 7:48 PM, Paulo van Breugel p_vanbreu...@yahoo.com 
wrote:

When exporting to html, the export places a break between two consecutive 
headers as in the example below.  Is there a way to prevent this?


 
= TOC  web links =
 Collaboration 
* test


Becomes:


h2TOC amp; web links/h2 br h3Collaboration/h3 
pullitest/li/ul /p 
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export to html

2014-08-20 Thread Paulo van Breugel
When exporting to html, the export places a break between two 
consecutive headers as in the example below.  Is there a way to prevent 
this?



= TOC  web links =


 Collaboration 

* test




Becomes:


h2TOCamp;  web links/h2

br

h3Collaboration/h3

p
ul
litest/li
/ul

/p


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] export from 0.54, import to 0.60

2014-08-19 Thread Albert Wagner
I have many pages entered into zim 0.54 and desire to export the whole 
notebook to another system that runs zim 0.60.  However, 0.54 only 
exports to html or Latex;  And 0.60 will not accept the html files.  Is 
there some other way to accomplish this?


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export template

2014-06-08 Thread Sylvain Viart

Hi,

Le 07/06/2014 12:12, Paulo van Breugel a écrit :


Why don't you pull the files to a temporary folder, and copy the 
ecodiv.html and ecodiv folder to the ~/.local/share/zim/templates/html?



If you want to give it a try, check out this blogpost: 
http://pvanb.wordpress.com/2014/06/06/a-zim-wiki-export-template-for-a-adaptive-website/.


May the doc how to install it in Zim. […]


I've made a pull request on github, for the doc based on our exchange. 
Could be useful for interested user.

Let me know.

Regards,
Sylvain.

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export template

2014-06-08 Thread Paulo van Breugel

Thanks, merged it

On 06/08/2014 08:16 AM, Sylvain Viart wrote:

Hi,

Le 07/06/2014 12:12, Paulo van Breugel a écrit :


Why don't you pull the files to a temporary folder, and copy the 
ecodiv.html and ecodiv folder to the ~/.local/share/zim/templates/html?



If you want to give it a try, check out this blogpost: 
http://pvanb.wordpress.com/2014/06/06/a-zim-wiki-export-template-for-a-adaptive-website/.


May the doc how to install it in Zim. […]


I've made a pull request on github, for the doc based on our exchange. 
Could be useful for interested user.

Let me know.

Regards,
Sylvain.

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export template

2014-06-07 Thread Paulo van Breugel

Hi Sylvain

Why don't you pull the files to a temporary folder, and copy the 
ecodiv.html and ecodiv folder to the ~/.local/share/zim/templates/html?


cd
mkdir tempzim
cd temp
git clone https://github.com/ecodiv/Zim-export-template-responsive.git
cd Zim-export-template-responsive
mv ecodiv.html ~/.local/share/zim/templates/html
mv ecodiv ~/.local/share/zim/templates/html

After this you can delete the tempzim folder if you like or leave it.

Note that you do not need to move the ecodiv.html and ecodiv folder to 
the ~/.local/share/zim/templates/html folder. It is convenient as it 
makes the template available through the drop down menu (file -- 
export) and it is available through edit -- template. However, when 
exporting you can always select a template from any location on your 
computer. So, if you copy the ecodiv.html and ecodiv folder to e.g., 
your Documents folder, you can then select the ecodiv.html from the file 
-- export menu.


But whatever solution you go for, just make sure to copy the folder 
ecodiv to the same folder as the ecodiv.html file, otherwise the result 
will not be as intended.


Cheers,

Paulo




On 06/07/2014 07:11 AM, Sylvain Viart wrote:

Hi Paulo,

Le 06/06/2014 20:46, Paulo van Breugel a écrit :
I created an export template for Zim that creates pages with a 
responsive design


Looks good.

If you want to give it a try, check out this blogpost: 
http://pvanb.wordpress.com/2014/06/06/a-zim-wiki-export-template-for-a-adaptive-website/.


May the doc how to install it in Zim.

Here is a doc draft:

The doc (Help - Content) about templating in Zim said:

  templatecan be found:
|~/.local/share/zim/|

$ ls ~/.local/share/zim/
symbols.list templates
$ ls ~/.local/share/zim/templates/
html latex

cd ~/.local/share/zim/templates/html
$ git clone https://github.com/ecodiv/Zim-export-template-responsive.git
Clonage dans 'Zim-export-template-responsive'...
$ ln -s Zim-export-template-responsive/ecodiv.html .

The Template Editor Dialog can be accessed with the menu item /Edit/ 
- /Templates/. It will show a list of templates

that are available, and allows you to view and edit them.

Exporting:

File - Export
Select Format HTML / Template ecodiv

Finish…

I don't know how to take care about ecodiv folder (not tryed very hard…)

I could write a program that is an upload custom script of the export 
to the web site…

1 click publish button.

Regards,
Sylvain.


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] export template

2014-06-06 Thread Sylvain Viart

Hi Paulo,

Le 06/06/2014 20:46, Paulo van Breugel a écrit :
I created an export template for Zim that creates pages with a 
responsive design


Looks good.

If you want to give it a try, check out this blogpost: 
http://pvanb.wordpress.com/2014/06/06/a-zim-wiki-export-template-for-a-adaptive-website/.


May the doc how to install it in Zim.

Here is a doc draft:

The doc (Help - Content) about templating in Zim said:

templatecan be found:
|~/.local/share/zim/|

$ ls ~/.local/share/zim/
symbols.list templates
$ ls ~/.local/share/zim/templates/
html latex

cd ~/.local/share/zim/templates/html
$ git clone https://github.com/ecodiv/Zim-export-template-responsive.git
Clonage dans 'Zim-export-template-responsive'...
$ ln -s Zim-export-template-responsive/ecodiv.html .

The Template Editor Dialog can be accessed with the menu item /Edit/ 
- /Templates/. It will show a list of templates

that are available, and allows you to view and edit them.

Exporting:

File - Export
Select Format HTML / Template ecodiv

Finish...

I don't know how to take care about ecodiv folder (not tryed very hard...)

I could write a program that is an upload custom script of the export to 
the web site...

1 click publish button.

Regards,
Sylvain.
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export to Dokuwiki

2012-10-29 Thread hansbkk
I've got a Zim notebook I'd like to move to the web but still leave it open
for further collaborative input as a wiki.

It seems to me that DW would be a good way to do this.

Is it as straightforward as I think it should be?

It looks like indexmenu can accommodate the fact that the headpages are
above the namespace rather than a start.txt within it - in this case I'm
not worried about ACL issues, but I imagine those would exist if I were.
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export to Dokuwiki

2012-10-29 Thread Jaap Karssenberg
On Mon, Oct 29, 2012 at 5:16 PM,  hans...@gmail.com wrote:

 I've got a Zim notebook I'd like to move to the web but still leave it open
 for further collaborative input as a wiki.

 It seems to me that DW would be a good way to do this.

 Is it as straightforward as I think it should be?

Yes and no. Zim has more or less the same wiki syntax as dokuwiki, so
simple markup will copy easily. However over time important
differences have been introduced in e.g. how links are resolved and
other more advanced constructs.

So even though it should not be hard, you probably need a script to
convert zim pages into dokuwiki pages.

 It looks like indexmenu can accommodate the fact that the headpages are
 above the namespace - in this case I'm not worried about ACL issues, but I
 imagine

I fail to see what the relation is with dokuwiki export.

Regards,

Jaap

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Export dialog and link to dialog

2010-07-05 Thread Jaap Karssenberg
On Sun, Jul 4, 2010 at 1:06 PM, Johannes Reinhardt
jreinha...@ist-dein-freund.de wrote:
 I created two proposals how to redesign the export dialog (and the
 export mechanism behind it) and the link to dialog on the wiki:

 http://www.zim-wiki.org/wiki/doku.php?id=a_better_link_to_dialog
 http://www.zim-wiki.org/wiki/doku.php?id=improve_export_function

 Feedback, Comments, Improvements, Critic, Suggestions, Discussions etc.
 are highly appreciated.

Will add comments in the wiki. Please note that I'm working on the
export dialog myself in order to turn it in a wizard style dialog for
the next release.

Regards,

Jaap

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Export dialog and link to dialog

2010-07-04 Thread Johannes Reinhardt
Hi everybody,

I created two proposals how to redesign the export dialog (and the
export mechanism behind it) and the link to dialog on the wiki:

http://www.zim-wiki.org/wiki/doku.php?id=a_better_link_to_dialog
http://www.zim-wiki.org/wiki/doku.php?id=improve_export_function

Feedback, Comments, Improvements, Critic, Suggestions, Discussions etc.
are highly appreciated.

Regards

Johannes

-- 
Johannes Reinhardt jreinha...@ist-dein-freund.de

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp