Beispiel #1
0
def convert_file(on: online.PNO_online) -> None:
    file = prompt_for_link(on)
    notesName = input('Please assign a name to these notes: ')
    notesName += '.html'
    print('Creating file...')
    tList, chapters = on.get_titles_and_chapters(file)
    on.create_html(notesName, tList, chapters)
    print('Finished!')
Beispiel #2
0
def convert_file(on: online.PNO_online) -> None:
    file = prompt_for_link(on)
    notesName = input("Please assign a name to these notes: ")
    notesName += ".html"
    print("Creating file...")
    tList, chapters = on.get_titles_and_chapters(file)
    on.create_html(notesName, tList, chapters)
    print("Finished!")
Beispiel #3
0
def read_file(on: online.PNO_online) -> None:
    file = prompt_for_link(on)
    notesName = input('Please assign a name to these notes: ')
    tList, chapters = on.get_titles_and_chapters(file)

    while True:
        table_contents(notesName, tList)
        selection = input(
            'Please choose a chapter you would like to read(Enter a number) or enter b to go back to the main menu: '
        ).lower()
        if selection == 'b':
            running = quit_program()
            break
        try:
            if int(selection) >= 1 and int(selection) <= len(tList):
                print_chapter(chapters[int(selection) - 1])
            else:
                print(
                    'Invalid input! Please try again. Try entering a number to select a chapter or enter b to go back to the main menu'
                )
        except:
            print(
                'Invalid input! Please try again. Try entering a number to select a chapter or enter b to go back to the main menu'
            )
Beispiel #4
0
def read_file(on: online.PNO_online) -> None:
    file = prompt_for_link(on)
    notesName = input("Please assign a name to these notes: ")
    tList, chapters = on.get_titles_and_chapters(file)

    while True:
        table_contents(notesName, tList)
        selection = input(
            "Please choose a chapter you would like to read(Enter a number) or enter b to go back to the main menu: "
        ).lower()
        if selection == "b":
            running = quit_program()
            break
        try:
            if int(selection) >= 1 and int(selection) <= len(tList):
                print_chapter(chapters[int(selection) - 1])
            else:
                print(
                    "Invalid input! Please try again. Try entering a number to select a chapter or enter b to go back to the main menu"
                )
        except:
            print(
                "Invalid input! Please try again. Try entering a number to select a chapter or enter b to go back to the main menu"
            )