fix update_urls to paginate orders, add more projects, fix build index
diff --git a/configure.py b/configure.py
index cd1f226..d9619fe 100755
--- a/configure.py
+++ b/configure.py
@@ -142,10 +142,10 @@
if not self.fill and self.index != 0:
if self.is_hdl():
if num_cells < 20:
- logging.error(f"{self} only has {num_cells} cells")
+ logging.warning(f"{self} only has {num_cells} cells")
else:
if num_cells < 11:
- logging.error(f"{self} only has {num_cells} cells")
+ logging.warning(f"{self} only has {num_cells} cells")
def is_fill(self):
return self.fill
@@ -214,6 +214,7 @@
return top_verilog[0]
def clone(self):
+ # could check if it already exists and then skip for faster local builds
try:
git.Repo.clone_from(self.git_url, self.local_dir)
except git.exc.GitCommandError as e:
@@ -693,7 +694,7 @@
caravel.create_macro_config()
caravel.instantiate()
if not args.test:
- caravel.build_index()
+ docs.build_index()
if args.update_image:
docs.update_image()
diff --git a/project_urls.py b/project_urls.py
index 295c128..255dfe1 100644
--- a/project_urls.py
+++ b/project_urls.py
@@ -6,6 +6,8 @@
]
project_urls = [
'https://github.com/TinyTapeout/tt02-test-straight',
+ "https://github.com/Fraserbc/tt02-simon",
+ "https://github.com/TomKeddie/tinytapeout-2022-2",
"https://github.com/chrisruk/matrixchip",
"https://github.com/loxodes/tt02-submission-loxodes",
"https://github.com/migcorre/tt02-dc",
@@ -54,4 +56,9 @@
"https://github.com/ThorKn/tinytapeout02_shiftregister_challenge",
"https://github.com/89Mods/tt2-4x4-multiply",
"https://github.com/89Mods/tt2-multiplexed-counter",
+ "https://github.com/proppy/tt02-xls-counter",
+ "https://github.com/QuantamHD/ethan-evan-random-numbers",
+ "https://github.com/QuantamHD/evan-submission",
+ "https://github.com/FlyGoat/tt02-play-tune-flygoat",
+ "https://github.com/jleightcap/clash-silicon-tinytapeout",
]
diff --git a/update_urls.py b/update_urls.py
index b8d99f1..5e49687 100755
--- a/update_urls.py
+++ b/update_urls.py
@@ -1,18 +1,34 @@
#!/usr/bin/env python3
import stripe, os
stripe.api_key = os.environ['STRIPE_TOKEN']
-checkouts = stripe.checkout.Session.list(limit=400)
+start_id = "cs_live_b1yJQBXmWxKQKPL4z8P6FDeKvRTW05KOIG8ZBkvod2YRCe5vkxFybIHttA"
+from datetime import datetime
with open("project_urls_init.py") as fh:
urls_header = fh.read()
git_urls = []
-for checkout in checkouts:
- if checkout['payment_status'] == 'paid':
- if 'github' in checkout['metadata']:
- #print(checkout['metadata']['github'], checkout['customer_details']['email'])
- git_urls.append(checkout['metadata']['github'])
+open_date = datetime(2022, 11, 8)
+start_id = None
+after_open_date = True
+while after_open_date:
+ checkouts = stripe.checkout.Session.list(limit=10, starting_after=start_id)
+
+ for checkout in checkouts:
+ created = datetime.fromtimestamp(checkout['created'])
+ if created < open_date:
+ after_open_date = False
+
+ if checkout['payment_status'] == 'paid':
+ if 'github' in checkout['metadata']:
+ print(f"{created} : {checkout['metadata']['github']}")
+ git_urls.append(checkout['metadata']['github'])
+
+ # pagination
+ start_id = checkout['id']
+
+# put in date order
git_urls.reverse()
with open("project_urls.py", 'w') as fh:
fh.write(urls_header)