Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-08 Thread Forgeot Eric
Sorry for the late reply. I'm glad you managed to make it work and it can be 
useful for you. I think I forgot to upload the archive. It's corrected now: 
http://wiki.txt2tags.org/uploads/HTML-WikiConverter-Txt2tags-0.02.zip


It's working quite well, except for some badly formed HTML, for example when 
they use a wysiwyg tool and select extra spaces around the words they want to 
underline ou make as italic. Then it will result in a // bad export// and it 
won't display correctly. It's maybe possible to correct this with some sed 
afterwards.

A python tool would make the whole txt2tags experience easier if there is no 
need to compile a perl module.



- Mail original -
De : M. Fioretti 
À : txt2tags-list@lists.sourceforge.net
Cc : 
Envoyé le : Vendredi 7 décembre 2012 19h17
Objet : Re: [t2t] How do you convert HTML to txt2tags _automatically_???

On Fri, Dec 07, 2012 16:15:32 PM -0200, Aurelio Jargas wrote:
> I also did not know about this Perl converter, nice!

yes, the very first thing to do, before even looking for a Python
converter, would be to add a huge link to it in the official txt2tags
site. The real, if not only problem of unhtml.vim is not that is an
old and dirty hack, it is that it is not scriptable. I too realized that...

> It could be easily converted to sed, since it's all about s///g

but lack of time made me search for a quicker solution, so I'm glad I
found this one and made it work (see other email).

Marco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-07 Thread M. Fioretti
On Fri, Dec 07, 2012 16:15:32 PM -0200, Aurelio Jargas wrote:
> I also did not know about this Perl converter, nice!

yes, the very first thing to do, before even looking for a Python
converter, would be to add a huge link to it in the official txt2tags
site. The real, if not only problem of unhtml.vim is not that is an
old and dirty hack, it is that it is not scriptable. I too realized that...

> It could be easily converted to sed, since it's all about s///g

but lack of time made me search for a quicker solution, so I'm glad I
found this one and made it work (see other email).

Marco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-07 Thread Aurelio Jargas
I also did not know about this Perl converter, nice!

This week I needed to convert a page to txt2tags and used the unhtml.vim
script. It still works, but it's a dirty hack I've made back in 2002! It
could be easily converted to sed, since it's all about s///g.

But what I really wanted is a nice Python script using the standard HTML
parser. There must be plenty of Markdown to HTML converters out there. I
would start searching for a Python one and adapting it to txt2tags.



On Fri, Dec 7, 2012 at 3:43 PM, M. Fioretti  wrote:

> On Fri, Dec 07, 2012 10:38:52 AM +, Forgeot Eric wrote:
> > Look at this:
> >
> > http://wiki.txt2tags.org/index.php/Main/Html2wiki
> >
> > It works quite well for me, better than unvim at least.
>
> Eric,
>
> this sounds just like what I need, but... where is the source code? I
> know how to checkout with svn, how to install Perl modules as binary
> packages or from source (perl Makefile.pl etc...) but something isn't
> clear (I have already installed the generic perl-HTML-WikiConverter)
>
> More exactly:
>
> the page http://wiki.txt2tags.org/index.php/Main/Html2wiki says
> (numbered for clarity)
>
> ###
>
> 1) I've created a txt2tags export:
>
> https://code.google.com/p/txt2tags/source/browse/trunk/extras/HTML-WikiConverter-Txt2tags/lib/HTML/WikiConverter/Txt2tags.pm
>
> 2) Get and install HTML-WikiConverter first:
> http://search.cpan.org/dist/HTML-WikiConverter/
>
> Install this module (see README if needed):
> perl Makefile.PL
> make
> # make test (is not working at the moment)
> make install
>
> 3) You can get a released version there:
>Attach:HTML-WikiConverter-Txt2tags-0.02.zip
>
> ###
>
> (2) is not even needed on certain distributions, as html-wikiconverter
> is available as binary package, so no problem
>
> from (1) you only get the raw .pm file. Shouldn't it too be installed
> with the usual "perl Makefile.pl.."? If yes, where is the Makefile? If
> no, should one just drop it in the same folder where the rest of
> HTML-wikiconverter gets installed?
>
> if I click on (3) I am asked for a password, so no luck, and I don't
> recognize any other way from the html2wiki page to get my hands on the
> source code of an html2wiki program.
>
> I'll try to install the .pm file manually and report the result, but
> of course any suggestion is very welcome
>
> Marco
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> txt2tags-list mailing list
> https://lists.sourceforge.net/lists/listinfo/txt2tags-list
>



-- 
Aurelio | www.aurelio.net | @oreio
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-07 Thread M. Fioretti
On Fri, Dec 07, 2012 10:38:52 AM +, Forgeot Eric wrote:
> Look at this:
> 
> http://wiki.txt2tags.org/index.php/Main/Html2wiki
> 
> It works quite well for me, better than unvim at least.

