News for hackers. Stuff that matters.
Re:Dropbox Paper by akeck on Monday January 30, 2017 @03:17PM (#13524602)
I've been playing with passing markdown+css file+image tree to: pandoc {options} -H file.css --self-contained. It base64 encodes the images directly into the HTML5. The css in file.css is wrapped in <style></style> and is inlined in the header. The result is a fat HTML file with all the basic bits to make an article included. Exact line: pandoc --standalone --toc -V "toctitle:'Title'" --self-contained --to html5 -H article.css -o file.html file.markdown. Image links in code: ![Some Server](images/some_server.png)\ <-- escaped space to force inline image.
Re:Dropbox Paper by wodenokoto on Monday January 30, 2017 @03:26PM (#13524678)
For the longest time (5 or 6 years, way longer than Electron) I have been puzzled as to why there didn't exist a document format for offline websites/apps, that are basically a zip file of HTML+CSS+images+javascript.

That way you could build simple, easily distributable multimedia documents and web apps.

Re:Dropbox Paper by zo1 on Monday January 30, 2017 @04:37PM (#13525279)
I haven't used it in a while, but most browsers allow you to go File->Save, and it'll save everything in a contained folder structure that should be easily zippable. Including all linked images/CSS/JS, with their references fixed for local-consumption.

That is, until requireJS/AMD/angular/react/backbone/etc and those sorts of things started polluting the web. Thanks you JS developers.

Re:Dropbox Paper by ktta on Monday January 30, 2017 @03:35PM (#13524754)
This is close, but I'm thinking cut out the web tools part. Do we really have to depend on HTML and CSS (or other XML based format which needs a web browser to view) to make and edit a simple word document? I cringe thinking of the bloat that is introduced when using CSS and javascript to view text+pictures.
Re:Dropbox Paper by criddell on Monday January 30, 2017 @09:50PM (#13527118)
Isn't that basically Microsoft's compiled html (chm) files?
Re:Dropbox Paper by Bjartr on Monday January 30, 2017 @11:47PM (#13527719)
MHTML is an archive file of a webpage and its external resources.
Re:Dropbox Paper by akeck on Monday January 30, 2017 @03:35PM (#13524759)
The pandoc help section on "--self-contained" indicates that it can mostly handle your use case (minus the compression step).
Re:Dropbox Paper by TuringTest on Monday January 30, 2017 @07:18PM (#13526313)
IIRC Mozilla created such file format, and MS Explorer has its own proprietary version. They didn't caught on, though.
Re:Dropbox Paper by ktta on Monday January 30, 2017 @03:32PM (#13524734)
Thanks for the reply. I could really see making great looking documents with this. Although the problem is we're using all these cli tools (I love them too) to edit them.

So the problem is when I try to edit them on a new computer or even online, there's no way for me to do it in most cases, and in when I actually can install packages for all that, there's some dependency management I have to do. One more thing, since the output in HTML file, I have to again use a full-featured(which means slow to open) web browser to render the HTML file.

Re:Dropbox Paper by akeck on Monday January 30, 2017 @03:40PM (#13524802)
I hear you on needing piles of CLI packages. Regarding the web browser, the pandoc HTML seems pretty basic, so even the lightweight GUI browsers will probably handle it correctly. Also, if you include the correct bits in each image link in the markdown, I believe the resulting HTML5 will render with your included image descriptions in a text-only browser.
Re:Dropbox Paper by ktta on Monday January 30, 2017 @05:24PM (#13525644)
Here[1] is the HTML 5 standard. It includes a lot of things that a word file would never need. You're correct about not needing a lot of the things that say a browser like chrome has. Can we still not achieve the same thing with something simpler?

[1]:https://www.w3.org/TR/html5/