Skip to content

Commit

Permalink
Restructured project
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRauls committed Oct 13, 2021
1 parent 0383c0c commit 6f62203
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion feta.nimble
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion setup.nim → feta/setup.nims
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -41,4 +41,5 @@ proc installEmail() =
echo file
else:
echo userDataLocation & " does not exist. Continuing installation."

installEmail()
23 changes: 12 additions & 11 deletions feta/spreadsheets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6f62203

Please sign in to comment.