Adds the ability to index folder and re-populate the db
Misc: The arguments are now sorted alphabetically in the main funciton close #4
This commit is contained in:
parent
5863d5a58f
commit
d70f5398a3
3 changed files with 31 additions and 12 deletions
5
inc/init
5
inc/init
|
@ -20,6 +20,10 @@ initKnowledgeBase(){
|
|||
git -C "$dataDir" add .gitignore > "$output"
|
||||
git -C "$dataDir" commit -m "Knowledge base initialised" > output
|
||||
fi
|
||||
initDB
|
||||
}
|
||||
|
||||
initDB(){
|
||||
vecho "Creating Database"
|
||||
echo 'CREATE TABLE items
|
||||
(id integer primary key, filename text, title text, type text);
|
||||
|
@ -30,4 +34,3 @@ initKnowledgeBase(){
|
|||
sqlite3 "${sqliteFile}"
|
||||
necho -e "${GREEN}Initialised Knowledge base${NC}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue