-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneral_format.py
30 lines (20 loc) · 1007 Bytes
/
general_format.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from datetime_format import datetime_management
from category_format import category_management
from author_title_format import title_author_management
from default_settings import *
def general_management(note_list):
atrributes_list=[]
for note in return_lines(note_list)[:-1]:
#Category substring and handling + bool bookmark
_type=note[1].split('|')[0]
category, temp_bool = category_management(note_type, _type)
#Datetime substring
dt=note[1].split('|')[-1]
datetime_instance=datetime_management(dt)
#Title and author
title,author=title_author_management(note[0])
#message
message=note[2]
#Getting everything together
atrributes_list.append([title, datetime_instance, category, author, message, temp_bool])
return atrributes_list