Discussion:
Convertir les tabulations à la volée
(trop ancien pour répondre)
JKB
2010-09-10 09:13:22 UTC
Permalink
Bonjour à tous,

J'ai installé CVSweb sur un serveur apache2.2 (debian). Les fichiers
sources ont été écrits avec des tabulations de 4. J'aimerais que
pour le CGI en question, apache remplace automatiquement les
tabulations par      mais je n'ai rien trouvé de
probant. J'ai essayé de bricoler du CSS, du .htaccess, du fichier de
conf en rajoutant des filtres de sortie sans succès.

Je n'ai rien trouvé d'intéressant sur mes moteurs de recherche
favoris.

Merci pour toute lumière...

Cordialement,

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
Denis Dordoigne
2010-09-10 09:24:39 UTC
Permalink
Bonjour,
Post by JKB
J'ai installé CVSweb sur un serveur apache2.2 (debian). Les fichiers
sources ont été écrits avec des tabulations de 4. J'aimerais que
pour le CGI en question, apache remplace automatiquement les
tabulations par     mais je n'ai rien trouvé de
probant.
Le mod_sed est prévu pour ce type de besoin :
http://httpd.apache.org/docs/trunk/fr/mod/mod_sed.html
--
Denis Dordoigne
Membre de l'April - promouvoir et défendre le logiciel libre - april.org
Rejoignez maintenant plus de 5 000 personnes, associations,
entreprises et collectivités qui soutiennent notre action
JKB
2010-09-10 09:30:15 UTC
Permalink
Le Fri, 10 Sep 2010 11:24:39 +0200,
Post by Denis Dordoigne
Bonjour,
Post by JKB
J'ai installé CVSweb sur un serveur apache2.2 (debian). Les fichiers
sources ont été écrits avec des tabulations de 4. J'aimerais que
pour le CGI en question, apache remplace automatiquement les
tabulations par     mais je n'ai rien trouvé de
probant.
http://httpd.apache.org/docs/trunk/fr/mod/mod_sed.html
Je l'avais raté, celui-là. Mais pour un certain nombre de raisons,
je dois encore rester avec un apache 2.2...

Merci quand même,

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
Denis Dordoigne
2010-09-10 10:47:09 UTC
Permalink
Post by JKB
Post by Denis Dordoigne
http://httpd.apache.org/docs/trunk/fr/mod/mod_sed.html
Je l'avais raté, celui-là. Mais pour un certain nombre de raisons,
je dois encore rester avec un apache 2.2...
Il fonctionne très bien avec apache 2.2, un commentaire explique comment
l'installer sur le blog de l'auteur :
http://blogs.sun.com/basant/entry/using_mod_sed_to_filter#comment-1233687580000

Pour information, dans debian le binaire apxs est fourni par le paquet
apache-dev.
--
Denis Dordoigne
Membre de l'April - promouvoir et défendre le logiciel libre - april.org
Rejoignez maintenant plus de 5 000 personnes, associations,
entreprises et collectivités qui soutiennent notre action
JKB
2010-09-10 11:40:47 UTC
Permalink
Le Fri, 10 Sep 2010 12:47:09 +0200,
Post by Denis Dordoigne
Post by JKB
Post by Denis Dordoigne
http://httpd.apache.org/docs/trunk/fr/mod/mod_sed.html
Je l'avais raté, celui-là. Mais pour un certain nombre de raisons,
je dois encore rester avec un apache 2.2...
Il fonctionne très bien avec apache 2.2, un commentaire explique comment
http://blogs.sun.com/basant/entry/using_mod_sed_to_filter#comment-1233687580000
Pour information, dans debian le binaire apxs est fourni par le paquet
apache-dev.
Ah ? J'étais resté avec la doc qui disait que ce n'était implanté
qu'à partir de 2.3.

