From 0e4810dcfb132bf276a282e25b8523a4009ae08b Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 17 Mar 2019 18:14:32 +0100 Subject: rename blog dir --- .../00_pandoc_colors/index.md | 20 ---- .../00_pandoc_colors/index_breezedark.html | 117 --------------------- .../00_pandoc_colors/index_espresso.html | 113 -------------------- .../00_pandoc_colors/index_haddock.html | 109 ------------------- .../00_pandoc_colors/index_kate.html | 117 --------------------- .../00_pandoc_colors/index_monochrome.html | 96 ----------------- .../00_pandoc_colors/index_pygments.html | 114 -------------------- .../00_pandoc_colors/index_tango.html | 113 -------------------- .../00_pandoc_colors/index_zenburn.html | 113 -------------------- .../00200_Estatico-Page-Maker/index.md | 63 ----------- 10 files changed, 975 deletions(-) delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index.md delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_breezedark.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_espresso.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_haddock.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_kate.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_monochrome.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_pygments.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_tango.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_zenburn.html delete mode 100644 080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md (limited to '080_blog/00040_Haskell/00200_Estatico-Page-Maker') diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index.md b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index.md deleted file mode 100644 index 5060081..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# Pandoc Color Themes - -Color-themes for syntax-highlighting obtained from Pandoc. -E.g. To get the pygments theme you need to have some source-code embedded -in your markdown and run: - - stack exec pandoc -- -s file.md --highlight-style pygments - -Then you can extract the css from the resulting standalone html file. -Here you can find my extracted html files for reference: - -* [breezedark](index_breezedark.html) -* [espresso](index_espresso.html) -* [haddock](index_haddock.html) -* [kate](index_kate.html) -* [monochrome](index_monochrome.html) -* [pygments](index_pygments.html) -* [tango](index_tango.html) -* [zenburn](index_zenburn.html) - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_breezedark.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_breezedark.html deleted file mode 100644 index 6b89b97..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_breezedark.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_espresso.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_espresso.html deleted file mode 100644 index 6b0d627..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_espresso.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_haddock.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_haddock.html deleted file mode 100644 index 5c5af29..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_haddock.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_kate.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_kate.html deleted file mode 100644 index 03aa0c6..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_kate.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_monochrome.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_monochrome.html deleted file mode 100644 index 60c229d..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_monochrome.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_pygments.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_pygments.html deleted file mode 100644 index e637f29..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_pygments.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_tango.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_tango.html deleted file mode 100644 index f76564b..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_tango.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_zenburn.html b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_zenburn.html deleted file mode 100644 index f186f69..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/00_pandoc_colors/index_zenburn.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - index - - - - - -
import Data.Array.Base(unsafeAt)
-import Data.Bits(shiftL,shiftR,(.&.))
-import Foreign.Ptr (plusPtr)
-import Foreign.Storable (peek, poke)
-import Foreign.ForeignPtr (withForeignPtr)
-import System.IO.Unsafe (unsafePerformIO)
-
--- |Perform base64 encoding of data from standard input
-main :: IO()
-main = BL.getContents>>=BL.putStr.BL.fromChunks.map encode64.reChunk.BL.toChunks
-
--- |Base64 index table 
-tab64 :: UArray Word32 Word8
-tab64 = array (0,63) $ zip [0..] $ map (BI.c2w) $ 
-        ['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']
-
--- |Encodes 3 octets into 4 sextets
-enc64 :: (Word8,Word8,Word8)->(Word8,Word8,Word8,Word8)
-enc64 (b1,b2,b3) = (t 3,t 2,t 1,t 0)
-    where t x   = tab64 `unsafeAt` (n `shiftR` (x*6) .&. 63)
-          f b n = fromIntegral b `shiftL` n
-          n     = f b1 16 + f b2 8 + f b3 0
-
--- |Transforms list of ByteStrings to a new list of ByteStrings with 
--- lengths guaranteed to be multiples of 3 (excepting the last one)
--- Assumes that all input ByteStrings (excepting the last one) have 
--- at least a length of 3.
-reChunk :: [BS.ByteString] -> [BS.ByteString]
-reChunk (y:[]) = [y]
-reChunk (y:z:zs) = let c = BS.length y `mod` 3 
-                    in BS.append y (BS.take 3 z):(reChunk $ (BS.drop 3 z):zs)
- - diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md deleted file mode 100644 index a66c99c..0000000 --- a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md +++ /dev/null @@ -1,63 +0,0 @@ - April 2018 -# estático - static website generator - -A few weeks ago I decided to switch my website from a well known PHP -driven CMS solution, to a light and static set of HTML pages. - -And so I wrote ... a simple static website generator in **Haskell**. -Of course I know that there are plenty of these out there, still I wanted -my very own masturbatory solution. - -I use **pandoc** et al. for most of the work anyway. - -## Features - -* **No** Database -* Generate HTML from **Markdown** with **pandoc** -* **Highlight** source-code with **pandoc** -* Embed data **fetched** from the web with **http-conduit** -* Embed **screen-casts** with **asciinema** -* Embed Latex formulas with **MathJx** -* Scale Images with **ImageMagick** -* Generate MP4 from OGG **Videos** with **ffmpeg** - -## Try It -You can find the most recent version following the links below. -Build it with _stack_ or use the docker images. - -* -* -* - -## Pandoc Themes - -Here I put together the themes available for syntax-highlighting, extracted -from **pandoc**: [./pandoc\_colors](./pandoc_colors) - -## Example Website - -This very website is a real-world example making -use of estático. You can find it's sources here: - -* - -## Example Usage (Docker) - -__NOTE: make sure DIR\_OUT exists and is a free directory__ - -You can use the example websites inside the examples/ directory for a start. - -Inside the input directory (e.g. ./examples/example01/) run something along this lines: - - DIR_IN=`pwd` - DIR_OUT=/mnt/yourwebsiteroot - HTML_ROOT=https://www.example.com - SUDO=sudo - IMAGE=migueldirty/estatico - ${SUDO} docker run --rm -v${DIR_IN}:/in:ro -v${DIR_OUT}:/out:rw ${IMAGE} /in /out ${HTML_ROOT} - -Or if you want to test it locally use some local DIR\_OUT and HTML\_ROOT instead: - - DIR_OUT=/home/miguel/testpage - HTML_ROOT=/home/miguel/testpage - -- cgit v1.2.3