packages feed

gvti (empty) → 0.1.0.0

raw patch · 8 files changed

+620/−0 lines, 8 filesdep +basedep +directorydep +mmsyn3setup-changed

Dependencies added: base, directory, mmsyn3, process

Files

+ ChangeLog.md view
@@ -0,0 +1,91 @@+# Revision history for mmsyn4++## 0.1.0.0 -- 2019-10-17++* First version. Released on an unsuspecting world.++## 0.1.1.0 -- 2019-10-18++* First version revised A. Some documentation and .cabal file improvements.++## 0.1.1.1 -- 2019-10-18++* First version revised B. Some minor documentation and .cabal file improvements.++## 0.1.2.0 -- 2019-10-22++* First version revised C. Changed the output files scheme. Avoided a pipe redirection in the terminal.+ Some minor documentation and .cabal file improvements.++## 0.1.3.0 -- 2019-12-16++* First version revised D. Added the possibility to avoid using the at-sign in the resulting visualization file. Added the possibility to choose+different splines schemes according to the GraphViz documentation.++## 0.1.4.0 -- 2019-12-17++* First version revised E. Added filtering for not to duplicate records in the+.gv file. Some minor documentation improvement.++## 0.1.5.0 -- 2019-12-24++* First version revised F. Changed dependency bounds so that it can now be compiled for GHC 8.8.1.++## 0.1.6.0 -- 2020-01-31++* First version revised G. Changed README to README.markdown++## 0.2.0.0 -- 2020-05-14++* Second version. Changed the bounds for dependencies so that now also GHC 8.10* series is supported. Changed a module structur so that now it has+additional module MMSyn4 with almost all functions in it (they mostly are not exported because of their specific usage). Added possibility+to specify another basic file to work with except 1.csv. Added a possibility to specify an output graphics format. Some code and+documentation improvements.++## 0.3.0.0 -- 2020-05-16++* Third version. The code is almost fully rewritten. Fixed issues with wrong processing and formatting of the file. Fixed issue with double+printed prompt message in the MMSyn4 module. Changed the exported and imported functions and dependencies for modules. Added the possibility+to specify three additional command line arguments to specify the command to be executed to create the visualization file and its format.+So, now the program behavior can be basically controlled with command line arguments.++## 0.3.1.0 -- 2020-05-16++* Third version revised A. Added CPP pre-processor to support compilation also for GHC-7.8* series.++## 0.3.1.1 -- 2020-05-16++* Third version revised B. Trying the same as above with more specific syntaxis and LANGUAGE CPP pragma.++## 0.4.0.0 -- 2020-05-19++* Fourth version. Added the new command line arguments "-y", "-s...", "-b..." to specify whether to remove the '@' markers, which option is used to splines+GraphViz functionality and what is the basic name for the created files respectively. For this changed the functions. Some documentation additions+respectively.++## 0.5.0.0 -- 2020-10-29++* Fifth version. Changed the inlining policies. Some minor code improvements. Boundaries changes for dependencies.++## 0.6.0.0 -- 2020-12-15++* Sixth version. Switched to the GHC.Arr module from the base package. Removed vector and mmsyn2 as dependencies.+Some code improvements.++## 0.6.1.0 -- 2020-12-15++* Sixth version revised A. Removed also mmsyn2-array as a dependency.++## 0.6.2.0 -- 2020-12-16++* Sixth version revised B. Fixed issue with incorrectly defined fold that has led to incorrect some results.++## 0.6.3.0 -- 2020-12-16++* Sixth version revised C. Fixed another issue with incorrectly defined fold that has led to incorrect some results.++## 0.6.4.0 -- 2022-08-13++* Sixth version revised D. Updated the dependencies so  that the newer versions of the dependencies+are supported.+
+ Formatting.hs view
@@ -0,0 +1,45 @@+{-# OPtIONS_HADDOCK show-extensions #-}+{-# LANGUAGE BangPatterns #-}++{-|+Module      : Formatting+Description : GraphViz Tabular Interface formatting functionality to be used with the @gvti -g@.+Copyright   : (c) OleksandrZhabenko, 2017-2022+License     : MIT+Maintainer  : olexandr543@yahoo.com+Stability   : Experimental++-}++module Formatting where++import Data.List+import Text.Read (readMaybe)+import Data.Maybe (fromMaybe)+import Data.Char (isDigit)++formatBStr :: Int -> Char -> String -> String+formatBStr n x xs +  | n > 0 = (iterate (x:) xs) !! n+  | otherwise = xs++formatEStr :: Int -> Char -> String -> String+formatEStr m x xs +  | m > 0 = xs `mappend` replicate m x+  | otherwise = xs++formatBothStr :: Int -> Int -> Char -> String -> String+formatBothStr m n x = formatBStr m x . formatEStr n x+{-# INLINE formatBothStr  #-}++formatLines :: Char -> [String] -> [String]+formatLines x xss = map (\(xs,n,m) -> formatBothStr n m x $ xs) . zip3 ws j2s $ ms+  where (!js,!rs) = unzip . map (span isDigit) $ xss+        ws = map (dropWhile (== ',')) rs+        ll1s = map (length . filter (== x)) $ xss+        !j2s = map (\wws -> fromMaybe 0 (readMaybe wws::Maybe Int)) js+	lls = zipWith (+) ll1s j2s+        !mx = maximum lls+	!ms = zipWith (\x k -> mx - x - k) ll1s j2s+{-# INLINE formatLines #-}+
+ GVTI.hs view
@@ -0,0 +1,249 @@+{-# OPtIONS_HADDOCK show-extensions #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE BangPatterns #-}++{-|+Module      : GVTI+Description : GraphViz Tabular Interface main conversion functionality.+Copyright   : (c) OleksandrZhabenko, 2017-2022+License     : MIT+Maintainer  : olexandr543@yahoo.com+Stability   : Experimental++A program @gvti@ converts a specially formated @.csv@ file with a colon as a field separator obtained from the electronic table+into a visualized by GraphViz graph in the one of the supported by GraphViz graphics format. The proper GraphViz installation is required.+This is the main functionality module.+-}++module GVTI (getFormat,process2) where++#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=710+/* code that applies only to GHC 7.10.* and higher versions */+import GHC.Base (mconcat)+#endif+#endif+import Data.List (nub)+import System.Info (os)+import System.CPUTime (getCPUTime)+import System.Process (callCommand)+import GHC.Arr+import EndOfExe (showE)+import Data.Maybe (isJust,fromJust)+import Data.Foldable (foldr)++#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__==708+/* code that applies only to GHC 7.8.* */+mconcat = concat+#endif+#endif++isSep :: Char -> Bool+isSep = (== ':')++-- | Returns @True@ if OS is Windows.+isWindows :: Bool+isWindows = take 5 os == "mingw"+{-# INLINE isWindows #-}++divideString :: (Char -> Bool) -> String -> [String]+divideString p xs+ | null xs = []+ | otherwise = let (zs,ys) = break p xs in zs:(if null ys then [""] else divideString p (drop 1 ys))++isEscapeChar :: Char -> Bool+isEscapeChar x = x == '\n' || x == '\r'++dropEmptyLines :: [String] -> [String]+dropEmptyLines [] = []+dropEmptyLines (ys:yss)+ | let ts = dropWhile isSep ys in all isEscapeChar ts || null ts = dropEmptyLines yss+ | otherwise = ys:dropEmptyLines yss++cells :: String -> Array Int [String]+cells xs = amap (divideString isSep) . listArray (0,l) . dropEmptyLines . map (\rs -> if drop (length rs - 1) rs == "\r" then init rs else rs) $ yss+  where (yss,l) = linesL1 xs+{-# INLINE cells #-}++-- | Inspired by: <https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.OldList.html#lines>+linesL :: ([String],Int) -> String -> ([String],Int)+linesL (xs,y) "" = (xs,y)+linesL (xs,y) s  = linesL (l:xs,y + 1) (case s' of { [] -> [] ; _:s'' -> s'' })+  where (l, s') = break (== '\n') s++-- | Inspired by: <https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.OldList.html#lines>+linesL1 :: String -> ([String],Int)+linesL1 = linesL ([],-1)++processCells :: String -> Array Int [String] -> String+processCells xs arr = makeRecordGv xs . convertElemsToStringGv . filterNeeded . changeNeededCells $ arr+{-# INLINE processCells #-}++processCellsG :: String -> String -> String+processCellsG xs = processCells xs . cells+{-# INLINE processCellsG #-}++-- | Do not change the lengths of element lists+changeNeededCells :: Array Int [String] -> Array Int [String]+changeNeededCells arr = listArray (bounds arr) . map (\(i, e) -> changeLine i e arr) . assocs $ arr+{-# INLINE changeNeededCells #-}++-- | Changes every line by changing (if needed) one empty String to the needed one non-empty. It is necessary for this to find the parent cell for the+-- line in the previous elements of the 'Array'. The contents of the cell (if exist) are substituted instead of the empty 'String' in the line being+-- processed. Afterwards, drops all the preceding empty strings in the line. The length of the line now is not constant.+changeLine :: Int -> [String] -> Array Int [String] -> [String]+changeLine i yss arr =+  let !n = length . takeWhile null $ yss+      !xs = parentCellContents n i arr in if null xs then drop n yss else xs:(drop n yss)+{-# NOINLINE changeLine #-}++parentCellContents :: Int -> Int -> Array Int [String] -> String+parentCellContents n i arr+ | n == 0 = []+ | ll == 0 = []+ | otherwise = (\(x, _, _) -> x) . foldr f ([], 0, ll) . amap (!! (n - 1)) $ arr+     where ll = numElements arr - i - 1+           f e (e0, m, k)+             | m < k && not (null e) = (e, m + 1, k)+             | otherwise = (e0, m + 1, k)++-- | Change the lengths of element lists by dropping the last empty strings in every element.+filterNeeded :: Array Int [String] -> Array Int [String]+filterNeeded = amap (takeWhile (not . null))+{-# INLINE filterNeeded #-}++-- | Makes conversion for every line+convertElemsToStringGv :: Array Int [String] -> (Array Int String, String)+convertElemsToStringGv arr = (amap convertLineToStrGv arr, findAndMakeFilledWithClr arr)++convertLineToStrGv :: [String] -> String+convertLineToStrGv xss = "\"" ++ (let ys = concatMap (++"\"->\"") xss in take (length ys - 3) ys) ++ endOfLineGv+{-# INLINE convertLineToStrGv #-}++endOfLineGv :: String+endOfLineGv | isWindows = "\r\n"+            | otherwise = "\n"+{-# INLINE endOfLineGv #-}++findAndMakeFilledWithClr :: Array Int [String] -> String+findAndMakeFilledWithClr = concatMap (('\"':) .+  (++ "\" [style=filled, fillcolor=\"#ffffba\"];" ++ endOfLineGv)) . nub . mconcat . elems . amap lineWithAtSign+{-# INLINE findAndMakeFilledWithClr #-}++-- | In every list (representing a line) returns only those strings that begin with at-sign.+lineWithAtSign :: [String] -> [String]+lineWithAtSign = filter beginsWithAtSign+{-# INLINE lineWithAtSign #-}++beginsWithAtSign :: String -> Bool+beginsWithAtSign xs = if take 1 xs == "@" then True else take 2 xs == "\"@"+{-# INLINE beginsWithAtSign #-}++-- | Makes all needed additions and synthesizes into a single 'String' ready to be recorded to the .gv file.+makeRecordGv :: String -> (Array Int String, String) -> String+makeRecordGv xs (arr1,str2) = mconcat ["strict digraph 1 {", endOfLineGv, "overlap=false", endOfLineGv, "splines=",+  case xs of { "0" -> "false" ; "1" -> "true" ; "2" -> "ortho" ; "3" -> "polyline" ; ~vvv -> "true" }, endOfLineGv,+    mconcat (elems arr1 `mappend` [str2]), "}", endOfLineGv]+{-# INLINE makeRecordGv #-}++-- | Processes the given text (the first 'String' argument). The second one is used to get a name of the command to be+-- executed to obtain a visualization file. The third argument is used for the 'getFormat'. The fourth argument is the+-- basic name for the created files (without prefixes and extensions), the fifth one is an option for GraphVize splines+-- functionality. The sixth argument is used to specify whether to remove at-signs from the created files.+process2 :: String -> String -> String -> String -> String -> String -> IO ()+process2 text xxs yys bnames splines remAts+  | length text > 0 = do+      ts <- getCPUTime+      [bnames1,splines1] <- proc2Params2 bnames splines+      if remAts == "y"+        then do+          let ys = filter (/='@') . processCellsG splines1 $ text in writeFile (show ts ++ "." ++ bnames1 ++ ".gv") ys+          putStrLn "The visualization will be created without the at-sign."+          processFile 'n' ts bnames1 xxs yys+        else do+          let ys = processCellsG splines1 text in writeFile ("at." ++ show ts ++ "." ++ bnames1 ++ ".gv") ys+          putStrLn "The visualization will be created with the at-sign preserved."+          processFile 'a' ts bnames1 xxs yys+  | otherwise = error "Empty text to be processed! "++procCtrl :: Int -> IO String+procCtrl 1 = putStrLn "Please, input the basic name of the visualization file!" >> getLine+procCtrl 2 = do+  putStrLn "Please, specify the splines mode for GraphViz (see the documentation for GraphViz)"+  putStrLn "0 -- for \"splines=false\""+  putStrLn "1 -- for \"splines=true\""+  putStrLn "2 -- for \"splines=ortho\""+  putStrLn "3 -- for \"splines=polyline\""+  putStrLn "The default one is \"splines=true\""+  getLine+procCtrl _ = putStrLn "Would you like to remove all \'@\' signs from the visualization file?" >> getLine++processFile :: Char -> Integer -> String -> String -> String -> IO ()+processFile w t zs xxs yys = do+  if all (isJust . showE) ["fdp","twopi","circo","neato","sfdp","dot","patchwork","osage"]+    then processFile1 w t zs xxs yys+    else error "MMSyn4.processFile: Please, install the GraphViz so that its executables are in the directories mentioned in the variable PATH!"+{-# INLINE processFile #-}++processFile1 :: Char -> Integer -> String -> String -> String -> IO ()+processFile1 w t zs xxs yys = do+  [vs,spec] <- proc2Params xxs yys+  let u = take 1 vs+  if null u || u == "\n" || u == "\x0000"+    then error "MMSyn4.processFile1: Please, specify the needed character."+    else do+      let temp = fromJust . showE . (\x -> case x of { "c" -> "circo" ; "d" -> "dot" ; "f" -> "fdp" ; "n" -> "neato" ;+           "o" ->"osage" ; "p" -> "patchwork" ; "s" -> "sfdp" ; "t" -> "twopi" ; ~vv -> "sfdp" })+          q = getFormat spec+      callCommand $ temp u ++ (if w == 'n' then " -T" ++ q ++ " " else " -T" ++ q ++ " at.") ++ show t ++ "." ++ zs ++ ".gv -O "++proc2Params :: String -> String -> IO [String]+proc2Params xxs yys+ | null xxs = if null yys then mapM getFormat1 [1,2] else do { vs <- getFormat1 1 ; return [vs,yys] }+ | null yys = do { spec <- getFormat1 2 ; return [xxs,spec] }+ | otherwise = return [xxs,yys]+{-# INLINE proc2Params #-}++specFormatFile :: IO String+specFormatFile = do+  putStrLn "Please, specify the GraphViz output format for the file: "+  mapM_ printFormF ["do", "xd", "ps", "pd", "sv", "sz", "fi", "pn", "gi", "jp", "je", "js", "im", "cm"]+  putStrLn "otherwise there will be used the default -Tsvg"+  getLine+{-# INLINE specFormatFile #-}++proc2Params2 :: String -> String -> IO [String]+proc2Params2 bnames splines+ | null bnames = if null splines then mapM procCtrl [1,2] else do { bnames1 <- procCtrl 1 ; return [bnames1,splines] }+ | null splines = do { splines1 <- procCtrl 2 ; return [bnames,splines1] }+ | otherwise = return [bnames,splines]+{-# INLINE proc2Params2 #-}++getFormat1 :: Int -> IO String+getFormat1 1 = do+  putStrLn "Please, specify the GraphViz command: "+  mapM_ printGraphFilter ["d","f","t","c","n","s","p","o"]+  putStrLn "otherwise there will be used the default sfdp"+  getLine+getFormat1 _ = specFormatFile+{-# INLINE getFormat1 #-}++-- | For the given argument (usually of two characters) return the full form of the file format to be generated by GraphViz and @mmsyn4@. The default one+-- is \"svg\".+getFormat :: String -> String+getFormat xs = case xs of { "cm" -> "cmapx" ; "do" -> "dot" ; "fi" -> "fig" ; "gi" -> "gif" ; "im" -> "imap" ;+  "je" -> "jpeg" ; "jp" -> "jpg" ; "js" -> "json" ; "pd" -> "pdf" ; "pn" -> "png" ; "ps" -> "ps" ; "sv" -> "svg" ; "sz" -> "svgz" ; "xd" -> "xdot" ; ~vvv -> "svg" }+{-# INLINE getFormat #-}++printFormF :: String -> IO ()+printFormF xs = putStrLn $ show xs ++ " -- for -T" ++ case xs of { "cm" -> "cmapx" ; "do" -> "dot" ; "fi" -> "fig" ;+   "gi" -> "gif" ; "im" -> "imap" ; "je" -> "jpeg" ; "jp" -> "jpg" ; "js" -> "json" ; "pd" -> "pdf" ; "pn" -> "png" ;+      "ps" -> "ps" ; "sv" -> "svg" ; "sz" -> "svgz" ; "xd" -> "xdot" ; ~vvv -> "svg" } ++ "\""+{-# INLINE printFormF #-}++printGraphFilter :: String -> IO ()+printGraphFilter xs = putStrLn $ show (take 1 xs) ++ " -- for " ++ case take 1 xs of { "c" -> "circo" ; "d" -> "dot" ;+  "f" -> "fdp" ; "n" -> "neato" ; "o" -> "osage" ; "p" -> "patchwork" ; "s" -> "sfdp" ; "t" -> "twopi" ;+    ~vvv ->  "sfdp" }+{-# INLINE printGraphFilter #-}
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2019-2022 OleksandrZhabenko++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Main.hs view
@@ -0,0 +1,79 @@+{-|+Module      : Main+Description : The "glue" between spreadsheets and GraphViz+Copyright   : (c) OleksandrZhabenko, 2017-2022+License     : MIT+Maintainer  : olexandr543@yahoo.com+Stability   : Experimental++A program @mmsyn4@ converts a specially formated @.csv@ file with a colon as a field separator obtained from the electronic table +into a visualized by GraphViz graph in the one of the supported by GraphViz format. The proper GraphViz installation is required.+-}++module Main where++import GVTI (process2)+import System.Environment (getArgs)+import System.Directory+import Data.List (isPrefixOf)+import Data.Char (isLetter, isDigit) +import Formatting (formatLines)++{-| Usage with only the first command line++1. After installation the executable gvti is created. Afterwards, it is used to process files. So, open an office spreadsheet program, +e. g. LibreOffice Calc.+2. Begin to enter the text in the cells. You can use Unicode characters. No quotation marks should be used, instead use some +special delimiter except '@' sign.+3. Do not use colons, instead when needed switch to the nearest cell to the right. +4. To make a text visually highlighted (yellowish), start the cell with an ’@’ sign.+5. Lines in the table create different chains in the resulting graph. To produce an arrow to the text in the cell, enter it in the next cell +in the row to the right.+6. To make several arrows from the cell, switch to the next cell to the right for this parent one (the cell that will be a parent +for several other cells), enter needed new texts there and in the located below cells.+7. Usually, you can search the needed text with Ctrl+F if needed.+8. Empty lines in the table do not influence the resulting visualization. Above each line, except the first one, there must be at least one filled cell. +It must be located above the text on the new line or even further to the right above. Otherwise, the program will produce no reasonably useful output.+9. After entering all the text, export the sheet as a \"\*.csv\" file using colons (\':\') as separator in the working directory. Otherwise, +the program won’t work.+10. Run the appropriate executable gvti in the terminal or from the command line while being in the directory with the created .csv file. +Specify as a command line argument its name. While executing a program enter a word name of the .csv file to be saved. DO use alphanumeric symbols +and dashes if needed. Then specify the needed visualization scheme by specifying the appropriate character in the terminal and the format of the +resulting visualization file (refer to GraphViz documentation for the default list of formats).+11. Your first visualization is then created. +12. Save the spreadsheet document as a spreadsheet file (if you worked with spreadsheets, otherwise this step can be omitted). +13. Repeat the steps from 2 to 12 as needed to produce more visualizations. +14. Afterwards, you have a list of graphics files, a list of .gv files -- source files for Graphviz -- and a saved spreadsheet file. +Then you can use the produced visualizations for some other documents.++Usage of the next command line arguments after the first one++Supports the following further command lines arguments (given after the first one -- see above):++-c... -- dots are instead of one letter to specify the first character of the GraphViz command (e. g. \'n\' -- for \'neato\')++-f... -- dots are instead of two letters to specify the format (according to the 'getFormat') of the GraphViz command (e. g. \'jp\' -- for \'jpg\')++They can be given in any combinations (if needed) or omitted. In the latter one case the program will prompt you the needed information.+-}+main :: IO ()+main = do +  args00 <- getArgs+  let args = filter (/= "-g") args00+      arg0 = concat . take 1 $ args+      arggs = drop 1 args+      xxs = concatMap (take 1 . drop 2) . filter ("-c" `isPrefixOf`) $ arggs+      yys = concatMap (take 2 . drop 2) . filter ("-f" `isPrefixOf`) $ arggs+      bnames = concatMap (drop 2) . filter ("-b" `isPrefixOf`) $ arggs+      splines = concatMap (take 1 . drop 2) . filter ("-s" `isPrefixOf`) $ arggs+      remAts = concatMap (take 1 . drop 1) . filter ("-y" `isPrefixOf`) $ arggs+      gvti = any (== "-g") args00+  exI <- doesFileExist arg0+  if exI +    then do +      text2 <- readFile arg0+      let txt +           | gvti = unlines  . formatLines ':' . filter (any (\x -> isLetter x || isDigit x)) . lines $ text2+	   | otherwise =  unlines . filter (any (\x -> isLetter x || isDigit x)) . lines $ text2+      process2 txt xxs yys bnames splines remAts+    else putStrLn "No file specified exists in the current directory! "  
+ README.markdown view
@@ -0,0 +1,101 @@+             +             ***** Usage *****+             -----------------++1. After installation the executable gvti is created.+ Afterwards, it is used to process files. So, open an+  office spreadsheet program, e. g.+   [LibreOffice Calc](https://libreoffice.org).+  +2. Begin to enter the text in the cells. You can use+ Unicode characters. No quotation marks should be used,+  instead use some special delimiter except '@' sign.+  +3. Do not use colons, instead when needed switch to the+ nearest cell to the right.+ +4. To make a text visually highlighted (yellowish), start+ the cell with an ’@’ sign.+ +5. Lines in the table create different chains in the+ resulting graph. To produce an arrow to the text in the+ cell, enter it in the next cell in the row to the right.+ +6. To make several arrows from the cell, switch to the+ next cell to the right for this parent one (the cell that+  will be a parent for several other cells), enter needed+   new texts there and in the located below cells.+   +7. Usually, you can search the needed text with Ctrl+F if+ needed.+ +8. Empty lines in the table do not influence the resulting+ visualization. Above each line, except the first one,+  there must be at least one filled cell. It must be+   located above the text on the new line or even further+    to the right above. Otherwise, the program will+     produce no reasonably useful output.+     +9. After entering all the text, export the sheet as a +  "*.csv" file using colons (':') as separator +    in the working directory. Otherwise, the program +      won’t work.+      +10. Run the appropriate executable gvti in the terminal +  or from the command line while being in the directory +    with the created .csv file. Specify as a command line +      argument its name. While executing a program enter +        a basic name of the file to be saved. DO use +          alphanumeric symbols and dashes if needed. +            Then specify the needed visualization scheme +              by specifying the appropriate character +                in the terminal and the format of the +                  resulting visualization file (refer to +                    GraphViz documentation for the default +                      list of formats). For more information, +                        see the +  [GraphViz documentation](https://www.graphviz.org/documentation/).+                +11. Your first visualization is then created.++12. Save the spreadsheet document as a spreadsheet file (if you +  worked with spreadsheets, otherwise this step can be omitted).++13. Repeat the steps from 2 to 12 as needed to produce+ more visualizations.+ +14. Afterwards, you have a list of graphics files, a list of .gv + files as source files for Graphviz, and a saved spreadsheet file. +   Then you can use the produced visualizations for some other +     documents.++    ***** Usage of the Next Command Line Arguments after the First One *****+    ------------------------------------------------------------------------++gvti executable supports the following further +command lines arguments (given after the first one -- see above):++-c... -- dots are instead of one letter to specify the first character +  of the GraphViz command (e. g. \'n\' -- for \'neato\')++-f... -- dots are instead of two letters to specify the format (according to +  the 'getFormat') of the GraphViz command (e. g. \'jp\' -- for \'jpg\')++Besides, supports the following further +command line arguments (additionally to the previous ones):++-b... -- dots are instead of the basic name for the created files (the +name without prefixes and extensions)++-s... -- dots are instead of one digit to specify the GraphViz splines +functionality. 0 -- for "splines=false"; 1 -- for "splines=true"; +2 -- for "splines=ortho"; 3 -- for "splines=polyline". The default +one is "splines=true".++-y -- (if present) means that the '@' signs will be removed from the created +files.++They can be given in any combinations (if needed) or omitted. In the latter +one case the program will prompt you the needed information (but this is +not the case for a separator, which must be specified in such a way to be +used instead).
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ gvti.cabal view
@@ -0,0 +1,33 @@+-- Initial gvti.cabal generated by cabal init.  For further+-- documentation, see http://haskell.org/cabal/users-guide/++name:                gvti+version:             0.1.0.0+synopsis:            GraphViz Tabular Interface+description:         Introduces a new file extension .gvti and is a special tabular or line-based GraphViz subset interface. Is a fork of the now deprecated mmsyn4 package.+homepage:            https://hackage.haskell.org/package/gvti+license:             MIT+license-file:        LICENSE+author:              OleksandrZhabenko+maintainer:          olexandr543@yahoo.com+copyright:           Oleksandr Zhabenko+category:            Graphics+build-type:          Simple+extra-source-files:  ChangeLog.md, README.markdown+cabal-version:       >=1.10++library+  exposed-modules:     GVTI, Formatting+  -- other-modules:+  other-extensions:    CPP, BangPatterns+  build-depends:       base >=4.7 && <5, directory >=1 && <2, process >=1.2 && <2, mmsyn3 ==0.1.6.0+  -- hs-source-dirs:+  default-language:    Haskell2010++executable gvti+  main-is:             Main.hs+  other-modules:       GVTI, Formatting+  other-extensions:    CPP, BangPatterns+  build-depends:       base >=4.7 && <5, directory >=1 && <2, process >=1.2 && <2, mmsyn3 ==0.1.6.0+  -- hs-source-dirs:+  default-language:    Haskell2010