|
|
|
@ -18,6 +18,16 @@ open DataServices
|
|
|
|
|
open WetPancake |
|
|
|
|
open System |
|
|
|
|
|
|
|
|
|
// Template Files |
|
|
|
|
[<Literal>] |
|
|
|
|
let DesktopClock = __SOURCE_DIRECTORY__ + @"\TextFiles\desktop-clock-info.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let ConsoleWaterworks = __SOURCE_DIRECTORY__ + @"\TextFiles\console-waterworks-announcement.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let WordGenerator = __SOURCE_DIRECTORY__ + @"\TextFiles\word-generator.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let TestPost = __SOURCE_DIRECTORY__ + @"\TextFiles\test-post.txt" |
|
|
|
|
|
|
|
|
|
// System Services |
|
|
|
|
let ss_number = PickRandomNumber 10 |
|
|
|
|
let ss_item = |
|
|
|
@ -91,18 +101,16 @@ let dp_sentencesException =
|
|
|
|
|
SentencesIsValid 0 // enter a number here |
|
|
|
|
|> ignore |
|
|
|
|
"No exception thrown" |
|
|
|
|
with :? ArgumentException as ex -> |
|
|
|
|
ex.Message |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(* Functions to include: |
|
|
|
|
===================== |
|
|
|
|
1.) GibberishLevelIsValid |
|
|
|
|
2.) SentencesIsValid |
|
|
|
|
3.) FilePathIsValid |
|
|
|
|
*) |
|
|
|
|
with :? ArgumentException as ex -> ex.Message |
|
|
|
|
let dp_filePathIsValidException = |
|
|
|
|
let invalidPath = "C:/notvalid/test.txt" |
|
|
|
|
let invalidFileType = "C:/notvalid/test.doc" |
|
|
|
|
// Template file paths by the open & load declarations |
|
|
|
|
try |
|
|
|
|
FilePathIsValid TestPost // enter filepath here |
|
|
|
|
|> ignore |
|
|
|
|
"No exception thrown" |
|
|
|
|
with :? ArgumentException as ex -> ex.Message |
|
|
|
|
|
|
|
|
|
// Data Structuring |
|
|
|
|
let ds_map = Map.empty |
|
|
|
@ -146,15 +154,6 @@ printfn "Text: %A" dss_sentences
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Product Services (Pancake) |
|
|
|
|
[<Literal>] |
|
|
|
|
let DesktopClock = __SOURCE_DIRECTORY__ + @"\TextFiles\desktop-clock-info.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let ConsoleWaterworks = __SOURCE_DIRECTORY__ + @"\TextFiles\console-waterworks-announcement.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let WordGenerator = __SOURCE_DIRECTORY__ + @"\TextFiles\word-generator.txt" |
|
|
|
|
[<Literal>] |
|
|
|
|
let TestPost = __SOURCE_DIRECTORY__ + @"\TextFiles\test-post.txt" |
|
|
|
|
|
|
|
|
|
let ps_result1 = Pancake.RequestRandomTextAsync() |
|
|
|
|
let ps_result2 = Pancake.RequestTextAsync 5 10 |
|
|
|
|
let ps_result3 = Pancake.RequestTextFromFileAsync 3 10 DesktopClock |
|
|
|
|