Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Commit

Permalink
Rename to IRC Browse.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed Mar 5, 2013
1 parent 9e8fd51 commit db487af
Show file tree
Hide file tree
Showing 29 changed files with 105 additions and 90 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ log/
TAGS
cabal-dev
perse.conf
cache/
6 changes: 3 additions & 3 deletions perse.cabal → ircbrowse.cabal
@@ -1,4 +1,4 @@
name: perse
name: ircbrowse
version: 0.1.0.0
synopsis: IRC channel analysis.
license: BSD3
Expand All @@ -9,7 +9,7 @@ category: Web
build-type: Simple
cabal-version: >=1.8

executable perse
executable ircbrowse
main-is: Main.hs
ghc-options: -threaded -O2
hs-source-dirs: src
Expand All @@ -33,7 +33,7 @@ executable perse
bytestring,
filepath

executable perse-import-from-tunes
executable ircbrowse-import-from-tunes
main-is: ImportTunes.hs
ghc-options: -threaded -O2
hs-source-dirs: src
Expand Down
14 changes: 14 additions & 0 deletions ircbrowse.conf
@@ -0,0 +1,14 @@
[POSTGRESQL]
host = 127.0.0.1
port = 5432
user = ircbrowse
pass = ircbrowse
db = ircbrowse

[WEB]
domain = ircbrowse
cache = cache

[ADDRESSES]
admin = chrisdone@gmail.com
site_addy = noreply@ircbrowse-irc.org
14 changes: 14 additions & 0 deletions ircbrowse.sample.conf
@@ -0,0 +1,14 @@
[POSTGRESQL]
host = 127.0.0.1
port = 5432
user = ircbrowse
pass = ircbrowse
db = ircbrowse

[WEB]
domain = ircbrowse
cache = /tmp/ircbrowse-cache

[ADDRESSES]
admin = chrisdone@gmail.com
site_addy = noreply@ircbrowse-irc.org
14 changes: 0 additions & 14 deletions perse.sample.conf

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/server-restart
@@ -1,16 +1,16 @@
#!/bin/bash

echo "Restarting server ..."
killall perse -q
killall ircbrowse -q

while true
do
if ps -C perse > /dev/null
if ps -C ircbrowse > /dev/null
then
echo Waiting...;
else
break;
fi
done

dist/build/perse/perse perse.conf 1>/dev/null 2>/dev/null & disown
dist/build/ircbrowse/ircbrowse ircbrowse.conf 1>/dev/null 2>/dev/null & disown
8 changes: 4 additions & 4 deletions src/ImportTunes.hs
Expand Up @@ -6,10 +6,10 @@

module Main where

import Perse.Types
import Perse.Config
import Perse.Tunes
import Perse.Model.Migrations
import Ircbrowse.Types
import Ircbrowse.Config
import Ircbrowse.Tunes
import Ircbrowse.Model.Migrations

