diff --git a/feta.nimble b/feta.nimble index 38df3a9..9fe92dc 100644 --- a/feta.nimble +++ b/feta.nimble @@ -1,5 +1,5 @@ # Package -version = "0.0.12" +version = "0.0.13" author = "Florian Rauls" description = "A domain-specific language for general purpose office automation. The language is embedded in Nim and allows for quick and easy integration of different office software environments." license = "MIT" diff --git a/setup.nim b/feta/setup.nims similarity index 95% rename from setup.nim rename to feta/setup.nims index 6cd2635..660bb9e 100644 --- a/setup.nim +++ b/feta/setup.nims @@ -1,5 +1,5 @@ proc installEmail() = - var userDataLocation = "feta/files/userData.nim" # location of userData.nim + var userDataLocation = "files/userData.nim" # location of userData.nim if fileExists(userDataLocation): echo("\e[1;31m Warning: Your following answers will be saved as plain text!") var file = readFile(userDataLocation) # read file @@ -41,4 +41,5 @@ proc installEmail() = echo file else: echo userDataLocation & " does not exist. Continuing installation." + installEmail() \ No newline at end of file diff --git a/feta/spreadsheets.nim b/feta/spreadsheets.nim index c939bcc..c9cfd1f 100644 --- a/feta/spreadsheets.nim +++ b/feta/spreadsheets.nim @@ -26,8 +26,8 @@ type CellKind* = enum ## the different node types nkString, ## a cell with a string value nkEmpty ## an empty cell -#[ Implementation of the generic Cell class -which will be the center and target of most language features]# +## Implementation of the generic Cell class +## which will be the center and target of most language features type Cell * = ref object kind* : CellKind @@ -49,8 +49,8 @@ proc newCell*(value: Nil): Cell = result = Cell(kind: nkEmpty, strVal: "-") -#[ Implementation of the generic Row class -which will be the center and target of most language features]# +## Implementation of the generic Row class +## which will be the center and target of most language features type Row * = object ## Generic Row Class items* : seq[Cell] ## Holds a sequence of Cells @@ -70,8 +70,9 @@ proc getValues * (row : Row) : seq[string] = for v in row.items: result.add(v.strVal) -#[ Implementation of the generic SpreadSheet class -which will be the center and target of most language features]# + +## Implementation of the generic SpreadSheet class +## which will be the center and target of most language features] type SpreadSheet * = object ## SpreadSheet Object name* : string ## Name of SpreadSheet @@ -134,7 +135,6 @@ proc newSpreadSheet*(name: string, rows: seq[Row], header : Row): SpreadSheet = if len(header.items) > lonRow: lonRow = len(header.items) - #################this section happens to ensure readable debug screens#################### var candidates : seq[int] for row in rows: # search for longest row to ensure integrity @@ -507,8 +507,9 @@ proc colLen * (SpreadSheet : SpreadSheet) : int = proc `+=` * (SpreadSheet: var SpreadSheet, row : Row) = SpreadSheet.addRow(row) -# Atomic Action : Update Value Operator + proc `:=` * (cell : var Cell, newEntry : string) = + ## Atomic Action : Update Value Operator cell.strVal = newEntry # cell = newCell(newEntry) @@ -552,13 +553,13 @@ proc setNewPermissions * (sheet : var SpreadSheet, role : string, allow : seq[st if s notin allow: sheet.permissions[role][s] = false - -# Atomic Actions: Send Mail proc sendNewMail * (to : string, subject : string, content : string) = + ## Atomic Actions: Send Mail waitFor( mailFunc.sendNewMail(mailBot, to, "John Doe", subject, content) ) -# Atomic Actions: Send Mail with File + proc sendNewFile * (to : string, subject : string, content : string, file : string) = + ## Atomic Actions: Send Mail with File waitFor( mailFunc.sendNewFile(mailBot, to, "John Doe", subject, content, file) ) # Atomic Actions: Append Spreadsheet diff --git a/scenario1.nim b/tests/scenario1.nim similarity index 100% rename from scenario1.nim rename to tests/scenario1.nim diff --git a/scenario2.nim b/tests/scenario2.nim similarity index 100% rename from scenario2.nim rename to tests/scenario2.nim diff --git a/scenario3.nim b/tests/scenario3.nim similarity index 100% rename from scenario3.nim rename to tests/scenario3.nim