bbTools/gitweb.py

20 lines
511 B
Python

#!/usr/bin/env python3
# encoding=utf8
import os ,sys
gitweb_path= "/mnt/git_nas/gitweb_repos/"
repo_url_pre="http://192.168.0.101:8088/git/"
def getRepoUrlList():
repoUrlList=[]
for fileN in os.listdir(gitweb_path):
pathStrList=os.path.split(fileN)
fileName=pathStrList[-1]
if(os.path.splitext(fileName)[-1]=='.git'):
repoUrl=repo_url_pre+fileName
repoUrlList.append(repoUrl)
print(repoUrl)
if __name__ == "__main__":
getRepoUrlList()