Metadata-Version: 2.3
Name: mdpython
Version: 0.0.3
Summary: MD Python Library
Project-URL: Homepage, https://github.com/pypa/sampleproject
Project-URL: Issues, https://github.com/pypa/sampleproject/issues
Author-email: Dhaval <seedhaval@gmail.com>
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.0
Description-Content-Type: text/markdown

# MD Python Library

This package contains high level functions for common Python use cases.

# Compare Directories

   

    from mdpython.fileutils import compare  
      
    cmp = compare.compare_dirs(r"C:\Users\Dell\OneDrive\Desktop\result_9th",  
                               r"C:\Users\Dell\OneDrive\Desktop\result_9th_v2")  
      
    cmp.gen_html_report(r"C:\Users\Dell\OneDrive\Desktop\out.html", ["py", "txt",  
                                                                     "json"])  
      
    for fl in cmp.files_only_in_right:  
        if fl.name.endswith("py"):  
            print(fl.absolute())


# Menu based app

    from datetime import datetime
    from random import randint, choice
    from mdpython.uiutils import menu_based_app
    
    def show_date():
        print(datetime.now().strftime("%Y-%m-%d"))
    
    
    def show_time():
        print(datetime.now().strftime("%H:%M:%S"))
    
    
    def show_date_and_time():
        print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
    
    
    def show_random_number():
        print(randint(1, 100))
    
    
    def show_random_color():
        print(choice(['red', 'blue', 'green']))
    
    
    ar = [
        ["Random", "Random Integer", show_random_number],
        ["Random", "Random Color", show_random_color],
        ["Date", "Show Date", show_date],
        ["Date", "Show Time", show_time],
        ["Date", "Show Date and Time", show_date_and_time]
    ]
    
    menu_based_app.start(ar)
