Marc,

Je vais garder ta solution, désolé les autres.
Je vais creuser.

Bon week-à tous

Le 15 septembre 2017 à 15:57, Marc Chantreux <m...@unistra.fr> a écrit :

> On Fri, Sep 15, 2017 at 03:06:40PM +0200, David Martin wrote:
> > L'ideal serait que je trouve un petit projet opensource, avec un petit
> > formulaire php qui permette
> > à l'exploitation de les saisir.
>
> degainer php pour ca me semble bien overkill ... pour transformer ca:
>
> http://example.fr haah mais trop bien
> http://example.fr haah mais trop bien
> http://example.fr haah mais trop bien
>
> en ca:
>
>
> <p>
> <a href="http://example.fr"; target="_blank">haah mais trop bien</a>
> <a href="http://example.fr"; target="_blank">haah mais trop bien</a>
> <a href="http://example.fr"; target="_blank">haah mais trop bien</a>
> </p>
>
> voila qui me semble suffisant
>
>         sed -r 's/^(\S+) +(.*)/[\2](\1){target="_blank"}/' | pandoc -thtml
>
> avec tous les avantages liés a pandoc : tu pourras avoir la sortie html,
> pdf, ajouter des templates ...
>
> au passage: j'aurais tendance a écrire tout en utilisant pandoc
>
> $ grep . links.*
> links.template:# list of my links
> links.template:$for(links)$ [$links.desc$]($links.url$) $endfor$
> links.yml:---
> links.yml:links:
> links.yml:    - {url: "http://les exemples (pas cools)", desc: "voici une
> URL flinguée"}
> links.yml:    - {url: "http://les.exemples";            , desc:  "une 2eme
> pour la route"}
> links.yml:oops:
> links.yml:    - ["hello","world"]
> links.yml:---
> $ pandoc --template links.template links.yml|pandoc
>
>  <h1 id="list-of-my-links">list of my links</h1>
>  <p><a href="http://les%20exemples%20(pas%20cools)">voici une URL
>  flinguée</a> <a href="http://les.exemples";>une 2eme pour la
>  route</a></p>
>
> si tu ajoute un -s au dernier pandoc, il te fait une page complete.
>
> cordialement,
> marc
>



-- 
david martin

Répondre à