./db post utility. This file is used for creating all posts on this site. It uses a basic sql program that uses the same API as the posts page, this program takes in a single parameter that being a sql statement, which is then run and outputted to the terminal../db simply uses the sql utility to modify the database in a user-api method. This simplifies the way in which posts can be created. The db utility now allows for chaining of commands. The commands available are:
| Command | Parameters | Description |
|---|---|---|
create |
None | Creates a new blank/default post |
remove |
int:ID | Removes a post given its ID |
edit |
int:ID, str:param | Edits a given parameter of a post, posts have three parameters that being the title, body and date |
latest |
str:param | Same as the edit command, but this one does not take in an ID as it assumes the ID of the LATEST post. |
list |
None | Simply lists the posts along with their IDs. |
./db create latest title latest body