Staging instance, all changes can be removed at any time

Skip to content

swh web ui: first implementation of source tree graphical navigation feature by providing HTML views for swh directory and content objects

First attempt of implementing HTML views for easily browsing a source tree archived by swh (#759 (closed))

This is my resulting work of this week: first draft of HTML views for browsing directory and content objects. This is pretty basic at that point but enables to flawlessly browse a source tree from any provided root directory identified in the swh archive.

New web end points added:

  • /ui/ -> points to the linux kernel source tree
  • /ui/directory/<sha1_git>/ and /ui/directory/<sha1_git>// -> browse a directory
  • /ui/content/<sha1_git>/ -> display content

The content ui end point will try to highlight code using Pygments before displaying it. In order to get a correct highlighting, it is better to come from a directory view when navigating to it as filename is used as a hint to get the adequate Pygments lexer. Mime type is used instead which leads to poor results as almost everything is identified as text/plain or equivalent.

Let the reviews begin !


Migrated from D246 (view on Phabricator)

Merge request reports

Loading