Index: infra/bots/assets/svg/create.py |
diff --git a/infra/bots/assets/scripts/create.py b/infra/bots/assets/svg/create.py |
similarity index 52% |
copy from infra/bots/assets/scripts/create.py |
copy to infra/bots/assets/svg/create.py |
index 4f176085fbde447b9e5dca925f6c5e47fee08ef7..543831a8b57b9346bf30a0f76f632b5fc5a02165 100755 |
--- a/infra/bots/assets/scripts/create.py |
+++ b/infra/bots/assets/svg/create.py |
@@ -10,11 +10,27 @@ |
import argparse |
+import common |
+import subprocess |
+import os |
+ |
+ |
+SVG_TOOLS = os.path.join(common.INFRA_BOTS_DIR, os.pardir, os.pardir, 'tools', |
+ 'svg') |
def create_asset(target_dir): |
"""Create the asset.""" |
- raise NotImplementedError('Implement me!') |
+ target_dir = os.path.realpath(target_dir) |
+ |
+ if not os.path.exists(target_dir): |
+ os.makedirs(target_dir) |
+ |
+ download_svgs_cmd = [ |
+ 'python', os.path.join(SVG_TOOLS, 'svg_downloader.py'), |
+ '--output_dir', target_dir, |
+ ] |
+ subprocess.check_call(download_svgs_cmd) |
def main(): |