Changeset 828fba4 in adblock2privoxy for adblock2privoxy


Ignore:
Timestamp:
Jan 1, 2015 7:05:45 PM (5 years ago)
Author:
zubr <a@…>
Branches:
master
Children:
b4685e7
Parents:
6bfb8d3
Message:

New PRM spec generation

Location:
adblock2privoxy
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • adblock2privoxy/README.rst

    r6bfb8d3 r828fba4  
    95951. Install privoxy. Optionally setup it as transparent proxy 
    9696 
    97 2. Change privoxy config file: Add following lines 
     972. Change privoxy config file. Add following lines:: 
    9898 
    9999    actionsfile ab2p.system.action 
  • adblock2privoxy/adblock2privoxy.cabal

    r6bfb8d3 r828fba4  
    11name:                adblock2privoxy 
    22version:             1.3.0 
    3 cabal-version:       >= 1.6 
     3cabal-version:       >= 1.10 
    44build-type:          Simple 
     5tested-with:         GHC==7.8.3 
    56author:              Alexey Zubritsky <adblock2privoxy@zubr.me> 
    67data-files:           
     
    4849  hs-source-dirs:  src 
    4950  main-is:         Main.hs 
     51  default-language: Haskell2010 
     52  default-extensions: 
     53                   RankNTypes,  
     54                   ScopedTypeVariables,  
     55                   FlexibleInstances, 
     56                   GeneralizedNewtypeDeriving 
    5057  build-depends:    
    5158                   base >= 4 && < 5, 
  • adblock2privoxy/man/man1/adblock2privoxy.1

    r6bfb8d3 r828fba4  
    1 .TH "ADBLOCK2PRIVOXY" "1" "2014\-12\-31" "adblock2privoxy 1.3.0" "General Commands Manual" 
     1.TH "ADBLOCK2PRIVOXY" "1" "2015\-01\-01" "adblock2privoxy 1.3.0" "General Commands Manual" 
    22.SH ADBLOCK2PRIVOXY 
    33.PP 
     
    140140Optionally setup it as transparent proxy 
    141141.IP "2." 3 
    142 Change privoxy config file: Add following lines 
     142Change privoxy config file. 
     143Add following lines: 
    143144.RS 4 
    144 .RS 
    145 .PP 
    146 actionsfile ab2p.system.action actionsfile ab2p.action filterfile 
    147 ab2p.system.filter filterfile ab2p.filter 
    148 .RE 
     145.IP 
     146.nf 
     147\f[C] 
     148actionsfile\ ab2p.system.action 
     149actionsfile\ ab2p.action 
     150filterfile\ ab2p.system.filter 
     151filterfile\ ab2p.filter 
     152\f[] 
     153.fi 
    149154.RE 
    150155.IP "3." 3 
  • adblock2privoxy/src/Main.hs

    r6bfb8d3 r828fba4  
    7070 
    7171getResponse :: String -> IO String 
    72 getResponse url = withSocketsDo $ unpack . decodeUtf8 <$> simpleHttp url 
     72getResponse url = do 
     73        putStrLn $ "load " ++ url ++ "..." 
     74        withSocketsDo $ unpack . decodeUtf8 <$> simpleHttp url 
    7375 
    7476processSources :: String -> String -> String -> [SourceInfo]-> IO () 
     
    8183        urlBlock privoxyDir infoText parsed' 
    8284        writeTemplateFiles privoxyDir 
     85        putStrLn $ "Run 'adblock2privoxy " ++ taskFile ++ "' every 1-2 days to process data updates" 
    8386        where  
    8487        parseSource sourceInfo = do 
     
    8689                url = _url sourceInfo 
    8790                loader = if isURI url then getResponse else readFile 
    88             putStrLn $ "parse " ++ url 
     91            putStrLn $ "process " ++ url 
    8992            text <- loader url 
    9093            now <- getCurrentTime 
     
    104107        (Options printVersion privoxyDir webDir taskFile forced, urls) <- parseOptions args 
    105108        let acton 
    106                 | printVersion = putStrLn $ "adblock2privoxy version " ++ (showVersion version) 
     109                | printVersion = putStrLn $ "adblock2privoxy version " ++ showVersion version 
    107110                | not . null $ urls  
    108111                   =    processSources privoxyDir webDir taskFile (makeInfo <$> urls) 
  • adblock2privoxy/src/ParsecExt.hs

    r6bfb8d3 r828fba4  
    1 {-# LANGUAGE RankNTypes, ScopedTypeVariables, FlexibleInstances #-} 
    21module ParsecExt ( 
    32    CasesParser, 
     
    7170                            (mapRWST.mapStateT) lookAhead $ casesParser acc' next 
    7271                            lift (put st) 
    73                 when (not.null $ input) $ casesParser acc' parsers                                       
     72                unless (null input) $ casesParser acc' parsers                                       
    7473                                         
    7574------------------------------------------------------------------------------------------------ 
  • adblock2privoxy/src/Statistics.hs

    r6bfb8d3 r828fba4  
    1 {-# LANGUAGE OverloadedStrings #-} 
    21module Statistics ( 
    32        collectStat 
  • adblock2privoxy/src/Utils.hs

    r6bfb8d3 r828fba4  
    1 {-# LANGUAGE GeneralizedNewtypeDeriving #-} 
    21module Utils ( 
    32Struct2 (..), 
Note: See TracChangeset for help on using the changeset viewer.