If you want to turn a binary file into text, use base64. JSmol can then
convert any base64-encoded data back into a string in JavaScript with:

var bytes = org.jmol.io.Base64.decodeBase64(strBase64)

It might take a bit of tweaking of JSmol to implement that generally.

Bob


On Mon, Jan 21, 2013 at 7:08 PM, Gutow, Jonathan H <gu...@uwosh.edu> wrote:

> I am playing with making WebExport produce JSmol compatible output.  The
> goal is to make output that is transportable enough that people can use it
> locally or put it up in a directory on a plain vanilla web server.  As with
> the past renditions, it is not going to be competitive with more
> sophisticated web sites that an expert might make.  We want this to be a
> place people can start and get something working quickly.
>
> I think I have got most of the kinks worked out.  However, without a real
> server backend j2sjmol cannot handle data that is not in text file format.
>  This means that I need to take any data files that are
> gzipped/.jmol/.pngj, etc and break them out into all text versions.  I
> would like to do this without reloading each view.  Ideally, I'd like to
> pipe the binary file through the file handlers directly to the text files
> (.spt, .pdb, .mol .log, etc...).  Any thoughts on the best way to go about
> this?
>
> I do think that the static image .png file will actually always be a
> .pngj, so that it can be used for download.
>
> Thanks,
> Jonathan
>                         Dr. Jonathan H. Gutow
> Chemistry Department                                 gu...@uwosh.edu
> UW-Oshkosh                                           Office:920-424-1326
> 800 Algoma Boulevard                                 FAX:920-424-2042
> Oshkosh, WI 54901
>                 http://www.uwosh.edu/facstaff/gutow/
>
>
>
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to