3 from parse_message_file
import *
5 # Initialize an empty list of services
8 # Add a new service with info
9 new_service
= add_service(services
, entry
=1, service_name
="Message Board", info
="A simple message board for communicating about anything. ^_^")
12 add_user(new_service
, user_id
=1, name
="Cool Dude 2k", handle
="@cooldude2k", location
="Somewhere", joined
="Jul 1, 2024", birthday
="Jul 1, 1987", bio
="I'm just a very cool dude! ^_^")
13 add_user(new_service
, user_id
=2, name
="Kazuki Suzuki", handle
="@kazuki.suzuki", location
="Anywhere", joined
="Jul 1, 2024", birthday
="Jun 1, 1987", bio
="Hello it's just me Kazuki. :P")
16 add_category(new_service
, kind
="Categories", category_type
="Category", category_level
="Main Category", category_id
=1, insub
=0, headline
="Game Maker 2k", description
="Just talk about anything.")
17 add_category(new_service
, kind
="Forums", category_type
="Forum", category_level
="Main Forum", category_id
=1, insub
=0, headline
="General Discussion", description
="Just talk about anything.")
20 add_message_thread(new_service
, thread_id
=1, title
="Hello, World!", category
="Game Maker 2k", forum
="General Discussion", thread_type
="Topic", state
="Pinned")
23 add_message_post(new_service
, thread_id
=1, author
="@kazuki.suzuki", time
="8:00 AM", date
="Jul 1, 2024", subtype
="Post", post_id
=1, nested
=0, message
="Hello, World! ^_^")
24 add_message_post(new_service
, thread_id
=1, author
="@cooldude2k", time
="10:00 AM", date
="Jul 1, 2024", subtype
="Reply", post_id
=2, nested
=1, message
="Why did you say 'Hello, World!' O_o")
25 add_message_post(new_service
, thread_id
=1, author
="@kazuki.suzuki", time
="12:00 PM", date
="Jul 1, 2024", subtype
="Reply", post_id
=3, nested
=2, message
="I don't know.\nI thought it would be cool. ^_^")
26 add_message_post(new_service
, thread_id
=1, author
="@cooldude2k", time
="2:00 PM", date
="Jul 1, 2024", subtype
="Reply", post_id
=4, nested
=3, message
="What ever dude! <_<")
29 another_service
= add_service(services
, entry
=2, service_name
="Another Board", info
="Another simple message board.")
31 # Display the services
32 display_services(services
)
35 remove_service(services
, entry
=1)
37 # Display the services again
38 display_services(services
)