#! /usr/bin/env python2.7
# -*- coding:utf-8 -*-

from init     import init
from docfetch import fetch as fetch_doc
from imgfetch import fetch as fetch_img

if __name__ == '__main__':
    init()
    fetch_doc()
    fetch_img()

@@ -43,16 +43,28 @@
 -8 -*-%0A%0A
+import time%0A
 from ini
@@ -166,74 +166,405 @@
 mg%0A%0A
-if __name__ == '__main__':%0A    init()%0A    fetch_doc()%0A    fetch_img(
+def run():%0A    init()%0A    fetch_doc()%0A    fetch_img()%0A%0Adef debug(sn):%0A    print(sn)%0A%0Adef runAsService():%0A    serialNo = 0%0A    while True:%0A        serialNo = serialNo + 1%0A        if serialNo == 10:%0A            break%0A        debug(serialNo)%0A        time.sleep(1)%0A%0A%0Aif __name__ == '__main__':%0A    try:%0A        runAsService()%0A    except KeyboardInterrupt as e:%0A        debug(999)%0A        print('bye bye'
 )%0A

add loop for fetch