X-Git-Url: http://nitlanguage.org?ds=sidebyside
diff --git a/src/nitcatalog.nit b/src/nitcatalog.nit
index 6aba6f1..c604fa6 100644
--- a/src/nitcatalog.nit
+++ b/src/nitcatalog.nit
@@ -12,28 +12,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Basic catalog generator for Nit projects
+# Basic catalog generator for Nit packages
#
# See:
#
-# The tool scans projects and generates the HTML files of a catalog.
+# The tool scans packages and generates the HTML files of a catalog.
#
# ## Features
#
-# * [X] scan projects and their `.ini`
-# * [X] generate lists of projects
-# * [X] generate a page per project with the readme and most metadata
+# * [X] scan packages and their `.ini`
+# * [X] generate lists of packages
+# * [X] generate a page per package with the readme and most metadata
# * [ ] link/include/be included in the documentation
-# * [ ] propose `related projects`
-# * [ ] show directory content (a la nitls)
+# * [ ] propose `related packages`
+# * [X] show directory content (a la nitls)
# * [X] gather git information from the working directory
# * [ ] gather git information from the repository
-# * [ ] gather project information from github
+# * [ ] gather package information from github
# * [ ] gather people information from github
# * [ ] reify people
# * [ ] separate information gathering from rendering
# * [ ] move up information gathering in (existing or new) service modules
-# * [ ] add command line options
+# * [X] add command line options
# * [ ] harden HTML (escaping, path injection, etc)
# * [ ] nitcorn server with RESTful API
#
@@ -48,13 +48,13 @@
# How to use the tool as the basis of a Nit code archive on the web usable with a package manager is not clear.
module nitcatalog
-import loader # Scan&load projects, groups and modules
+import loader # Scan&load packages, groups and modules
import doc::doc_down # Display mdoc
import md5 # To get gravatar images
import counter # For statistics
import modelize # To process and count classes and methods
-redef class MProject
+redef class MPackage
# Return the associated metadata from the `ini`, if any
fun metadata(key: String): nullable String
do
@@ -83,9 +83,18 @@ end
class CatalogPage
super Template
+ # The associated catalog, used to groups options and other global data
+ var catalog: Catalog
+
# Placeholder to include additional things before the ``.
var more_head = new Template
+ # Relative path to the root directory (with the index file).
+ #
+ # Use "" for pages in the root directory
+ # Use ".." for pages in a subdirectory
+ var rootpath: String
+
redef init
do
add """
@@ -94,7 +103,7 @@ class CatalogPage