berberman / arch-web

Arch Linux official and AUR web interface binding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arch-web

Hackage MIT license build

arch-web is a simple library providing functions to access Official repositories web interface and Aurweb RPC interface, based on servant-client.

Documentation

Documentation of released version is available at hackage, and of master is at github pages.

Example

import Control.Lens
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import qualified Data.Text as T
import Web.ArchLinux
import Web.ArchLinux.Types.Lens

main :: IO ()
main = void . runAPIClient' $ do
  linux <- getPackageDetails Core X86_64 "linux"
  liftIO . putStrLn $ "linux in [core] has version: " <> T.unpack (linux ^. pkgver)
  • Search keywords "yay":
import Control.Lens 
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Web.ArchLinux
import Web.ArchLinux.Types.Lens

main :: IO ()
main = void . runAPIClient' $ do
  response <- searchAur ByNameOrDesc "yay"
  liftIO . print $ (response ^. results ^.. each . name)
  • ...

About

Arch Linux official and AUR web interface binding

License:MIT License


Languages

Language:Haskell 94.0%Language:Nix 6.0%