Move command line interface to intermaps to separate file.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrintermaps.py
index a1245257a24fe60d79822a3dbed17fcab7c6a9df..b7d54999151207216bb682bb7bda3849a9411ba7 100644 (file)
@@ -119,16 +119,3 @@ def update_wrintermapsreport(session: Session, json_content: dict, last_check: d
 
     # add JSON content to intermaps_report
     insert_json_to_intermapsreport(session, json_content, last_check)
-    session.commit()
-
-
-if __name__ == '__main__':
-    from sqlalchemy.engine import create_engine
-    engine = create_engine('mysql://philipp@localhost:3306/philipp_winterrodeln_wiki?charset=utf8&use_unicode=1')
-    SessionMaker = orm.sessionmaker(bind=engine)
-    filename = '/home/philipp/daten/Winterrodeln/Intermaps/intermaps_winterrodeln_2019-12-06_090501.json'
-    with open(filename) as fp:
-        content = json.load(fp)
-    session = SessionMaker()
-    update_wrintermapssledrun(session, content)
-    update_wrintermapsreport(session, content, datetime.datetime.now())