diff --git a/scripts/importer.py b/scripts/importer.py index 73d9b25be..b57afd964 100755 --- a/scripts/importer.py +++ b/scripts/importer.py @@ -17,8 +17,8 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -import argparse +import argparse def main(): @@ -26,6 +26,7 @@ def main(): if args.browser == 'chromium': import_chromium(args.bookmarks) + def get_args(): """Get the argparse parser.""" parser = argparse.ArgumentParser("usage: importer.py") @@ -35,6 +36,7 @@ def get_args(): args = parser.parse_args() return args + def import_chromium(bookmarks_file): import codecs from bs4 import BeautifulSoup @@ -51,6 +53,6 @@ def import_chromium(bookmarks_file): for bookmark in bookmarks: print(bookmark) + if __name__ == '__main__': main() -