ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Export to epub
@ 2011-11-27 13:03 Keith McKay
  2011-11-27 14:43 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Keith McKay @ 2011-11-27 13:03 UTC (permalink / raw)
  To: Ntg-Context


[-- Attachment #1.1: Type: text/plain, Size: 1878 bytes --]

Hi

I've been playing about with Export in Context with a view to producing 
ePubs.

When I run the script:

/mtxrun --script epub --make test.specification

/the test.tree is prepared but no epub file.  The output shown below has 
a couple or 'error' messages which are probably due to the way my text 
editor is set up (Scite Version 2.02).  If anyone is using Scite and 
producing ePubs I be grateful for some hints on how to set this up so 
that inkscape and zip works.

%%Script Output

mtx-epub        | creating paths in tree test.tree
mtx-epub        | copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub        | copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub        | copying test-images.css to test.tree/OPS/test-images.css
mtx-epub        | copying test.css to test.tree/OPS/test.css
mtx-epub        | copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub        | running command 'inkscape --export-plain-svg=cow.svg 
cow.pdf'

'inkscape' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub        | copying cow.svg to test.tree/OPS/cow.svg
mtx-epub        | copying hacker.jpg to test.tree/OPS/hacker.jpg
mtx-epub        | copying mill.png to test.tree/OPS/mill.png
mtx-epub        | creating archive

'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub        | epub archive: test.tree/test.epub>Exit code: 0

%%End Script Output

I'm using Minimals ConTeXt  ver: 2011.09.27 20:05 MKIV  fmt: 2011.11.19  
int: english/english on a Windows 7 machine and the test.tex file is the 
|export-example.tex file renamed from the Minimals distribution|.

Thanks
Keith McKay


[-- Attachment #1.2: Type: text/html, Size: 3134 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export to epub
  2011-11-27 13:03 Export to epub Keith McKay
@ 2011-11-27 14:43 ` Hans Hagen
  2011-11-27 22:27   ` Keith McKay
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2011-11-27 14:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Keith McKay

On 27-11-2011 14:03, Keith McKay wrote:
> Hi
>
> I've been playing about with Export in Context with a view to producing
> ePubs.
>
> When I run the script:
>
> /mtxrun --script epub --make test.specification
>
> /the test.tree is prepared but no epub file. The output shown below has
> a couple or 'error' messages which are probably due to the way my text
> editor is set up (Scite Version 2.02). If anyone is using Scite and
> producing ePubs I be grateful for some hints on how to set this up so
> that inkscape and zip works.

This is unrelated to scite (btw, you run a pretty old scite).

> %%Script Output
>
> mtx-epub | creating paths in tree test.tree
> mtx-epub | copying toc.ncx to test.tree/OPS/toc.ncx
> mtx-epub | copying test-styles.css to test.tree/OPS/test-styles.css
> mtx-epub | copying test-images.css to test.tree/OPS/test-images.css
> mtx-epub | copying test.css to test.tree/OPS/test.css
> mtx-epub | copying test.xhtml to test.tree/OPS/test.xhtml
> mtx-epub | running command 'inkscape --export-plain-svg=cow.svg cow.pdf'
>
> 'inkscape' is not recognized as an internal or external command,
> operable program or batch file.
> 'zip' is not recognized as an internal or external command,
> operable program or batch file.

you need to install inkscape (just google for it) as well as zip (often 
part of gnu binutils)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export to epub
  2011-11-27 14:43 ` Hans Hagen
@ 2011-11-27 22:27   ` Keith McKay
  2011-11-29 18:07     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Keith McKay @ 2011-11-27 22:27 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans
Thanks for the hints.

I downloaded inkscape but but still get the same error message.  I'm not 
too concerned about that just now.  Unfortunately I couldn't find zip so 
I played about with 7-Zip and managed to get the script to work.  It's 
still work in progress since I'm not sure I have the switches right but 
I edited the epub generation part of mtx-epub.lua to look like this:

os.execute(format("7z a -tzip -mx0 %s %s",epubfile,"mimetype"))
os.execute(format("7z a -tzip %s %s",epubfile,"META-INF"))
os.execute(format("7z a -tzip %s %s",epubfile,"OPS"))

and using a simple css file I can view the test epub in Adobe Digital 
Editions.

I'm used to using Sigil to edit ePubs and Context but luatex is all new 
territory for me.

Thanks
Keith

On 27/11/2011 14:43, Hans Hagen wrote:
> On 27-11-2011 14:03, Keith McKay wrote:
>> Hi
>>
>> I've been playing about with Export in Context with a view to producing
>> ePubs.
>>
>> When I run the script:
>>
>> /mtxrun --script epub --make test.specification
>>
>> /the test.tree is prepared but no epub file. The output shown below has
>> a couple or 'error' messages which are probably due to the way my text
>> editor is set up (Scite Version 2.02). If anyone is using Scite and
>> producing ePubs I be grateful for some hints on how to set this up so
>> that inkscape and zip works.
>
> This is unrelated to scite (btw, you run a pretty old scite).
>
>> %%Script Output
>>
>> mtx-epub | creating paths in tree test.tree
>> mtx-epub | copying toc.ncx to test.tree/OPS/toc.ncx
>> mtx-epub | copying test-styles.css to test.tree/OPS/test-styles.css
>> mtx-epub | copying test-images.css to test.tree/OPS/test-images.css
>> mtx-epub | copying test.css to test.tree/OPS/test.css
>> mtx-epub | copying test.xhtml to test.tree/OPS/test.xhtml
>> mtx-epub | running command 'inkscape --export-plain-svg=cow.svg cow.pdf'
>>
>> 'inkscape' is not recognized as an internal or external command,
>> operable program or batch file.
>> 'zip' is not recognized as an internal or external command,
>> operable program or batch file.
>
> you need to install inkscape (just google for it) as well as zip 
> (often part of gnu binutils)
>
> Hans
>
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export to epub
  2011-11-27 22:27   ` Keith McKay
@ 2011-11-29 18:07     ` Hans Hagen
  2011-11-30  7:05       ` Keith McKay
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2011-11-29 18:07 UTC (permalink / raw)
  To: Keith McKay; +Cc: mailing list for ConTeXt users

On 27-11-2011 23:27, Keith McKay wrote:
> Hans
> Thanks for the hints.
>
> I downloaded inkscape but but still get the same error message. I'm not
> too concerned about that just now. Unfortunately I couldn't find zip so
> I played about with 7-Zip and managed to get the script to work. It's
> still work in progress since I'm not sure I have the switches right but
> I edited the epub generation part of mtx-epub.lua to look like this:
>
> os.execute(format("7z a -tzip -mx0 %s %s",epubfile,"mimetype"))
> os.execute(format("7z a -tzip %s %s",epubfile,"META-INF"))
> os.execute(format("7z a -tzip %s %s",epubfile,"OPS"))
>
> and using a simple css file I can view the test epub in Adobe Digital
> Editions.
>
> I'm used to using Sigil to edit ePubs and Context but luatex is all new
> territory for me.

I've added this method too, so when zip is not found, 7z is tried ... I 
didn't test it.

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export to epub
  2011-11-29 18:07     ` Hans Hagen
@ 2011-11-30  7:05       ` Keith McKay
  2011-11-30 19:30         ` Keith McKay
  0 siblings, 1 reply; 6+ messages in thread
From: Keith McKay @ 2011-11-30  7:05 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans

I'll update and try it tonight.

Thanks for your help

Keith

On 29/11/2011 18:07, Hans Hagen wrote:
> On 27-11-2011 23:27, Keith McKay wrote:
>> Hans
>> Thanks for the hints.
>>
>> I downloaded inkscape but but still get the same error message. I'm not
>> too concerned about that just now. Unfortunately I couldn't find zip so
>> I played about with 7-Zip and managed to get the script to work. It's
>> still work in progress since I'm not sure I have the switches right but
>> I edited the epub generation part of mtx-epub.lua to look like this:
>>
>> os.execute(format("7z a -tzip -mx0 %s %s",epubfile,"mimetype"))
>> os.execute(format("7z a -tzip %s %s",epubfile,"META-INF"))
>> os.execute(format("7z a -tzip %s %s",epubfile,"OPS"))
>>
>> and using a simple css file I can view the test epub in Adobe Digital
>> Editions.
>>
>> I'm used to using Sigil to edit ePubs and Context but luatex is all new
>> territory for me.
>
> I've added this method too, so when zip is not found, 7z is tried ... 
> I didn't test it.
>
> Hans
>
>
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Export to epub
  2011-11-30  7:05       ` Keith McKay
@ 2011-11-30 19:30         ` Keith McKay
  0 siblings, 0 replies; 6+ messages in thread
From: Keith McKay @ 2011-11-30 19:30 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

Hans

Updated Context and ran my test file.  It seems to work as I would 
expect on my computer.  The output from Scite is below.

Thanks again for your help.
Keith McKay


mtx-epub        | creating paths in tree test.tree
mtx-epub        | copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub        | copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub        | copying test-images.css to test.tree/OPS/test-images.css
mtx-epub        | copying test.css to test.tree/OPS/test.css
mtx-epub        | copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub        | running command 'inkscape --export-plain-svg=cow.svg 
cow.pdf'

'inkscape' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub        | copying cow.svg to test.tree/OPS/cow.svg
mtx-epub        | copying hacker.jpg to test.tree/OPS/hacker.jpg
mtx-epub        | copying mill.png to test.tree/OPS/mill.png
mtx-epub        | creating archive

'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22
Scanning

Creating archive test.epub

Compressing  mimetype

Everything is Ok

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22

Scanning

Updating archive test.epub

Compressing  META-INF\container.xml

Everything is Ok

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22

Scanning

Updating archive test.epub

Compressing  OPS\cow.svg
Compressing  OPS\hacker.jpg
Compressing  OPS\mill.png
Compressing  OPS\test-images.css
Compressing  OPS\test-styles.css
Compressing  OPS\test.css
Compressing  OPS\test.opf
Compressing  OPS\test.xhtml
Compressing  OPS\toc.ncx

Everything is Ok

mtx-epub        | epub archive made using 7zip (7z): 
test.tree/test.epub>Exit code: 0

On 30/11/2011 07:05, Keith McKay wrote:
> Hans
>
> I'll update and try it tonight.
>
> Thanks for your help
>
> Keith
>
> On 29/11/2011 18:07, Hans Hagen wrote:
>> On 27-11-2011 23:27, Keith McKay wrote:
>>> Hans
>>> Thanks for the hints.
>>>
>>> I downloaded inkscape but but still get the same error message. I'm not
>>> too concerned about that just now. Unfortunately I couldn't find zip so
>>> I played about with 7-Zip and managed to get the script to work. It's
>>> still work in progress since I'm not sure I have the switches right but
>>> I edited the epub generation part of mtx-epub.lua to look like this:
>>>
>>> os.execute(format("7z a -tzip -mx0 %s %s",epubfile,"mimetype"))
>>> os.execute(format("7z a -tzip %s %s",epubfile,"META-INF"))
>>> os.execute(format("7z a -tzip %s %s",epubfile,"OPS"))
>>>
>>> and using a simple css file I can view the test epub in Adobe Digital
>>> Editions.
>>>
>>> I'm used to using Sigil to edit ePubs and Context but luatex is all new
>>> territory for me.
>>
>> I've added this method too, so when zip is not found, 7z is tried ... 
>> I didn't test it.
>>
>> Hans
>>
>>
>>
>> -----------------------------------------------------------------
>>                                           Hans Hagen | PRAGMA ADE
>>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>>                                              | www.pragma-pod.nl
>> -----------------------------------------------------------------
>

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-30 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-27 13:03 Export to epub Keith McKay
2011-11-27 14:43 ` Hans Hagen
2011-11-27 22:27   ` Keith McKay
2011-11-29 18:07     ` Hans Hagen
2011-11-30  7:05       ` Keith McKay
2011-11-30 19:30         ` Keith McKay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).