Je cours regarder,

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
JKB
2010-09-10 12:05:19 UTC
Permalink
Le Fri, 10 Sep 2010 12:47:09 +0200,
Post by Denis Dordoigne
Post by JKB
Post by Denis Dordoigne
http://httpd.apache.org/docs/trunk/fr/mod/mod_sed.html
Je l'avais raté, celui-là. Mais pour un certain nombre de raisons,
je dois encore rester avec un apache 2.2...
Il fonctionne très bien avec apache 2.2, un commentaire explique comment
http://blogs.sun.com/basant/entry/using_mod_sed_to_filter#comment-1233687580000
Bon, c'est pour l'instant un échec :
mod_sed.c:531: warning: data definition has no type or storage class
mod_sed.c:531: warning: parameter names (without types) in function
declaration
mod_sed.c:531: error: function 'AP_DECLARE_MODULE' is initialized like a
variable
mod_sed.c:532: error: invalid initializer
mod_sed.c:532: error: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:532: warning: excess elements in scalar initializer
mod_sed.c:532: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:533: warning: excess elements in scalar initializer
mod_sed.c:533: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:534: warning: excess elements in scalar initializer
mod_sed.c:534: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:535: warning: excess elements in scalar initializer
mod_sed.c:535: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:536: warning: excess elements in scalar initializer
mod_sed.c:536: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:537: warning: excess elements in scalar initializer
mod_sed.c:537: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_sed.c:539: warning: excess elements in scalar initializer
mod_sed.c:539: warning: (near initialization for 'AP_DECLARE_MODULE')
apxs:Error: Command failed with rc=65536

Il y a des macros qui sont déféinies dans apache2.3 et qui ne le
sont pas dans apache2.2...

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
Denis Dordoigne
2010-09-10 12:07:31 UTC
Permalink
Quelle-est la version de debian ? Est-ce du 32 ou du 64 bit ?
--
Denis Dordoigne
Membre de l'April - promouvoir et défendre le logiciel libre - april.org
Rejoignez maintenant plus de 5 000 personnes, associations,
entreprises et collectivités qui soutiennent notre action
JKB
2010-09-10 12:14:52 UTC
Permalink
Le Fri, 10 Sep 2010 14:07:31 +0200,
Post by Denis Dordoigne
Quelle-est la version de debian ? Est-ce du 32 ou du 64 bit ?
Mixed ;-) C'est du sparc64, donc noyau 64 bits, userland 32 bits.

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
Patrick Mevzek
2010-09-10 22:43:51 UTC
Permalink
J'aimerais que pour
le CGI en question, apache remplace automatiquement les tabulations par
     mais je n'ai rien trouvé de probant.
Ce qui suit ne marche pas ?

<Location />
AddOutputFilterByType SUBSTITUTE text/html
Substitute s/\t/&nbsp;&nbsp;&nbsp;&nbsp;/n
</Location>

Cf http://httpd.apache.org/docs/2.2/mod/mod_substitute.html

Ou sinon
http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html ?

Sinon le problème vient probablement du fait que c'est la sortie d'un CGI
plutôt qu'une page statique. Vous avez essayé avec un document HTML fixe ?

PS: c'est pas plus simple de modifier le CGI pour faire le changement en
interne, plutôt que de bidouiller Apache ?
--
Patrick Mevzek . . . . . . . . . . . . . . Dot and Co
<http://www.dotandco.net/> <http://www.dotandco.com/>
<http://www.dotandco.net/ressources/icann_registrars/prices>
<http://icann-registrars-life.dotandco.net/>
JKB
2010-09-11 08:11:52 UTC
Permalink
Le 10 Sep 2010 22:43:51 GMT,
Post by Patrick Mevzek
J'aimerais que pour
le CGI en question, apache remplace automatiquement les tabulations par
&nbsp;&nbsp;&nbsp;&nbsp; mais je n'ai rien trouvé de probant.
Ce qui suit ne marche pas ?
<Location />
AddOutputFilterByType SUBSTITUTE text/html
Substitute s/\t/&nbsp;&nbsp;&nbsp;&nbsp;/n
</Location>
Cf http://httpd.apache.org/docs/2.2/mod/mod_substitute.html
Ne fonctionne pas, mais je ne sais pas pourquoi.
Post by Patrick Mevzek
Ou sinon
http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html ?
Ça, c'est mieux. Je suis en train de patcher expand pour qu'il
fonctionne en html. Je crois que j'arrive enfin à quelque chose.

Merci,

JKB
--
Si votre demande me parvient sur carte perforée, je titiouaillerai très
volontiers une réponse...
=> http://grincheux.de-charybde-en-scylla.fr
Loading...