Eric,

this sounds just like what I need, but... where is the source code? I
know how to checkout with svn, how to install Perl modules as binary
packages or from source (perl Makefile.pl etc...) but something isn't
clear (I have already installed the generic perl-HTML-WikiConverter)

More exactly:

the page http://wiki.txt2tags.org/index.php/Main/Html2wiki says
(numbered for clarity)

###

1) I've created a txt2tags export:
https://code.google.com/p/txt2tags/source/browse/trunk/extras/HTML-WikiConverter-Txt2tags/lib/HTML/WikiConverter/Txt2tags.pm

2) Get and install HTML-WikiConverter first: 
http://search.cpan.org/dist/HTML-WikiConverter/
   
Install this module (see README if needed):
perl Makefile.PL
make
# make test (is not working at the moment)
make install 

3) You can get a released version there:
   Attach:HTML-WikiConverter-Txt2tags-0.02.zip

###

(2) is not even needed on certain distributions, as html-wikiconverter
is available as binary package, so no problem

from (1) you only get the raw .pm file. Shouldn't it too be installed
with the usual "perl Makefile.pl.."? If yes, where is the Makefile? If
no, should one just drop it in the same folder where the rest of
HTML-wikiconverter gets installed?

if I click on (3) I am asked for a password, so no luck, and I don't
recognize any other way from the html2wiki page to get my hands on the
source code of an html2wiki program.

I'll try to install the .pm file manually and report the result, but
of course any suggestion is very welcome

Marco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-07 Thread Forgeot Eric
Look at this:

http://wiki.txt2tags.org/index.php/Main/Html2wiki


It works quite well for me, better than unvim at least.



- Mail original -
De : M. Fioretti 
À : "Homme, James" 
Cc : txt2tags mailing list 
Envoyé le : Jeudi 6 décembre 2012 21h12
Objet : Re: [t2t] How do you convert HTML to txt2tags _automatically_???

On Thu, Dec 06, 2012 19:47:09 PM +, Homme, James wrote:
> Hi,
> You could get the Python script from the site and run that.

which script, sorry? I don't understand. The txt2tags Python script
converts t2t _to_ HTML (and other formats, of course), not the other
way around

Marco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-06 Thread M. Fioretti
On Thu, Dec 06, 2012 19:47:09 PM +, Homme, James wrote:
> Hi,
> You could get the Python script from the site and run that.

which script, sorry? I don't understand. The txt2tags Python script
converts t2t _to_ HTML (and other formats, of course), not the other
way around

Marco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


Re: [t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-06 Thread Homme, James
Hi,
You could get the Python script from the site and run that.

Jim


-Original Message-
From: M. Fioretti [mailto:mfiore...@nexaima.net]
Sent: Thursday, December 06, 2012 2:19 PM
To: txt2tags-list@lists.sourceforge.net
Subject: [t2t] How do you convert HTML to txt2tags _automatically_???

Greetings,
the title says it all.

I DO know about this VI/VIM macro (if that's the correct name):

http://txt2tags.org/tips.html#html-to-t2t

but I am looking for a way to do everything in a shell script, not
interactively inside VI or VIM

I have found this suggestion on how to run vi inside a shell script:

http://www.computing.net/answers/linux/use-vi-within-script/29184.html

but I can't find a way to adapt that trick to load a local copy of
this file

http://txt2tags.googlecode.com/svn/trunk/extras/unhtml.vim

and execute it. Is it possible?

If not, could that unhtml.vim file be loaded/executed via awk, sed, whatever...
with as little editing as possible?

If that isn't possible either, are there other already tested ways to
automatically convert an HTML file to t2t markup from inside a shell script?

TIA,
MArco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list



This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list


[t2t] How do you convert HTML to txt2tags _automatically_???

2012-12-06 Thread M. Fioretti
Greetings,
the title says it all.

I DO know about this VI/VIM macro (if that's the correct name):

http://txt2tags.org/tips.html#html-to-t2t

but I am looking for a way to do everything in a shell script, not
interactively inside VI or VIM

I have found this suggestion on how to run vi inside a shell script:

http://www.computing.net/answers/linux/use-vi-within-script/29184.html

but I can't find a way to adapt that trick to load a local copy of
this file

http://txt2tags.googlecode.com/svn/trunk/extras/unhtml.vim

and execute it. Is it possible?

If not, could that unhtml.vim file be loaded/executed via awk, sed, whatever...
with as little editing as possible?

If that isn't possible either, are there other already tested ways to
automatically convert an HTML file to t2t markup from inside a shell script?

TIA,
MArco

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
txt2tags-list mailing list
https://lists.sourceforge.net/lists/listinfo/txt2tags-list