How to use the instapy.settings.localize_path function in instapy

To help you get started, we’ve selected a few instapy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Instagram-Tools / bot / instapy / file_manager.py View on Github external
def update_locations():
    """
    As workspace has changed, locations also should be updated

    If the user already has set a location, do not alter it
    """

    # update logs location
    if not Settings.log_location:
        Settings.log_location = localize_path("logs")

    # update database location
    if not Settings.database_location:
        Settings.database_location = localize_path("db", "instapy.db")

    # update chromedriver location
    if not Settings.chromedriver_location:
        Settings.chromedriver_location = localize_path(
            "assets", Settings.specific_chromedriver)
        if (not Settings.chromedriver_location
                or not path_exists(Settings.chromedriver_location)):
            Settings.chromedriver_location = localize_path("assets",
                                                            "chromedriver")
github Instagram-Tools / bot / instapy / file_manager.py View on Github external
def update_locations():
    """
    As workspace has changed, locations also should be updated

    If the user already has set a location, do not alter it
    """

    # update logs location
    if not Settings.log_location:
        Settings.log_location = localize_path("logs")

    # update database location
    if not Settings.database_location:
        Settings.database_location = localize_path("db", "instapy.db")

    # update chromedriver location
    if not Settings.chromedriver_location:
        Settings.chromedriver_location = localize_path(
            "assets", Settings.specific_chromedriver)
        if (not Settings.chromedriver_location
                or not path_exists(Settings.chromedriver_location)):
            Settings.chromedriver_location = localize_path("assets",
                                                            "chromedriver")
github Instagram-Tools / bot / instapy / file_manager.py View on Github external
# update logs location
    if not Settings.log_location:
        Settings.log_location = localize_path("logs")

    # update database location
    if not Settings.database_location:
        Settings.database_location = localize_path("db", "instapy.db")

    # update chromedriver location
    if not Settings.chromedriver_location:
        Settings.chromedriver_location = localize_path(
            "assets", Settings.specific_chromedriver)
        if (not Settings.chromedriver_location
                or not path_exists(Settings.chromedriver_location)):
            Settings.chromedriver_location = localize_path("assets",
                                                            "chromedriver")
github Instagram-Tools / bot / instapy / file_manager.py View on Github external
As workspace has changed, locations also should be updated

    If the user already has set a location, do not alter it
    """

    # update logs location
    if not Settings.log_location:
        Settings.log_location = localize_path("logs")

    # update database location
    if not Settings.database_location:
        Settings.database_location = localize_path("db", "instapy.db")

    # update chromedriver location
    if not Settings.chromedriver_location:
        Settings.chromedriver_location = localize_path(
            "assets", Settings.specific_chromedriver)
        if (not Settings.chromedriver_location
                or not path_exists(Settings.chromedriver_location)):
            Settings.chromedriver_location = localize_path("assets",
                                                            "chromedriver")