www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Can D still compile html files? Seems not.

reply Charles Hixson <charleshixsn earthlink.net> writes:
.../projects/D/cells$ dmd test1.html
Error: unrecognized file extension html

test1.html is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="LibreOffice 3.5  (Linux)">
	<META NAME="CREATED" CONTENT="20130222;8533000">
	<META NAME="CHANGED" CONTENT="20130222;8553300">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P>This is a test.</P>
<code>
main()
{
}
</code>
</BODY>
</HTML>
Feb 22 2013
next sibling parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
http://dlang.org/changelog.html#new2_060

"HTML input file support completely removed."

-Steve
Feb 22 2013
parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/22/13, Steven Schveighoffer <schveiguy yahoo.com> wrote:
 http://dlang.org/changelog.html#new2_060

 "HTML input file support completely removed."

 -Steve
However it's still listed in the spec as a feature: http://dlang.org/html.html
Feb 22 2013
parent "bearophile" <bearophileHUGS lycos.com> writes:
Andrej Mitrovic:

 However it's still listed in the spec as a feature:
I see a similar feature used every day in online articles that contain Haskell code. But apparently D programmers are not interested in it... Bye, bearophile
Feb 22 2013
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
That's not very difficult to do with a script of some sort 
(though I really wish dmd could take a file from stdin to avoid 
the intermediate file)

I don't have one off the top of my head, but a regexp could 
probably do it well enough.
Feb 22 2013
prev sibling parent reply "Jesse Phillips" <Jessekphillips+d gmail.com> writes:
Nope, removed. While not the same and may not do anything that 
you are considering.

This was made to compile listings and then put the output of 
compiler and run into a new tex file.

https://github.com/JesseKPhillips/listings-dlang-extractor
Feb 22 2013
parent reply Charles Hixson <charleshixsn earthlink.net> writes:
On 02/22/2013 08:59 PM, Jesse Phillips wrote:
 Nope, removed. While not the same and may not do anything that you are
 considering.

 This was made to compile listings and then put the output of compiler
 and run into a new tex file.

 https://github.com/JesseKPhillips/listings-dlang-extractor
What actually brought this up is that I've gotten so disgusted with ddoc that I was looking for pretty much ANY alternative. It looks, though, like I've got to use a mixture of ddoc and doxygen. Doxygen won't handle extern(C) code that I need to document, and ddoc is basically a verbose and crippled system that doesn't generate an index or a usable table of contents. FWIW, I'm not too pleased with doxygen either, but it has decent indexes and a decent table of contents, and the pdf it generates has a reasonable legibility. (The html is only useful for small pieces of code, because the fonts are too big. I'm sure if I were better at html I could fix this, but the last time I studied html everything was static. (I.e., before either javascript or css.) So if I can make a pdf do the job, that's what I'll use. (And, FWIW, I've never studied TEX, so I don't even think about customizing THAT format.) This is really annoying. Documentation should just be something that I use to keep track of what I've done when the program has gotten too big to hold in my memory...or was done too long ago. None of these are even potentially useful as end user documentation, and I'm not planning on publishing the library as closed source. (Even open source is dubious. The parts I'm currently writing are documentation of pieces of a C library that I use in the current project, not the complete thing, so it's general utility is dubious.) Eventually the entire project will, if successful, be GPL, so the documentation is for programmers...especially me. And having it be a big and annoying imposition is a distraction that I really don't need. But this kludge of a solution that I've come up with is "better", or at least faster, than writing my own doc system. And probably lots faster, even though I would write it in a language better suited to the process than D. Probably Python or Ruby. (And the probably means Python.) I did take the idea seriously enough at one point though to start putting together an appropriate syntax. It wouldn't be THAT hard. The hardest part would be generating the index and table of contents. For that matter, I like that ddoc allows/requires that you specify the file(s) that are being documented. But I want to be able to do it piecemeal instead of all at once. Arrgh! I shouldn't think about how to do it, or I might decide to go ahead, even though it's an insane diversion of effort.
Feb 23 2013
next sibling parent reply "Jesse Phillips" <Jessekphillips+d gmail.com> writes:
On Saturday, 23 February 2013 at 19:07:31 UTC, Charles Hixson 
wrote:
 What actually brought this up is that I've gotten so disgusted 
 with ddoc that I was looking for pretty much ANY alternative.
ah, then Tex isn't what you want. As for improving DDOC several attempts have been made. CandyDoc http://www.dsource.org/projects/helix/wiki/CandyDoc and vibe.d does something different http://vibed.org/api/ Default DDoc is definitely not very usable. There have also been others, several based on CandyDoc.
Feb 23 2013
parent Charles Hixson <charleshixsn earthlink.net> writes:
On 02/23/2013 06:30 PM, Jesse Phillips wrote:
 On Saturday, 23 February 2013 at 19:07:31 UTC, Charles Hixson wrote:
 What actually brought this up is that I've gotten so disgusted with
 ddoc that I was looking for pretty much ANY alternative.
ah, then Tex isn't what you want. As for improving DDOC several attempts have been made. CandyDoc http://www.dsource.org/projects/helix/wiki/CandyDoc and vibe.d does something different http://vibed.org/api/ Default DDoc is definitely not very usable. There have also been others, several based on CandyDoc.
CandyDoc looked like it was abandoned years ago, and, in any case (IIUC) it was just a wrapper around DDoc, so any real deficiencies wouldn't be fixed, though it might be less verbose and have friendlier macros.
Feb 23 2013
prev sibling parent Dan Olson <zans.is.for.cans yahoo.com> writes:
Maybe you want Knuth's Literate Programming. 

http://en.wikipedia.org/wiki/Literate_programming

Long ago it was only for pascal and C (web and cweb), but now I see
there is noweb that works with any programming language.
-- 
Dan
Feb 26 2013