Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
software-project-WS25
Github Team
Commits
2648491a
Unverified
Commit
2648491a
authored
Oct 29, 2025
by
Noé Lopez
Browse files
Add Document class
parent
ed3ed60d
Changes
1
Hide whitespace changes
Inline
Side-by-side
document.py
0 → 100644
View file @
2648491a
class
Document
:
def
__init__
(
self
)
->
None
:
self
.
name
=
""
self
.
title
=
""
self
.
main_content
=
""
self
.
attributes
=
{}
def
__repr__
(
self
)
->
str
:
return
f
"<Document
{
self
.
name
!r}
{
self
.
title
!r}
>"
def
set_name
(
self
,
name
):
self
.
name
=
name
def
set_title
(
self
,
title
):
self
.
title
=
title
def
set_main_content
(
self
,
main_content
):
self
.
main_content
=
main_content
def
set_attributes
(
self
,
attributes
):
self
.
attributes
=
attributes
def
set_attribute
(
self
,
key
,
value
):
self
.
attributes
[
key
]
=
value
def
get_name
(
self
):
return
self
.
name
def
get_title
(
self
):
return
self
.
title
def
get_main_content
(
self
):
return
self
.
main_content
def
get_attributes
(
self
):
return
self
.
attributes
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment