fix(datasheet): use shuttle name from config

also, dynamically figure out the repo URL (instead of using an hardcoded value)
This commit is contained in:
Uri Shaked
2023-07-30 09:40:16 +03:00
parent e56503e9c3
commit 6034820170
4 changed files with 20 additions and 11 deletions
+6 -2
View File
@@ -3,11 +3,14 @@ import logging
import subprocess
import shutil
import json
from git_utils import get_first_remote
import git
class Docs():
def __init__(self, projects, args):
def __init__(self, config, projects, args):
self.config = config
self.projects = projects
self.args = args
self.script_dir = os.path.dirname(os.path.realpath(__file__))
@@ -64,7 +67,8 @@ class Docs():
doc_credits = fh.read()
with open(self.args.dump_markdown, 'w') as fh:
fh.write(doc_header)
repo = git.Repo(".")
fh.write(doc_header.format(name=self.config['name'], repo=get_first_remote(repo)))
self.projects.sort(key=lambda x: x.mux_address)