Colin Woodbury avatar Colin Woodbury committed ca07ded

Changed `-Ai` and `-As` colours to match `pacman-color`

- Also added `pacman-color` to optional dependencies for Aura.
- Version bump.

Comments (0)

Files changed (4)

Aura/Languages.hs

 --------------------------
 -- AurConnection functions
 --------------------------
-aurPkgInfoFields :: Language -> [String]
-aurPkgInfoFields English  = [ "Name","Version","AUR Status","Project URL"
-                            ,"AUR URL","License", "Votes","Description" ]
-aurPkgInfoFields Japanese = [ "名前","バージョン","パッケージ状態"
-                            , "プロジェクト","パッケージページ","ライセンス"
-                            ,"投票数","概要" ]
-aurPkgInfoFields Polish   = [ "Nazwa","Wersja","Status w AUR","URL Projektu"
-                            , "URL AUR", "Licencja","Głosy","Opis" ]
-aurPkgInfoFields Croatian = [ "Ime","Verzija","AUR Stanje","URL Projekta"
-                            , "AUR URL","Licenca","Glasovi","Opis" ]
-aurPkgInfoFields Swedish  = [ "Namn","Version","AUR Status","Projekt URL"
-                            , "AUR URL","Licens","Röster","Beskrivning"]
-aurPkgInfoFields German   = [ "Name","Version","AUR Status","Projekt URL"
-                            , "AUR URL","Lizenz","Stimmen","Beschreibung"]
-aurPkgInfoFields Spanish  = [ "Nombre","Versión","Estado en AUR","URL del proyecto"
-                            ,"URL en AUR","Licencia", "Votos","Descripción" ]
+infoFields :: Language -> [String]
+infoFields English  = [ "Repository","Name","Version","AUR Status"
+                      , "Project URL","AUR URL","License", "Votes"
+                      , "Description" ]
+infoFields Japanese = [ "リポジトリ","名前","バージョン","パッケージ状態"
+                      , "プロジェクト","パッケージページ","ライセンス"
+                      , "投票数","概要" ]
+infoFields Polish   = [ "Repository","Nazwa","Wersja","Status w AUR"
+                      , "URL Projektu","URL AUR", "Licencja","Głosy","Opis" ]
+infoFields Croatian = [ "Repository","Ime","Verzija","AUR Stanje"
+                      , "URL Projekta","AUR URL","Licenca","Glasovi","Opis" ]
+infoFields Swedish  = [ "Repository","Namn","Version","AUR Status"
+                      , "Projekt URL","AUR URL","Licens","Röster"
+                      , "Beskrivning"]
+infoFields German   = [ "Repository","Name","Version","AUR Status"
+                      , "Projekt URL","AUR URL","Lizenz","Stimmen"
+                      , "Beschreibung"]
+infoFields Spanish  = [ "Repository","Nombre","Versión","Estado en AUR"
+                      , "URL del proyecto","URL en AUR","Licencia", "Votos"
+                      , "Descripción" ]
 
 outOfDateMsg :: Language -> Bool -> String
 outOfDateMsg English  True  = red "Out of Date!"
 makedepends=('ghc' 'haskell-regex-base' 'haskell-regex-pcre' 'haskell-json'
              'haskell-curl')
 depends=('gmp' 'pacman')
+optdepends=('pacman-color: For coloured pacman output in Aura.')
 options=('strip')
 source=(https://github.com/downloads/fosskers/aura/${_hkgname}-${pkgver}.tar.gz)
 md5sums=('8dafa7078e1d3647d5ea81d575a41249')
           paddedFields     = map (\x -> postPad x ws longestField) fields
           ws               = whitespace $ langOf ss
           longestField     = maximum $ map length fields
-          fields           = aurPkgInfoFields $ langOf ss
-          entries          = [ nameOf info
+          fields           = infoFields $ langOf ss
+          entries          = [ magenta "aur"
+                             , nameOf info
                              , latestVerOf info
                              , outOfDateMsg (langOf ss) $ isOutOfDate info
-                             , projectURLOf info
+                             , cyan $ projectURLOf info
                              , aurURLOf info
                              , licenseOf info
                              , votesOf info
     returnSuccess
 
 renderSearchResult :: String -> PkgInfo -> String
-renderSearchResult reg info = yellow "aur/" ++ n ++ " " ++ v ++ "\n    " ++ d
-    where c cs = case cs =~ ("(?i)" ++ reg) of (b,m,a) -> b ++ cyan m ++ a
+renderSearchResult r info = magenta "aur/" ++ n ++ " " ++ v ++ "\n    " ++ d
+    where c cs = case cs =~ ("(?i)" ++ r) of (b,m,a) -> b ++ cyan m ++ a
           n = c $ nameOf info
           d = c $ descriptionOf info
           v | isOutOfDate info = red $ latestVerOf info
 Aura Changelog
 ==============
 
+1.0.3.0
+-------
+- Support for `pacman-color` added.
+
 1.0.2.2
 -------
 - Fixed parsing bug in `Bash`.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.