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 mfiore...@nexaima.net
À : Homme, James james.ho...@highmark.com
Cc : txt2tags mailing list txt2tags-list@lists.sourceforge.net
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


[t2t] [SOLVED] (I think): How do you convert HTML to txt2tags _automatically_???

2012-12-07 Thread M. Fioretti
On Fri, Dec 07, 2012 18:43:37 PM +0100, Marco Fioretti wrote:

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

Here is what I did:

1) click on view raw file in
https://code.google.com/p/txt2tags/source/browse/trunk/extras/HTML-WikiConverter-Txt2tags/lib/HTML/WikiConverter/Txt2tags.pm

2) save the result as Txt2tags.pm in the same system folder where the
   rest of the Perl HTML modules are installed (on FC17 it is
   /usr/share/perl5/vendor_perl/HTML/ )

at that point, the code below works as expected, i.e. it saves inside
$T2T the txt2tags version of the HTML content previously loaded in
$CONTENT:

##
use HTML::WikiConverter;
use HTML::Txt2tags;

my $wc = new HTML::WikiConverter( dialect = 'Txt2tags' );

(other Perl code here...)

$T2T = $wc-html2wiki(html = $CONTENT);

##

As I said, it works, but of course if I overlooked something and/or
there is something that could be done better, thanks in advance for
letting me know!

Thanks Eric for the converter, it's a perfect complement to txt2tags.

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 mfiore...@nexaima.net 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 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