- Generate "Documented in" HTML
- resolve path to __file__: web.py finds its template directory with
respect to __file__. If __file__ is a symlink, resolve it. This lets
web.py work in a t/interact.pl session.
- Add sanity tests of line_mark_string
- Update TestHelpers::_parseq() to handle HTML section headers as
well as query.py section headers
- Add tests of web.py
- Note: don't look for 200 since web.py doesn't send an HTTP Status-Line.
- In web.py, update the shebang to use env(1). The hard-coded path
caused test failures on Travis, which runs Python in a virtualenv.
Keep old urls compatibility by settings family to C when nothing is
given.
Add a select element to select in which file family we want to search an
ident.
Update filters to support families and to handle Kconfig idents properly.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
git ls-tree return file permissions and symlinks always have permission
120000
So we can use that to identify them
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
If this test succeed it clears cmd so the next test always leads to an
error 400.
And this code is not used anymore so it's better to remove it.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
- Otherwise, we end up with a wrong path variable
that causes an internal server error
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Display filenames and identifiers at the *beginning* of the <title>.
This way, they are better visible in modern browsers' tabs as they
usually cut off the title for space reasons.
This also fixes handling of the root path.
Examples of changed titles:
"Linux source code: (v5.5.6) - Bootlin" becomes "Linux source code (v5.5.6) - Bootlin"
"Linux source code: arch (v5.5.6) - Bootlin" becomes "arch - Linux source code (v5.5.6) - Bootlin"
"Linux source code: arch/um/Makefile (v5.5.6) - Bootlin" becomes "Makefile - arch/um/Makefile - Linux source code (v5.5.6) - Bootlin"
- Fix issue introduced by the previous commit
The 'project' variable could be tested even in the case
it wasn't defined (case of an invalid URL)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Return "400" status when the project doesn't have a database or repo
- In case the DB is not found, properly print the corresponding
file name in the logs
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- In particular to support 'include <path>' statements
- Add some exceptions to the above filters, to exclude
includes that could go outside of the project
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- There was a +1 offset in shown file contents
- This was caused by a bad interpretation of the
code that was replaced by a previous commit
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- In an efficient way: each project defines the filters
it uses, instead of selecting filters from a long list
of filters that takes time to load.
- See filters/linux.py for example
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Manage case that wasn't handled previously
- Return error 400 instead of 404
This fixes https://github.com/bootlin/elixir/issues/77
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Start creating filter definitions and processing,
in order to later support per project definitions
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- And make the regexps more robust,
anticipating some non-standard cases
(extra spaces, spaces before, etc)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- This allows to add hyperlinks in statements like:
/include/ "file.dtsi"
#include "file.dtsi"
In this case, "file.dtsi" is in the same directory
as the including file.
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
For more useful information in seach engine results.
Essentially, we highlight:
- That the page is about source code for the current project
- Pages that are about an identifier
- The revision tag being considered (otherwise the page
has the same title for 2 different tags)
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
- This impacts the drop down menu allowing to choose projects.
As the list of supported projects increases, this should
make project selection easier.
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>