I wanted to download Linux kernel module source code from http://lxr.free-electrons.com/source/net/bluetooth/. Is there any tool like SVN to download the source code generated by LXR engine? Thanks in advance!
How can I download source code from Linux Cross Reference library (generated by LXR engine)?
3.8k Views Asked by Hari Om Prakash AtThere are 5 best solutions below

Here you can browse the references and also can download the source file https://code-grep.com/view/project/54b083273b2082684a000008/linux-3.19-rc2

Not exactly an answer, but I was looking for a related thing - the possibility to download individual C files from LXR as plain text. If it was possible to download files as text, in principle you could write some sort of a parser/automatic downloader for a whole directory.
The documentation for the LXR engine seems to be here:
... and as far as I could see from the 1.0 PDF manual (note that lxr.free-electrons.com seems to run on version 0.3.1, though), there is no mention of plain-text source files being exported (in addition) to the HTML.
So, very likely, as the plain-text source files seem not to be available in an LXR export, there will be no tool that will be able to download. (Btw, I too wish there was a tool like this, otherwise the only option is to clone the entire Linux source tree via git).
Note, however, that there is also an experimental version of LXR from lxr.linux.no ; that one generates HTML that requires JavaScript, and it will show a "download" button in its interface; then one can download the plain-text source file. As lxr.linux.no is down for me for the moment, here's a link to an annotated HTML page to another site, that seems to use the same engine (there is no note ATM for the LXR engine numeric version):
... and this is how the link looks like to obtain plain-text version:
Note that this is a different URL format than what lxr.free-electrons.com would use:
... and there is a note on the start page ( http://lxr.missinglinkelectronics.com/ ) once you enable JavaScript, which states that:
lxr.missinglinkelectronics.com is currently running an experimental fork of the LXR software provided by lxr.linux.no.
... or, in other words: the link format for downloading plain-text source files from lxr.linux.no, will not work for the (current) lxr.free-electrons.com installation.

On free-electrons.com, it works by adding the argument "raw=1" in the URL. For example, this URL...
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8
... will become this :
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8&raw=1
The resulting page can then be saved using the "file saving" feature of your browser. On Linux and Windows, this is usually mapped to the ctrl+s
keyboard shortcut.

The documentation on lxr states that there is a git repo. http://lxr.linux.no/ I have never tried it, but it may be what you are looking for
If you're still looking for an answer, here is a procedure based on a low documented feature of LXR.
?_raw=1
and go there (i.e. press return key)text/plain
)NOTES:
?_raw=1
argument can be used to have HTML files interpreted by your browser, i.e. displayed as HTML because they will be sent astext/html
.?raw=1
(without underscore).?raw=1
works with free-electrons though they use 0.3.1 which was released in 2003!