[CLUE-Tech] Simpler way of parsing data

Jeffery Cann jccann at home.com
Sun Apr 15 22:46:08 MDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You realize that VIM can take an HTML file and save it as text automagically 
and it will strip out the HTML, leaving you with a reasonable text-formatted 
document, right?  If not, now you do!  IMHO - much simpler than the 
cut-n-paste, which I used to do for a long time until I looked at the VIM 
menus in the graphical mode (gvim or vim -g)

Another cool VIM feature is that you can take a syntax-highlighted piece of 
source code and save it as HTML.  The generated HTML is formatted identically 
to your source code, including highlights.  Great for presentations or 
documentation...

Jeff

On Saturday 14 April 2001 23:43, Kevin Cullis wrote:
> Hey all,
>
> I've been having a discussion with a programmer friend of mine and it's
> funny how we both have different views of the same problem.  I sometimes
> want to "cut and paste" data from the web browser into VIM in order to
> parse the data into useable form, such as records to be inported into a
> database. However, he has stated, along with other programmers I know,
> that I should save the file in HTML and then parse the HTML out of the
> file.  However, while both achieve the same results, my programming
> friends way takes considerably more work and knowledge than my "cut and
> paste" method.  In fact, all I have in my file is the data with a large
> number of spaces which require ONLY one command to use in order to
> remove the multiple spaces rather than his PERL or other method to
> parsing HTML tags.
>
> Why am I mentioning this?  Because most new people to Linux can be
> bombarded with more technical approaches to a problem when sometimes a
> simple problem requires a simple solution.
>
> In VIM, I type:
> :%s/   *//g
>
> to remove all multiple spaces leaving only my data in fields.  However,
> my friends approach can be used for more complex approaches to other
> problems which I can consider in future projects.
>
> Just a comment.
>
> Kevin
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjraeRcACgkQw3/GBQk72kC5CQCeI9R4/jyS6ebizCZFUfn3wAPS
b6IAn3PqFYeDh88+0meuRvLYx+GK6+vD
=xlF+
-----END PGP SIGNATURE-----



More information about the clue-tech mailing list