Script to import .bib and output HTML based on a style [closed]

I'm able to use various tools (such as pyP2B.py) to generate a BibTex database. I've also successfully created a AMA styled RTF of the database using JabRef and the APAish extension, although this has to be done manually - and the output is RTF, not HTML or PDF.

What I'm ultimately working toward is automating this process for use in a web application. I'd like to pass the bib file and style as arguments, and receive a stylized PDF or HTML as an output string.

postnote - if my question is not suited for TEX, please go easy. I had an unexpectedly negative response to a similar question posted on StackOverflow yesterday which was more open ended than this. If needed let me know, and I'll delete - please do not punish with downrates.

-

closed as off topic by Joseph Wright♦Mar 2 '13 at 21:55

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Perhaps try a LaTeX source file with \bibliographystyle{foo} and \bibliography{bar} and have your script rename the generated style and .bib files appropriately? pdflatex will generate pdf; there are several tex2html options. – Ethan Bolker Jun 14 '12 at 16:03
Maybe bib2xhtml or bib2html can help you? – matth Jun 14 '12 at 20:30