import Control.Concurrent
import Control.Monad
Expand Down
2 changes: 1 addition & 1 deletion src/Perse/Blaze.hs → src/Ircbrowse/Blaze.hs
@@ -1,4 +1,4 @@
module Perse.Blaze
module Ircbrowse.Blaze
(module Text.Blaze.Extra
,module Text.Blaze.Html5
,module Text.Blaze.Html5.Attributes
Expand Down
4 changes: 2 additions & 2 deletions src/Perse/Config.hs → src/Ircbrowse/Config.hs
Expand Up @@ -2,9 +2,9 @@

-- | Load the configuration file.

module Perse.Config (getConfig) where
module Ircbrowse.Config (getConfig) where

import Perse.Types
import Ircbrowse.Types

import Data.ConfigFile
import Database.PostgreSQL.Simple (ConnectInfo(..))
Expand Down
18 changes: 9 additions & 9 deletions src/Perse/Controllers.hs → src/Ircbrowse/Controllers.hs
@@ -1,15 +1,15 @@
{-# LANGUAGE OverloadedStrings #-}

module Perse.Controllers where
module Ircbrowse.Controllers where

import Perse.Controllers.Cache
import Perse.Data
import Perse.Model.Stats
import Perse.Model.Events
import Perse.Monads
import Perse.Types
import Perse.View.Browse as V
import Perse.View.Overview as V
import Ircbrowse.Controllers.Cache
import Ircbrowse.Data
import Ircbrowse.Model.Stats
import Ircbrowse.Model.Events
import Ircbrowse.Monads
import Ircbrowse.Types
import Ircbrowse.View.Browse as V
import Ircbrowse.View.Overview as V

import Data.ByteString (ByteString)
import Snap.App
Expand Down
Expand Up @@ -2,19 +2,19 @@

-- | HTML caching.

module Perse.Controllers.Cache
module Ircbrowse.Controllers.Cache
(cache
,cacheIf
,resetCache
,clearCache
,resetCacheModel)
where

import Perse.Blaze
import Perse.Data
import Perse.Monads
import Perse.System
import Perse.Types
import Ircbrowse.Blaze
import Ircbrowse.Data
import Ircbrowse.Monads
import Ircbrowse.System
import Ircbrowse.Types

import Data.Text.Lazy (Text)
import qualified Data.Text.Lazy.IO as T
Expand Down
2 changes: 1 addition & 1 deletion src/Perse/Data.hs → src/Ircbrowse/Data.hs
@@ -1,4 +1,4 @@
module Perse.Data
module Ircbrowse.Data
(module Data.List
,module Data.Time
,module Data.Maybe
Expand Down
6 changes: 3 additions & 3 deletions src/Perse/Model/Events.hs → src/Ircbrowse/Model/Events.hs
@@ -1,7 +1,7 @@
module Perse.Model.Events where
module Ircbrowse.Model.Events where

import Perse.Types
import Perse.Data
import Ircbrowse.Types
import Ircbrowse.Data

import Data.Char
import Snap.App
Expand Down
5 changes: 5 additions & 0 deletions src/Ircbrowse/Model/Import.hs
@@ -0,0 +1,5 @@
-- | Import a log into the database.

module Ircbrowse.Model.Import where

import Ircbrowse.Types
Expand Up @@ -2,7 +2,7 @@

-- | The server's database migrations.

module Perse.Model.Migrations where
module Ircbrowse.Model.Migrations where

import Snap.App

Expand Down
4 changes: 2 additions & 2 deletions src/Perse/Model/Stats.hs → src/Ircbrowse/Model/Stats.hs
@@ -1,6 +1,6 @@
module Perse.Model.Stats where
module Ircbrowse.Model.Stats where

import Perse.Types
import Ircbrowse.Types

import Data.Maybe
import Snap.App
Expand Down
2 changes: 1 addition & 1 deletion src/Perse/Monads.hs → src/Ircbrowse/Monads.hs
@@ -1,4 +1,4 @@
module Perse.Monads
module Ircbrowse.Monads
(module Control.Monad
,module Control.Monad.Trans
,module Control.Monad.Reader
Expand Down
2 changes: 1 addition & 1 deletion src/Perse/Prelude.hs → src/Ircbrowse/Prelude.hs
@@ -1,4 +1,4 @@
module Perse.Prelude
module Ircbrowse.Prelude
(module Prelude)
where

Expand Down
12 changes: 6 additions & 6 deletions src/Perse/Server.hs → src/Ircbrowse/Server.hs
Expand Up @@ -3,13 +3,13 @@

-- | The web server.

module Perse.Server where
module Ircbrowse.Server where

import Perse.Config
import Perse.Types
import Perse.Controllers.Cache
import Perse.Model.Migrations
import qualified Perse.Controllers as C
import Ircbrowse.Config
import Ircbrowse.Types
import Ircbrowse.Controllers.Cache
import Ircbrowse.Model.Migrations
import qualified Ircbrowse.Controllers as C

import Database.PostgreSQL.Base (newPool)
import Database.PostgreSQL.Simple (Pool)
Expand Down
2 changes: 1 addition & 1 deletion src/Perse/System.hs → src/Ircbrowse/System.hs
@@ -1,4 +1,4 @@
module Perse.System
module Ircbrowse.System
(module System.Directory
,module System.Locale)
where
Expand Down
4 changes: 2 additions & 2 deletions src/Perse/Tunes.hs → src/Ircbrowse/Tunes.hs
@@ -1,8 +1,8 @@
-- | Downloading logs from tunes.org.

module Perse.Tunes where
module Ircbrowse.Tunes where

import Perse.Types
import Ircbrowse.Types

import Data.ByteString
import Data.Maybe
Expand Down
6 changes: 3 additions & 3 deletions src/Perse/Types.hs → src/Ircbrowse/Types.hs
@@ -1,14 +1,14 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}

module Perse.Types where
module Ircbrowse.Types where

import Data.Text
import Database.PostgreSQL.Simple (ConnectInfo)
import Database.PostgreSQL.Simple.QueryResults (QueryResults(..))
import Network.Mail.Mime (Address)
import Perse.Data
import Perse.Monads
import Ircbrowse.Data
import Ircbrowse.Monads
import Snap.App.Types

-- | Site-wide configuration.
Expand Down
13 changes: 13 additions & 0 deletions src/Ircbrowse/View.hs
@@ -0,0 +1,13 @@
module Ircbrowse.View
(module Ircbrowse.Blaze
,module Ircbrowse.Data
,module Ircbrowse.Monads
,module Ircbrowse.Prelude
,module Ircbrowse.Types)
where

import Ircbrowse.Blaze
import Ircbrowse.Data
import Ircbrowse.Monads
import Ircbrowse.Prelude
import Ircbrowse.Types
6 changes: 3 additions & 3 deletions src/Perse/View/Browse.hs → src/Ircbrowse/View/Browse.hs
Expand Up @@ -4,10 +4,10 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS -fno-warn-unused-do-bind -fno-warn-type-defaults #-}

module Perse.View.Browse where
module Ircbrowse.View.Browse where

import Perse.View
import Perse.View.Template
import Ircbrowse.View
import Ircbrowse.View.Template

import Data.Text (Text)
import Network.URI
Expand Down
6 changes: 3 additions & 3 deletions src/Perse/View/Overview.hs → src/Ircbrowse/View/Overview.hs
Expand Up @@ -2,10 +2,10 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS -fno-warn-unused-do-bind -fno-warn-type-defaults #-}

module Perse.View.Overview where
module Ircbrowse.View.Overview where

import Perse.View
import Perse.View.Template
import Ircbrowse.View
import Ircbrowse.View.Template

overview :: Maybe String -> Maybe String -> Range -> Stats -> Html
overview network channel range stats = do
Expand Down
4 changes: 2 additions & 2 deletions src/Perse/View/Template.hs → src/Ircbrowse/View/Template.hs
@@ -1,9 +1,9 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}

module Perse.View.Template where
module Ircbrowse.View.Template where

import Perse.View
import Ircbrowse.View

template name inner = do
html $ do
Expand Down
2 changes: 1 addition & 1 deletion src/Main.hs
Expand Up @@ -2,7 +2,7 @@

module Main where

import Perse.Server
import Ircbrowse.Server

-- | Main entry point.
main :: IO ()
Expand Down
5 changes: 0 additions & 5 deletions src/Perse/Model/Import.hs

This file was deleted.

13 changes: 0 additions & 13 deletions src/Perse/View.hs

This file was deleted.

0 comments on commit db487af

Please sign in to comment.