dobutokO-poetry 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+25/−5 lines, 3 filesdep +mmsyn3dep ~mmsyn6ukrPVP ok
version bump matches the API change (PVP)
Dependencies added: mmsyn3
Dependency ranges changed: mmsyn6ukr
API changes (from Hackage documentation)
+ Main: nameAndRec :: String -> IO ()
Files
- ChangeLog.md +5/−0
- Main.hs +17/−2
- dobutokO-poetry.cabal +3/−3
ChangeLog.md view
@@ -3,3 +3,8 @@ ## 0.1.0.0 -- 2020-06-01 * First version. Released on an unsuspecting world.++## 0.2.0.0 -- 2020-06-01++* Second version. Fixed issue with the wrong convertion to the WAV sound file. Added mmsyn3 as an explicit dependency (it was implicit) and changed the +number of the minimum mmsyn6ukr package version.
Main.hs view
@@ -10,9 +10,13 @@ module Main where +import System.IO import DobutokO.Poetry (uniq10Poetical4,uniq10Poetical5) import System.Environment (getArgs)-import Melodics.Executable (workWithInput)+import Melodics.Executable (recFileName, printInfoF, rawToSoundFile)+import Melodics.Ukrainian (appendS16LEFile, convertToProperUkrainian)+import EndOfExe (showE)+import Data.Maybe (fromJust,isJust) -- | The first command line argument specifies which function to run. If given \"4\" it runs 'uniq10Poetical4', otherwise 'uniq10Poetical5'. The next 7 -- are treated as the Ukrainian words to be ordered accordingly to the norm. For more information, please, refer to the documentation for the abovementioned @@ -27,4 +31,15 @@ if arg0 == "4" then uniq10Poetical4 word1s else uniq10Poetical5 word1s putStrLn "What string would you like to record as a Ukrainian text sounding by mmsyn6ukr package? " str <- getLine- workWithInput str 1+ nameAndRec str++-- | Is used to specify a name for the recorded sounding for the selected text and to record it.+nameAndRec :: String -> IO ()+nameAndRec str = do + name <- recFileName+ withBinaryFile (name ++ ".raw") AppendMode (appendS16LEFile (convertToProperUkrainian str))+ putStrLn "The .raw file was created by the program. If there is SoX installed then it will run further. "+ let ts = showE "sox" + if isJust ts+ then rawToSoundFile "" name (fromJust ts)+ else printInfoF
dobutokO-poetry.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: dobutokO-poetry-version: 0.1.0.0+version: 0.2.0.0 synopsis: Helps to order the 7 or less Ukrainian words to obtain somewhat suitable for poetry or music text description: Helps to order the 7 or less Ukrainian words (or their concatenations) to obtain somewhat suitable for poetry or music text. @@ -21,7 +21,7 @@ exposed-modules: DobutokO.Poetry, Main -- other-modules: other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, mmsyn7s >=0.6.7 && <1, mmsyn6ukr >=0.7.2 && <1+ build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, mmsyn3 >= 0.1.5 && <1, mmsyn7s >=0.6.7 && <1, mmsyn6ukr >=0.7.3 && <1 -- hs-source-dirs: default-language: Haskell2010 @@ -29,6 +29,6 @@ main-is: Main.hs other-modules: DobutokO.Poetry other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, mmsyn7s >=0.6.7 && <1, mmsyn6ukr >=0.7.2 && <1+ build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, mmsyn3 >= 0.1.5 && <1, mmsyn7s >=0.6.7 && <1, mmsyn6ukr >=0.7.3 && <1 -- hs-source-dirs: default-language: Haskell2010