David,
I haven't looked at the source, but try 'g++ main.cpp'; it's a C++
program (std is a namespace, a feature that C doesn't know about).
Cheers,
Ivan
David Friedland wrote:
I want to try to connect this somehow to a CGI to make
a webpage where
people can paste in HTML and get wikitext out by clicking a button. This
would make it easy to convert HTML tables I run across to wikitables
quickly, by just a couple copy and pastes. However, I seem to be
completely inept at compiling this. I tried "cc main.cpp" but I get
complaints about errors from ld about Undefined symbols: std:: ....
I apologize for seeming clueless but my only C++ experience is with
Visual C++. Is my build environment messed up or do I need to be
compiling differently? Perhaps a makefile would be helpful here. I'm
running Mac OS X 10.3 with the developer tools installed.
- David
Magnus Manske wrote:
I hacked a little C++ utility (hereby under GPL,
source files
attached) that converts HTML to wiki markup. A few points:
* It should compile on any Windows/*nix system (you might have to turn
off warnings, though)
* Pipe the HMTL in, and get wiki markup out
* Shouldn't touch existing wiki markup
* Keeps HTML if there's no wiki markup defined for it
* Other wiki markup (for other wikis) can be added with only a few
lines of source
* Internally uses a new string class with 32-bit-chars (potential for
unicode there, also it should work with unicode "as is")
Downsides:
* Doesn't check HTML/wiki markup validity (broken HTML will become
broken wiki markup, which might be less bad though)
* Ignores <nowiki> (though I don't think that matters)
Idea: Have a checkbox on the edit page (or maybe on preferences
instead) that says:
"Convert HTML to wiki markup on preview"
Conversion *should* only take place prior to preview, so a human can
make certain nothing's broken.
Magnus
------------------------------------------------------------------------
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)Wikipedia.org
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)Wikipedia.org
http://mail.wikipedia.org/mailman/listinfo/wikitech-l