Skip to content

Commit 57bf949

Browse files
author
Bishal Sarangkoti
authored
minor update on CLI
1 parent 7009f68 commit 57bf949

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

epub_writer.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from ebooklib import epub
2+
import colorama
3+
from colorama import Back, Fore
24
import pickle
35

6+
colorama.init()
7+
48
def write(file_name, title, author, chapters):
59
# Ebook
610
book = epub.EpubBook()
@@ -40,7 +44,7 @@ def write(file_name, title, author, chapters):
4044
# write to the file
4145
epub.write_epub(file_name, book, {})
4246

43-
47+
print(Back.GREEN + Fore.BLACK + " File " + Back.YELLOW + f" {file_name} " + Back.GREEN + " Successfully Written ")
4448
def main():
4549
# Load chapters list that stores chapter info
4650
# Store chapter info
@@ -50,5 +54,6 @@ def main():
5054

5155
write("Leetcode Questions.epub", "Leetcode Questions", "Anonymous", chapters)
5256

57+
5358
if __name__ == "__main__":
5459
main()

0 commit comments

Comments
 (0)