On 21 March 2014 01:57, Stéphane Gourichon <[email protected]> wrote: > 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.
Yes, as I said *x operating systems don't do it by default, but as Grant pointed out they may be able to be set up to do so. > > # 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. I agree that when you use a local git you know which version you are using, rather than the latest rubbish someone pushed to the dev version :) But we don't know the OPs use-case. > > # 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/$@ WARNING: untested :) Try the system attribute: {sys: wget -O - https://raw.github.com/asciidoctor/asciidoctor/master/whatever.asciidoc} instead of include. Cheers Lex > > 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 > PS: please don't edit the subjects, it unthreads stuff on gmail (yes I know its wrong, but you try telling google :) > -- > 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. -- 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.
