<reponame>thurask/bbarchivist
#!/usr/bin/env python3
"""Checks BlackBerry's developer website for metadata."""

import sys  # load arguments

import requests  # session
from bbarchivist import argutils  # arguments
from bbarchivist import decorators  # enter to exit
from bbarchivist import networkutils  # check function
from bbarchivist import utilities  # lprint

__author__ = "Thurask"
__license__ = "WTFPL v2"
__copyright__ = "2015-2019 Thurask"


def metachecker_main():
    """
    Wrap around :mod:`bbarchivist.networkutils` metadata checking.
    """
    parser = argutils.default_parser("bb-metachecker", "NDK metadata scraper.")
    parser.parse_args(sys.argv[1:])
    argutils.slim_preamble("METACHECKER")
    sess = requests.Session()
    runt = networkutils.ndk_metadata(sess) + networkutils.runtime_metadata(sess)
    simu = networkutils.sim_metadata(sess)
    print("RUNTIME METADATA")
    utilities.lprint(sorted(runt))
    print("\nSIMULATOR METADATA")
    utilities.lprint(sorted(simu))
    decorators.enter_to_exit(True)


if __name__ == "__main__":
    metachecker_main()

#!/usr/bin/env python3
"""Checks BlackBerry's developer website for metadata."""

import sys  # load arguments

import requests  # session
from bbarchivist import argutils  # arguments
from bbarchivist import decorators  # enter to exit
from bbarchivist import networkutils  # check function
from bbarchivist import utilities  # lprint

__author__ = "Thurask"
__license__ = "WTFPL v2"
__copyright__ = "2015-2019 Thurask"


def metachecker_main():
    """
    Wrap around :mod:`bbarchivist.networkutils` metadata checking.
    """
    parser = argutils.default_parser("bb-metachecker", "NDK metadata scraper.")
    parser.parse_args(sys.argv[1:])
    argutils.slim_preamble("METACHECKER")
    sess = requests.Session()
    runt = networkutils.ndk_metadata(sess) + networkutils.runtime_metadata(sess)
    simu = networkutils.sim_metadata(sess)
    print("RUNTIME METADATA")
    utilities.lprint(sorted(runt))
    print("\nSIMULATOR METADATA")
    utilities.lprint(sorted(simu))
    decorators.enter_to_exit(True)


if __name__ == "__main__":
    metachecker_main()
#!/usr/bin/env python3 Checks BlackBerry's developer website for metadata. # load arguments # session # arguments # enter to exit # check function # lprint Wrap around :mod:`bbarchivist.networkutils` metadata checking.