Discussion:
[chora] enscript on windows
Valéry Derongs
2007-12-07 17:28:04 UTC
Permalink
Hi again,

After enjoying Chora on windows with subversion I am now trying to get syntax
highlighting working.
It seems to work natively with php, but as we work with other formats I realised
it would be more flexible to configure chora for enscript.

I installed enscript from gnuwin32 in my c:\gnuwin32\ folder and it seems to
work fine when i call it fdrom the command line as follows:

C:\gnuwin32\bin\enscript --color --language=html --pretty-print -o -
c:\testClass.java

This returns me a lovely html formatted version code.

Now the problem is that chora does not pick enscript up properly.

I configured by editing mime_drivers.php.

Basically i changed 2 thing:

First, I added 'enscript' as follows:
$mime_drivers_map['horde']['registered'] = array(
'css', 'enriched', 'html', 'images', 'ooo', 'pdf', 'php', 'plain', 'rar',
'report', 'rfc822', 'richtext', 'security', 'simple', 'tgz', 'tnef',
'vcard', 'zip',
'enscript',
);

This part seems to work as the icons in chora are now displayed depending on the
mime/extension type (c, h, java, xml...).

And the problem happens when I have to edit the path to the enscript exec...

I have no idea what format the path should be in (I guess it should use fwd
slashes) and whatever I try doesnt work, although in different ways.

For instance with
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript';

When I try to access the code, I get a line in the browser which says:
The program used to view this data type (C:/gnuwin32/bin/enscript) was not found
on the system.

However when I add the .exe as follows:
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript.exe';

Then I get an empty framed numbered line in the browser (with nothing else)

I have not messed with the mime types or anything else yet...I also tried other
syntax highlighters such as webcpp but with no luck either. I would prefer
enscript though as it seems easier to extend for csharp etc.

Could anyone please help me?

Cheers,
Val?ry
Valéry Derongs
2007-12-07 17:40:25 UTC
Permalink
Hi again,

After enjoying Chora on windows with subversion I am now trying to get syntax
highlighting working.
It seems to work natively with php, but as we work with other formats I realised
it would be more flexible to configure chora for enscript.

I installed enscript from gnuwin32 in my c:\gnuwin32\ folder and it seems to
work fine when i call it fdrom the command line as follows:

C:\gnuwin32\bin\enscript --color --language=html --pretty-print -o -
c:\testClass.java

This returns me a lovely html formatted version code.

Now the problem is that chora does not pick enscript up properly.

I configured by editing mime_drivers.php.

Basically i changed 2 thing:

First, I added 'enscript' as follows:
$mime_drivers_map['horde']['registered'] = array(
'css', 'enriched', 'html', 'images', 'ooo', 'pdf', 'php', 'plain', 'rar',
'report', 'rfc822', 'richtext', 'security', 'simple', 'tgz', 'tnef',
'vcard', 'zip',
'enscript',
);

This part seems to work as the icons in chora are now displayed depending on the
mime/extension type (c, h, java, xml...).

And the problem happens when I have to edit the path to the enscript exec...

I have no idea what format the path should be in (I guess it should use fwd
slashes) and whatever I try doesnt work, although in different ways.

For instance with
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript';

When I try to access the code, I get a line in the browser which says:
The program used to view this data type (C:/gnuwin32/bin/enscript) was not found
on the system.

However when I add the .exe as follows:
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript.exe';

Then I get an empty framed numbered line in the browser (with nothing else)

I have not messed with the mime types or anything else yet...I also tried other
syntax highlighters such as webcpp but with no luck either. I would prefer
enscript though as it seems easier to extend for csharp etc.

Could anyone please help me?

Cheers,
Val?ry
Valery Derongs
2007-12-07 17:41:32 UTC
Permalink
Hi again,

After enjoying Chora on windows with subversion I am now trying to get syntax
highlighting working.
It seems to work natively with php, but as we work with other formats I realised
it would be more flexible to configure chora for enscript.

I installed enscript from gnuwin32 in my c:\gnuwin32\ folder and it seems to
work fine when i call it fdrom the command line as follows:

C:\gnuwin32\bin\enscript --color --language=html --pretty-print -o -
c:\testClass.java

This returns me a lovely html formatted version code.

Now the problem is that chora does not pick enscript up properly.

I configured by editing mime_drivers.php.

Basically i changed 2 thing:

First, I added 'enscript' as follows:
$mime_drivers_map['horde']['registered'] = array(
'css', 'enriched', 'html', 'images', 'ooo', 'pdf', 'php', 'plain', 'rar',
'report', 'rfc822', 'richtext', 'security', 'simple', 'tgz', 'tnef',
'vcard', 'zip',
'enscript',
);

This part seems to work as the icons in chora are now displayed depending on the
mime/extension type (c, h, java, xml...).

And the problem happens when I have to edit the path to the enscript exec...

I have no idea what format the path should be in (I guess it should use fwd
slashes) and whatever I try doesnt work, although in different ways.

For instance with
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript';

When I try to access the code, I get a line in the browser which says:
The program used to view this data type (C:/gnuwin32/bin/enscript) was not found
on the system.

However when I add the .exe as follows:
$mime_drivers['horde']['enscript']['location'] = 'C:/gnuwin32/bin/enscript.exe';

Then I get an empty framed numbered line in the browser (with nothing else)

I have not messed with the mime types or anything else yet...I also tried other
syntax highlighters such as webcpp but with no luck either. I would prefer
enscript though as it seems easier to extend for csharp etc.

Could anyone please help me?

Cheers,
Val?ry

Loading...