Timetable_Python-SQLitecrud

Timetable in Python

Python 3.9

USAGE

Clone the repo from github

git clone https://github.com/CodeFalcon363/Timetable_Python-SQLitecrud

cd Timetable_Python-SQLitecrud

main.py

COMMANDS

SYNTAX

[comand] [-item] [-key] [value]
The second argument after the comand will be assummed to be the item key when used with
show, update or delete comand

[-item]

This is the item which the comand [comand] would run for (e.g. Users, Courses etc)
It can be any of the following

-u for User (staffs, students, admins)
-c for Course
-m for Module
-r for Rooms
-s for Session

[-key]

This is a reference of the data associated with the item (e.g. -ue for user email)
It can be any fo the following depending on the item used with

-u

-ue for user email
-ui for user ID
-un for user names
-up for user password
-ua for user account type (e.g. -ua staff)
-uri for user room ID
-urs for user room slug

-c

-cs for course slug
-ci for course ID
-cn for course name
-css for course semester slug
-csi for course semester ID

-m

-ms for module slug
-mi for course ID
-mn for module name
-mcl for module course slug
-mci for module course ID

-r

-rs for room slug
-ri for room ID
-rn for room name

-s

-ss for session slug
-si for session ID
-st for session tutor
-sd for session day
-sb for session begining time
-se for session end time
-sr for session room
-sc for session category

[comand]

Can be any of below

show

Display specific item data (no analysis)

Examples

show -u -ue example@mail.com
Above comand will display data for user with email address example@mail.com
show -c -ci 3
Above comand will display data for course with id 3 in the dabase table

report

Display analitical overview ot specific item

Examples

report -u -ue example@mail.com
Above comand will display report for user with email exmaple@mail.com
This report includes, % of attended modules/sessions hours for students and workload for staffs

update

Update specific item's data
Please remember the first argument is used to refer to item (-ue to update user data using email)

Examples

update -u -ue example@mail1.com -un Anthony Oise -ua staff
Above comand will update names and account type of user with email address example1.com

create

Create new item

Examples

create -u -ue example@mail.com -un Anthony Oise -ua student -urs r_1 -up password
Above comand will create a new student account if no user with example@mail.com email address is found!
Keep close look at how we passed other arguments, all arguments are optional except -ue (email address)
If a value is missing and required, you will be prompted to enter it

delete

Delete an item

Examples

delete -u -ue example@mail.com -force
This example will delete a user with email address example@mail.com
If the -force argument is not passed, you will be prompted to confirm user deletion along with the user's data (e.g. names)

assign

Assign an item to other item (e.g. module to course or course to semester)

Examples

assign -u -c -ue example@mail.com -cs web_dev
Above example will assign the course with slug web_dev to user with email address example@mail.com
assign -m -mi 3 -cs sem_ce2
Above comand will add module with id 3 to course with slug sem_c2

HELP

use -h to display this docs on your terminal
or use -h comand to display help/doc about specific comand

Examples

-h create
Will display possible usage for comand create