add color to svg

This commit is contained in:
2024-10-19 16:36:47 -05:00
parent 9c33a61570
commit aebd25dc16
16 changed files with 318 additions and 142 deletions

View File

@@ -17,7 +17,7 @@ type Icon struct {
Width *int `json:"width,omitempty"`
}
// Define the Root struct to represent the entire JSON structure
// Root Define the Root struct to represent the entire JSON structure
type Root struct {
Prefix string `json:"prefix"`
Icons map[string]Icon `json:"icons"`
@@ -28,6 +28,9 @@ func main() {
testDbPath := os.Getenv("TEST_DB_PATH")
dbPath := os.Getenv("DB_PATH")
dbPaths := []string{testDbPath, dbPath}
//dbPath := "/Users/donov/Desktop/nkode.db"
//dbPaths := []string{dbPath}
outputStr := MakeSvgFiles()
for _, path := range dbPaths {
MakeTables(path)
@@ -152,59 +155,58 @@ PRAGMA journal_mode=WAL;
--PRAGMA cache_size = -16000; -- Increase cache size (16MB)PRAGMA
CREATE TABLE IF NOT EXISTS customer (
id TEXT NOT NULL PRIMARY KEY,
max_nkode_len INTEGER NOT NULL,
min_nkode_len INTEGER NOT NULL,
distinct_sets INTEGER NOT NULL,
distinct_attributes INTEGER NOT NULL,
lock_out INTEGER NOT NULL,
expiration INTEGER NOT NULL,
attribute_values BLOB NOT NULL,
set_values BLOB NOT NULL
-- created_at TEXT NOT NULL,
-- last_renew TEXT NOT NULL,
id TEXT NOT NULL PRIMARY KEY
,max_nkode_len INTEGER NOT NULL
,min_nkode_len INTEGER NOT NULL
,distinct_sets INTEGER NOT NULL
,distinct_attributes INTEGER NOT NULL
,lock_out INTEGER NOT NULL
,expiration INTEGER NOT NULL
,attribute_values BLOB NOT NULL
,set_values BLOB NOT NULL
,last_renew TEXT NOT NULL
,created_at TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS user (
id TEXT NOT NULL PRIMARY KEY,
username TEXT NOT NULL,
-- email TEXT NOT NULL,
-- first_name TEXT NOT NULL,
-- last_name TEXT NOT NULL,
renew INT NOT NULL,
refresh_token TEXT,
customer_id TEXT NOT NULL,
id TEXT NOT NULL PRIMARY KEY
,email TEXT NOT NULL
-- first_name TEXT NOT NULL
-- last_name TEXT NOT NULL
,renew INT NOT NULL
,refresh_token TEXT
,customer_id TEXT NOT NULL
-- Enciphered Passcode
code TEXT NOT NULL,
mask TEXT NOT NULL,
,code TEXT NOT NULL
,mask TEXT NOT NULL
-- Keypad Dimensions
attributes_per_key INT NOT NULL,
number_of_keys INT NOT NULL,
,attributes_per_key INT NOT NULL
,number_of_keys INT NOT NULL
-- User Keys
alpha_key BLOB NOT NULL,
set_key BLOB NOT NULL,
pass_key BLOB NOT NULL,
mask_key BLOB NOT NULL,
salt BLOB NOT NULL,
max_nkode_len INT NOT NULL,
,alpha_key BLOB NOT NULL
,set_key BLOB NOT NULL
,pass_key BLOB NOT NULL
,mask_key BLOB NOT NULL
,salt BLOB NOT NULL
,max_nkode_len INT NOT NULL
-- User Interface
idx_interface BLOB NOT NULL,
svg_id_interface BLOB NOT NULL,
,idx_interface BLOB NOT NULL
,svg_id_interface BLOB NOT NULL
-- created_at TEXT NOT NULL,
-- last_login TEXT NOT NULL,
,last_login TEXT NULL
,created_at TEXT
FOREIGN KEY (customer_id) REFERENCES customers(id),
UNIQUE(customer_id, username)
,FOREIGN KEY (customer_id) REFERENCES customer(id)
,UNIQUE(customer_id, email)
);
CREATE TABLE IF NOT EXISTS svg_icon (
id INTEGER PRIMARY KEY AUTOINCREMENT,
svg TEXT NOT NULL
id INTEGER PRIMARY KEY AUTOINCREMENT
,svg TEXT NOT NULL
);
`
_, err = db.Exec(createTable)