🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit cb44a3c33227ab8077759e0a55aea78f55b4a49b
Parent: 1403669b22b1435f588f71d985db158dc8613f39
Author: mcol <mcol@posteo.net>
Date: 2021-10-05 22:47:08 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2021-10-05 22:47:08 +0100

Add modeToSymbol function

src/Types.hs Modified

@@ -74,6 +74,13 @@
 modeToOctal ModeSymlink = "20000"
 modeToOctal ModeSubmodule = "60000"
 
+modeToSymbolic :: TreeEntryMode -> String
+modeToSymbolic ModeDirectory = "drwxr-xr-x"
+modeToSymbolic ModePlain = "-rw-r--r--"
+modeToSymbolic ModeExecutable = "-rwxr-xr-x"
+modeToSymbolic ModeSymlink = "l---------"
+modeToSymbolic ModeSubmodule = "git-module"
+
 {-
 GVal implementations for data definitions above, allowing commits to be rendered in
 Ginger templates.