Le 20/03/2014 15:28, Grant Edwards a écrit :
It's not built into the kernel, but there are user-space filesystems
that do:

   http://savannah.nongnu.org/projects/davfs2

If that doesn't do what the OP wants, I'm sure there are others. If
not it shouldn't take more than a couple hours to write one that does.

Hello,

This discussion is drifting away.

It's like the first question was "Can these scissors cut metal ?", the answers like "Yes if you change the blade and add an hydraulic machine strong enough to cut metal" then the discussion about some houses being stock equipped with hydraulic machines and others not.

# The resquest

Going back to the initial question, on Ubuntu 13.10 I pasted the given two lines in a file and run asciidoc 8.6.7. Say current dir was /my_current_directory . Asciidoc looked for a file at this path:
/my_current_directory/https:/raw.github.com/asciidoctor/asciidoctor/master/README.adoc

Of course it did not find it and complained.

# The answer

So, the answer is: no asciidoc doesn't handle URLs in include.

# Good idea ?

I'm not sure if it would be a good idea anyway. I'd rather git checkout all source to have something self-contained locally (even if git would fetch other repos recursively).

It doesn't feel sane to have to fetch an URL again and again each time a document is compiled. It forces asciidoc to deal with additional complexity I believe.

# Alternative solution

If I positively needed to fetch some remote document I would do that externally, e.g. with a makefile that calls wget or curl only if the file is not already retrieved. Then you can compile the document once then have it locally kept without network access on each compile. I did that for other projects it works pretty well. By the way it's the very spirit of git.

For example you can put this in a Makefile (indented lines 2 and 5 need a tabulation not spaces):

my_doc.html: my_doc.txt README.adoc
    asciidoc -o $@ $<

README.adoc:
    wget -S https://raw.github.com/asciidoctor/asciidoctor/master/$@

And my_doc.txt would contain one line :

include::README.adoc[]

Run make and it does what you expect : first "make" downloads, following "make" do not download again.


Regards,

-- Stéphane Gourichon

--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to