mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
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:
+1
-1
@@ -205,7 +205,7 @@ if __name__ == '__main__':
|
||||
else:
|
||||
modules_yaml_name = "modules.yaml"
|
||||
|
||||
docs = Docs(projects.projects, args=args)
|
||||
docs = Docs(config, projects.projects, args=args)
|
||||
caravel = CaravelConfig(config, projects.projects, modules_yaml_name)
|
||||
rom = ROMFile(config, projects.projects)
|
||||
|
||||
|
||||
+7
-7
@@ -1,17 +1,17 @@
|
||||
---
|
||||
title: |
|
||||
{width=15cm}
|
||||
Tiny Tapeout 03 Datasheet
|
||||
subtitle: Project Repository [https://github.com/TinyTapeout/tinytapeout-03](https://github.com/TinyTapeout/tinytapeout-03)
|
||||
{{width=15cm}}
|
||||
{name} Datasheet
|
||||
subtitle: Project Repository [{repo}]({repo})
|
||||
documentclass: scrartcl
|
||||
date: \today{}
|
||||
date: \today{{}}
|
||||
geometry: "left=2cm,right=2cm,top=2cm,bottom=2.5cm"
|
||||
fontsize: 14pt
|
||||
mainfont: Latin Modern Sans
|
||||
header-includes:
|
||||
- \hypersetup{colorlinks=false,
|
||||
allbordercolors={0 0 0},
|
||||
pdfborderstyle={/S/U/W 1}}
|
||||
- \hypersetup{{colorlinks=false,
|
||||
allbordercolors={{0 0 0}},
|
||||
pdfborderstyle={{/S/U/W 1}}}}
|
||||
---
|
||||
|
||||
\pagebreak
|
||||
|
||||
+6
-2
@@ -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)
|
||||
|
||||
|
||||
+6
-1
@@ -2,6 +2,7 @@ import base64
|
||||
from urllib.parse import urlparse
|
||||
import logging
|
||||
import requests
|
||||
import git
|
||||
import os
|
||||
import errno
|
||||
|
||||
@@ -70,7 +71,7 @@ def split_git_url(url):
|
||||
|
||||
|
||||
|
||||
def get_latest_action_url(url, directory):
|
||||
def get_latest_action_url(url):
|
||||
logging.debug(url)
|
||||
user_name, repo = split_git_url(url)
|
||||
|
||||
@@ -99,3 +100,7 @@ def get_latest_action_url(url, directory):
|
||||
page_url = get_most_recent_action_page(commits, runs['workflow_runs'])
|
||||
|
||||
return page_url
|
||||
|
||||
|
||||
def get_first_remote(repo: git.Repo) -> str:
|
||||
return list(repo.remotes[0].urls)[0]
|
||||
|
||||
Reference in New Issue
Block a user