gdritter repos fountain / ecf7b1c
Switched to non-Pandoc-centric format with a corresponding renaming Getty Ritter 4 years ago
3 changed file(s) with 73 addition(s) and 23 deletion(s). Collapse all Expand all
1 module Text.Fountain.Types where
2
3 import Data.HashMap.Strict (HashMap)
4 import Data.Text (Text)
5 import qualified Data.Text as T
6
7 data Doc = Doc
8 { ftTitle :: Maybe Title
9 , ftContent :: [Element]
10 } deriving (Eq, Read, Show)
11
12 data Title = Title { unFtTitle :: HashMap String Markup }
13 deriving (Eq, Read, Show)
14
15 type SceneNumber = Int
16
17 type Markup = [Inline]
18
19 data Inline
20 = IStr Text
21 | IEmph Markup
22 | IStrong Markup
23 | IUnderline Markup
24 deriving (Eq, Read, Show)
25
26 data Element
27 = ElSceneHeading Markup SceneNumber
28 | ElDialogue DialogueElement
29 | ElTransition Markup
30 | ElLyric Markup
31 | ElAction Markup Bool
32 | ElCentered Markup
33 deriving (Eq, Read, Show)
34
35 type DialogueText = [DialogueElement]
36
37 data DialogueElement = DialogueElement
38 { deCharacter :: Markup
39 , deParenthetical :: Maybe Markup
40 , deDialogue :: Markup
41 , deConcurrent :: Maybe DialogueElement
42 } deriving (Eq, Read, Show)
43
44 data FromFountain t = FromFountain
45 { fromScene :: Markup -> SceneNumber -> [t]
46 , fromDialogue :: DialogueText -> [t]
47 , fromLyric :: Markup -> [t]
48 , fromTransition :: Markup -> [t]
49 , fromAction :: Inline -> [t]
50 }
1 name: pandoc-fountain
2 version: 0.0.0
3 author: Getty Ritter <gdritter@galois.com>
4 maintainer: Getty Ritter <gdritter@galois.com>
5 license: BSD3
6 license-file: LICENSE
7 -- Synopsis:
8 -- Description:
9 cabal-version: >= 1.10
10 build-type: Simple
11 extra-source-files: README.md, ChangeLog.md
12
13 library
14 default-language: Haskell2010
15 ghc-options: -Wall
16 exposed-modules: Text.Fountain.Types
17 build-depends: base >= 4 && < 5
18 , text
19 , unordered-containers
20
21 source-repository head
22 type: git
23 location: git@github.com:aisamanra/fountain.git
+0
-23
pandoc-fountain.cabal less more
1 name: pandoc-fountain
2 version: 0.0.0
3 author: Getty Ritter <gdritter@galois.com>
4 maintainer: Getty Ritter <gdritter@galois.com>
5 license: BSD3
6 license-file: LICENSE
7 -- Synopsis:
8 -- Description:
9 cabal-version: >= 1.10
10 build-type: Simple
11 extra-source-files: README.md, ChangeLog.md
12
13 library
14 default-language: Haskell2010
15 hs-source-dirs: src
16 ghc-options: -Wall
17 exposed-modules: Text.Pandoc.Fountain
18 other-modules: Text.Pandoc.Fountain.Types
19 build-depends: base >= 4 && < 5, pandoc
20
21 source-repository head
22 type: git
23 -- Location: