mirror of https://gitlab.com/bashrc2/epicyon
Reading status screen
parent
935e213e9b
commit
00d69e31d2
12
daemon.py
12
daemon.py
|
@ -22826,6 +22826,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
curr_session, proxy_type):
|
||||
return 1
|
||||
return -1
|
||||
elif post_type in ('newreadingstatus'):
|
||||
if not fields.get('readingupdatetype'):
|
||||
print(post_type + ' no readingupdatetype')
|
||||
return -1
|
||||
if not fields.get('booktitle'):
|
||||
print(post_type + ' no booktitle')
|
||||
return -1
|
||||
if not fields.get('bookurl'):
|
||||
print(post_type + ' no bookurl')
|
||||
return -1
|
||||
# TODO reading status
|
||||
elif post_type in ('newshare', 'newwanted'):
|
||||
if not fields.get('itemQty'):
|
||||
print(post_type + ' no itemQty')
|
||||
|
@ -24326,6 +24337,7 @@ def run_daemon(no_of_books: int,
|
|||
'menuBookmarks': 'q',
|
||||
'menuShares': 'h',
|
||||
'menuWanted': 'w',
|
||||
'menuReadingStatus': '=',
|
||||
'menuBlogs': 'b',
|
||||
'menuNewswire': '#',
|
||||
'menuLinks': 'l',
|
||||
|
|
1
tests.py
1
tests.py
|
@ -8241,7 +8241,6 @@ def _test_book_link(base_dir: str):
|
|||
if os.path.isdir(base_dir):
|
||||
shutil.rmtree(base_dir, ignore_errors=False, onerror=None)
|
||||
os.mkdir(base_dir)
|
||||
reading_dir = base_dir + '/accounts/reading'
|
||||
|
||||
content = 'Not a link'
|
||||
result = get_book_link_from_content(content)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "يريد أن يقرأ",
|
||||
"finished reading": "قراءة الانتهاء",
|
||||
"Reading Status": "حالة القراءة",
|
||||
"Book reading updates": "تحديثات قراءة الكتب"
|
||||
"Book reading updates": "تحديثات قراءة الكتب",
|
||||
"want to read": "تريد أن تقرأ",
|
||||
"am reading": "أنا أقرأ",
|
||||
"Update type": "نوع التحديث",
|
||||
"add a rating": "إضافة تقييم",
|
||||
"Rating": "تقييم"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "পড়তে চায়",
|
||||
"finished reading": "পড়া শেষ",
|
||||
"Reading Status": "পড়ার অবস্থা",
|
||||
"Book reading updates": "বই পড়ার আপডেট"
|
||||
"Book reading updates": "বই পড়ার আপডেট",
|
||||
"want to read": "পড়তে চাই",
|
||||
"am reading": "পড়ছি",
|
||||
"Update type": "আপডেটের ধরন",
|
||||
"add a rating": "একটি রেটিং যোগ করুন",
|
||||
"Rating": "রেটিং"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "vol llegir",
|
||||
"finished reading": "acabat de llegir",
|
||||
"Reading Status": "Estat de lectura",
|
||||
"Book reading updates": "Actualitzacions de lectura de llibres"
|
||||
"Book reading updates": "Actualitzacions de lectura de llibres",
|
||||
"want to read": "volen llegir",
|
||||
"am reading": "estic llegint",
|
||||
"Update type": "Tipus d'actualització",
|
||||
"add a rating": "afegir una qualificació",
|
||||
"Rating": "Valoració"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "eisiau darllen",
|
||||
"finished reading": "gorffen darllen",
|
||||
"Reading Status": "Statws Darllen",
|
||||
"Book reading updates": "Diweddariadau darllen llyfrau"
|
||||
"Book reading updates": "Diweddariadau darllen llyfrau",
|
||||
"want to read": "eisiau darllen",
|
||||
"am reading": "rwy'n darllen",
|
||||
"Update type": "Math o ddiweddariad",
|
||||
"add a rating": "ychwanegu sgôr",
|
||||
"Rating": "Graddio"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "will lesen",
|
||||
"finished reading": "fertig gelesen",
|
||||
"Reading Status": "Lesestatus",
|
||||
"Book reading updates": "Aktualisierungen zum Lesen von Büchern"
|
||||
"Book reading updates": "Aktualisierungen zum Lesen von Büchern",
|
||||
"want to read": "möchte lesen",
|
||||
"am reading": "Ich lese",
|
||||
"Update type": "Update-Typ",
|
||||
"add a rating": "Fügen Sie eine Bewertung hinzu",
|
||||
"Rating": "Bewertung"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "θέλει να διαβάσει",
|
||||
"finished reading": "τελείωσε την ανάγνωση",
|
||||
"Reading Status": "Κατάσταση ανάγνωσης",
|
||||
"Book reading updates": "Ενημερώσεις για την ανάγνωση βιβλίων"
|
||||
"Book reading updates": "Ενημερώσεις για την ανάγνωση βιβλίων",
|
||||
"want to read": "θέλω να διαβάσω",
|
||||
"am reading": "διαβάζω",
|
||||
"Update type": "Τύπος ενημέρωσης",
|
||||
"add a rating": "προσθέστε μια βαθμολογία",
|
||||
"Rating": "Εκτίμηση"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "wants to read",
|
||||
"finished reading": "finished reading",
|
||||
"Reading Status": "Reading Status",
|
||||
"Book reading updates": "Book reading updates"
|
||||
"Book reading updates": "Book reading updates",
|
||||
"want to read": "want to read",
|
||||
"am reading": "am reading",
|
||||
"Update type": "Update type",
|
||||
"add a rating": "add a rating",
|
||||
"Rating": "Rating"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "quiere leer",
|
||||
"finished reading": "lectura terminada",
|
||||
"Reading Status": "Estado de lectura",
|
||||
"Book reading updates": "Actualizaciones de lectura de libros"
|
||||
"Book reading updates": "Actualizaciones de lectura de libros",
|
||||
"want to read": "Quiero leer",
|
||||
"am reading": "Estoy leyendo",
|
||||
"Update type": "Tipo de actualización",
|
||||
"add a rating": "agregar una calificación",
|
||||
"Rating": "Clasificación"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "می خواهد بخواند",
|
||||
"finished reading": "خواندن را تمام کرد",
|
||||
"Reading Status": "وضعیت خواندن",
|
||||
"Book reading updates": "به روز رسانی کتابخوانی"
|
||||
"Book reading updates": "به روز رسانی کتابخوانی",
|
||||
"want to read": "می خواهم بخوانم",
|
||||
"am reading": "دارم میخونم",
|
||||
"Update type": "نوع به روز رسانی",
|
||||
"add a rating": "امتیاز اضافه کنید",
|
||||
"Rating": "رتبه بندی"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "veut lire",
|
||||
"finished reading": "fini de lire",
|
||||
"Reading Status": "Statut de lecture",
|
||||
"Book reading updates": "Mises à jour de lecture de livres"
|
||||
"Book reading updates": "Mises à jour de lecture de livres",
|
||||
"want to read": "veux lire",
|
||||
"am reading": "Je suis en train de lire",
|
||||
"Update type": "Type de mise à jour",
|
||||
"add a rating": "ajouter une note",
|
||||
"Rating": "Notation"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "ag iarraidh a léamh",
|
||||
"finished reading": "léamh críochnaithe",
|
||||
"Reading Status": "Stádas Léitheoireachta",
|
||||
"Book reading updates": "Nuashonruithe le haghaidh léamh leabhair"
|
||||
"Book reading updates": "Nuashonruithe le haghaidh léamh leabhair",
|
||||
"want to read": "ag iarraidh a léamh",
|
||||
"am reading": "táim ag léamh",
|
||||
"Update type": "Cineál nuashonraithe",
|
||||
"add a rating": "cuir rátáil",
|
||||
"Rating": "Rátáil"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "רוצה לקרוא",
|
||||
"finished reading": "סיים לקרוא",
|
||||
"Reading Status": "סטטוס קריאה",
|
||||
"Book reading updates": "עדכוני קריאת ספרים"
|
||||
"Book reading updates": "עדכוני קריאת ספרים",
|
||||
"want to read": "רוצה לקרוא",
|
||||
"am reading": "אני קורא",
|
||||
"Update type": "סוג עדכון",
|
||||
"add a rating": "להוסיף דירוג",
|
||||
"Rating": "דֵרוּג"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "पढ़ना चाहता है",
|
||||
"finished reading": "पढ़ना समाप्त",
|
||||
"Reading Status": "पढ़ने की स्थिति",
|
||||
"Book reading updates": "पुस्तक पढ़ने के अपडेट"
|
||||
"Book reading updates": "पुस्तक पढ़ने के अपडेट",
|
||||
"want to read": "पढ़ने की इच्छा है",
|
||||
"am reading": "पढ़ रहा हूं",
|
||||
"Update type": "अद्यतन प्रकार",
|
||||
"add a rating": "एक रेटिंग जोड़ें",
|
||||
"Rating": "रेटिंग"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "vuole leggere",
|
||||
"finished reading": "finito di leggere",
|
||||
"Reading Status": "Stato di lettura",
|
||||
"Book reading updates": "Aggiornamenti sulla lettura dei libri"
|
||||
"Book reading updates": "Aggiornamenti sulla lettura dei libri",
|
||||
"want to read": "voler leggere",
|
||||
"am reading": "sto leggendo",
|
||||
"Update type": "Tipo di aggiornamento",
|
||||
"add a rating": "aggiungi una valutazione",
|
||||
"Rating": "Valutazione"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "読みたい",
|
||||
"finished reading": "読み終わった",
|
||||
"Reading Status": "ステータスの読み取り",
|
||||
"Book reading updates": "本の読書の更新情報"
|
||||
"Book reading updates": "本の読書の更新情報",
|
||||
"want to read": "読みたい",
|
||||
"am reading": "読んでいます",
|
||||
"Update type": "更新タイプ",
|
||||
"add a rating": "評価を追加する",
|
||||
"Rating": "評価"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "읽고 싶어",
|
||||
"finished reading": "다 읽었다",
|
||||
"Reading Status": "읽기 상태",
|
||||
"Book reading updates": "책읽기 업데이트"
|
||||
"Book reading updates": "책읽기 업데이트",
|
||||
"want to read": "읽고 싶다",
|
||||
"am reading": "읽고 있어요",
|
||||
"Update type": "업데이트 유형",
|
||||
"add a rating": "평점 추가",
|
||||
"Rating": "평가"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "dixwaze bixwîne",
|
||||
"finished reading": "xwendina xwe qedand",
|
||||
"Reading Status": "Rewşa xwendinê",
|
||||
"Book reading updates": "Nûvekirinên xwendina pirtûkê"
|
||||
"Book reading updates": "Nûvekirinên xwendina pirtûkê",
|
||||
"want to read": "dixwazin bixwînin",
|
||||
"am reading": "ez dixwînim",
|
||||
"Update type": "Cureyê nûve bike",
|
||||
"add a rating": "rêjeyek zêde bike",
|
||||
"Rating": "Rating"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "wil lezen",
|
||||
"finished reading": "klaar met lezen",
|
||||
"Reading Status": "Leesstatus",
|
||||
"Book reading updates": "Updates voor het lezen van boeken"
|
||||
"Book reading updates": "Updates voor het lezen van boeken",
|
||||
"want to read": "wil lezen",
|
||||
"am reading": "aan het lezen",
|
||||
"Update type": "Updatetype",
|
||||
"add a rating": "een beoordeling toevoegen",
|
||||
"Rating": "Beoordeling"
|
||||
}
|
||||
|
|
|
@ -643,5 +643,10 @@
|
|||
"wants to read": "wants to read",
|
||||
"finished reading": "finished reading",
|
||||
"Reading Status": "Reading Status",
|
||||
"Book reading updates": "Book reading updates"
|
||||
"Book reading updates": "Book reading updates",
|
||||
"want to read": "want to read",
|
||||
"am reading": "am reading",
|
||||
"Update type": "Update type",
|
||||
"add a rating": "add a rating",
|
||||
"Rating": "Rating"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "chce przeczytać",
|
||||
"finished reading": "skończyłem czytać",
|
||||
"Reading Status": "Stan czytania",
|
||||
"Book reading updates": "Aktualizacje dotyczące czytania książek"
|
||||
"Book reading updates": "Aktualizacje dotyczące czytania książek",
|
||||
"want to read": "chcę przeczytać",
|
||||
"am reading": "czytam",
|
||||
"Update type": "Typ aktualizacji",
|
||||
"add a rating": "dodaj ocenę",
|
||||
"Rating": "Ocena"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "quer ler",
|
||||
"finished reading": "terminei de ler",
|
||||
"Reading Status": "Status de leitura",
|
||||
"Book reading updates": "Atualizações de leitura de livros"
|
||||
"Book reading updates": "Atualizações de leitura de livros",
|
||||
"want to read": "quero ler",
|
||||
"am reading": "estou lendo",
|
||||
"Update type": "Tipo de atualização",
|
||||
"add a rating": "adicionar uma classificação",
|
||||
"Rating": "Avaliação"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "хочет прочитать",
|
||||
"finished reading": "закончил читать",
|
||||
"Reading Status": "Статус чтения",
|
||||
"Book reading updates": "Обновления для чтения книг"
|
||||
"Book reading updates": "Обновления для чтения книг",
|
||||
"want to read": "хочу почитать",
|
||||
"am reading": "читаю",
|
||||
"Update type": "Тип обновления",
|
||||
"add a rating": "добавить оценку",
|
||||
"Rating": "Рейтинг"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "anataka kusoma",
|
||||
"finished reading": "kumaliza kusoma",
|
||||
"Reading Status": "Hali ya Kusoma",
|
||||
"Book reading updates": "Sasisho za usomaji wa vitabu"
|
||||
"Book reading updates": "Sasisho za usomaji wa vitabu",
|
||||
"want to read": "kutaka kusoma",
|
||||
"am reading": "ninasoma",
|
||||
"Update type": "Aina ya sasisho",
|
||||
"add a rating": "ongeza ukadiriaji",
|
||||
"Rating": "Ukadiriaji"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "okumak istiyor",
|
||||
"finished reading": "okumayı bitirdim",
|
||||
"Reading Status": "Okuma Durumu",
|
||||
"Book reading updates": "Kitap okuma güncellemeleri"
|
||||
"Book reading updates": "Kitap okuma güncellemeleri",
|
||||
"want to read": "okumak istemek",
|
||||
"am reading": "Okuyorum",
|
||||
"Update type": "Güncelleme türü",
|
||||
"add a rating": "derecelendirme ekle",
|
||||
"Rating": "Değerlendirme"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "хоче читати",
|
||||
"finished reading": "закінчив читати",
|
||||
"Reading Status": "Статус читання",
|
||||
"Book reading updates": "Оновлення читання книг"
|
||||
"Book reading updates": "Оновлення читання книг",
|
||||
"want to read": "хочу читати",
|
||||
"am reading": "я читаю",
|
||||
"Update type": "Тип оновлення",
|
||||
"add a rating": "додати оцінку",
|
||||
"Rating": "Рейтинг"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "וויל לייענען",
|
||||
"finished reading": "פאַרטיק לייענען",
|
||||
"Reading Status": "לייענען סטאַטוס",
|
||||
"Book reading updates": "דערהייַנטיקונגען פֿאַר לייענען ביכער"
|
||||
"Book reading updates": "דערהייַנטיקונגען פֿאַר לייענען ביכער",
|
||||
"want to read": "ווילן צו לייענען",
|
||||
"am reading": "בין לייענען",
|
||||
"Update type": "דערהייַנטיקן טיפּ",
|
||||
"add a rating": "לייגן אַ ראַנג",
|
||||
"Rating": "שאַץ"
|
||||
}
|
||||
|
|
|
@ -647,5 +647,10 @@
|
|||
"wants to read": "想读书",
|
||||
"finished reading": "读完",
|
||||
"Reading Status": "阅读状态",
|
||||
"Book reading updates": "书籍阅读更新"
|
||||
"Book reading updates": "书籍阅读更新",
|
||||
"want to read": "想读",
|
||||
"am reading": "正在阅读",
|
||||
"Update type": "更新类型",
|
||||
"add a rating": "添加评级",
|
||||
"Rating": "评分"
|
||||
}
|
||||
|
|
2
utils.py
2
utils.py
|
@ -4085,7 +4085,7 @@ def get_new_post_endpoints() -> []:
|
|||
return (
|
||||
'newpost', 'newblog', 'newunlisted', 'newfollowers', 'newdm',
|
||||
'newreminder', 'newreport', 'newquestion', 'newshare', 'newwanted',
|
||||
'editblogpost'
|
||||
'editblogpost', 'newreadingstatus'
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -810,6 +810,39 @@ def html_new_post(edit_post_params: {},
|
|||
extra_fields += ' </select>\n'
|
||||
|
||||
extra_fields += '</div>\n'
|
||||
elif path.endswith('/newreadingstatus'):
|
||||
scope_icon = 'scope_readingstatus.png'
|
||||
scope_description = translate['Reading Status']
|
||||
endpoint = 'newreadingstatus'
|
||||
|
||||
extra_fields = '<div class="container">\n'
|
||||
cat_str = translate['Update type']
|
||||
extra_fields += '<label class="labels">' + cat_str + '</label><br>\n'
|
||||
|
||||
extra_fields += ' <select id="readingUpdateTypeDropdown" ' + \
|
||||
'name="readingupdatetype" class="theme">\n'
|
||||
extra_fields += ' <option value="readingupdatewant">' + \
|
||||
translate['want to read'] + '</option>\n'
|
||||
extra_fields += ' <option value="readingupdateread" ' + \
|
||||
'selected="selected">' + \
|
||||
translate['am reading'] + '</option>\n'
|
||||
extra_fields += ' <option value="readingupdatefinished">' + \
|
||||
translate['finished reading'] + '</option>\n'
|
||||
extra_fields += ' <option value="readingupdatefinished">' + \
|
||||
translate['add a rating'] + '</option>\n'
|
||||
extra_fields += ' </select><br>\n'
|
||||
|
||||
extra_fields += '<br>' + \
|
||||
edit_text_field(translate['Title'] + ':',
|
||||
'booktitle', '', '', True)
|
||||
extra_fields += '<br>' + \
|
||||
edit_text_field('URL:',
|
||||
'bookurl', '', 'https://...', True)
|
||||
extra_fields += '<br>' + \
|
||||
edit_number_field(translate['Rating'],
|
||||
'bookrating', '', 1, 5, None)
|
||||
# TODO reading status
|
||||
extra_fields += '</div>\n'
|
||||
|
||||
citations_str = ''
|
||||
if endpoint == 'newblog':
|
||||
|
@ -839,7 +872,8 @@ def html_new_post(edit_post_params: {},
|
|||
|
||||
replies_section = ''
|
||||
date_and_location = ''
|
||||
if endpoint not in ('newshare', 'newwanted', 'newreport', 'newquestion'):
|
||||
if endpoint not in ('newshare', 'newwanted', 'newreport',
|
||||
'newquestion', 'newreadingstatus'):
|
||||
|
||||
if not is_new_reminder:
|
||||
replies_section = \
|
||||
|
|
Loading…
Reference in New Issue