forked from rvojcik/gitlab-project-export
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wiro
committed
Dec 25, 2018
1 parent
ed461e2
commit 1ae4e7f
Showing
2 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,24 +17,24 @@ | |
if __name__ == '__main__': | ||
# Parsing arguments | ||
parser = argparse.ArgumentParser( | ||
description=""" | ||
description=""" | ||
GitLab Project Export is | ||
small project using Gitlab API for exporting whole gitlab | ||
project with wikis, issues etc. | ||
Good for migration or simple backup your gitlab projects. | ||
""", | ||
epilog='Created by Robert Vojcik <[email protected]>') | ||
|
||
# Arguments | ||
parser.add_argument('-c', dest='config', default='config.yaml', | ||
help='config file') | ||
help='config file') | ||
parser.add_argument('-d', dest='debug', default=False, action='store_const', const=True, | ||
help='Debug mode') | ||
help='Debug mode') | ||
|
||
args = parser.parse_args() | ||
|
||
if not os.path.isfile(args.config): | ||
print("Unable to find config file %s" % (args.config)) | ||
print("Unable to find config file %s" % (args.config)) | ||
|
||
c = config.Config(args.config) | ||
token = c.config["gitlab"]["access"]["token"] | ||
|
@@ -57,7 +57,7 @@ | |
print("Success for %s"%(project)) | ||
# Download project to our destination | ||
if c.config["backup"]["project_dirs"]: | ||
destination = c.config["backup"]["destination"] + "/" + project | ||
destination = c.config["backup"]["destination"] + "/" + project | ||
else: | ||
destination = c.config["backup"]["destination"] | ||
|
||
|
@@ -97,5 +97,5 @@ | |
# Export for project unsuccessful | ||
print("Export failed for project %s" % (project), file=sys.stderr) | ||
return_code += 1 | ||
|
||
sys.exit(return_code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,28 +17,28 @@ | |
if __name__ == '__main__': | ||
# Parsing arguments | ||
parser = argparse.ArgumentParser( | ||
description=""" | ||
description=""" | ||
GitLab Project Export is | ||
small project using Gitlab API for exporting whole gitlab | ||
project with wikis, issues etc. | ||
Good for migration or simple backup your gitlab projects. | ||
""", | ||
epilog='Created by Robert Vojcik <[email protected]>') | ||
|
||
# Arguments | ||
parser.add_argument('-c', dest='config', default='config.yaml', | ||
help='config file') | ||
help='config file') | ||
parser.add_argument('-f', dest='filepath', default=False, | ||
help='Path to gitlab exported project file') | ||
help='Path to gitlab exported project file') | ||
parser.add_argument('-p', dest='project_path', default=False, | ||
help='Project path') | ||
help='Project path') | ||
parser.add_argument('-d', dest='debug', default=False, action='store_const', const=True, | ||
help='Debug mode') | ||
help='Debug mode') | ||
|
||
args = parser.parse_args() | ||
|
||
if not os.path.isfile(args.config): | ||
print("Unable to find config file %s" % (args.config)) | ||
print("Unable to find config file %s" % (args.config)) | ||
|
||
c = config.Config(args.config) | ||
token = c.config["gitlab"]["access"]["token"] | ||
|