Pastebin
From Arnout Engelen
I originally wrote a simple pastebin for the wxWidgets IRC channel.
Now I proposed to use the pastebin at papernapkin.org instead, since duplication of effort is bad.
Contents |
[edit] building and testing
[edit] building
automatically fetching dependencies 'ant resolve', then build with 'ant build'.
Issues:
- why is javax.servlet (and javax.transactions) commented out as a dependency in ivy.xml? berlios
- why is src in build.xml set to src/java instead of src/main/java? berlios
- it requires wicket-1.2-beta1 and wicket-extensions-1.2-beta1 jars instead of those downloaded by ivy berlios
[edit] testing
quickstart (remember to first copy over my modified JHighlight jar)
export CLASSPATH=.:build/:test/:src/main/resources/:`find lib | perl -pe "s/\\n/:/g"` javac test/quickstart/StartPastebin.java java quickstart/StartPastebin
[edit] c++ highlighting
For this, I added C++ highlighting support to JHighlight.
[edit] autolinking
I'm also adding autolinking certain static keywords to reference manual URL's. I have working code, by adding support to JHighlight and talking to that. Not committing yet, awaiting Geert's reply on the JHighlight interface first.
TODO:
- open links in new window
[edit] getting the mapping
For wxWidgets, the mapping could be extracted from the html/latex/xml docs, I used an adaption of the scripts by Tierra written for the wiki highlighting.
[edit] storing the mapping
We don't really want to rely on a database being present.
Storing the mappings in properties files seems to be the most convenient approach for now. There'd be one with a kind/filename-mapping, and for each kind a name/linkurl-mapping.
[edit] doing the actual linking
it's not clear whether the best place to implement that is in JHighlight or in the pastebin itself. I tend to favour the former, check the JHighlight page for status.
