From 33162be9785c2eb0688bc14be78ab4ce2828d4f1 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Thu, 28 Apr 2022 22:05:03 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a877f2..45c192d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # omnia_atari -This utility will download Atari 8 bit computer binaries from various iinternet sources into the local directory, suitable for serving by +This utility will download Atari 8 bit computer binaries from various internet sources into the local directory, suitable for serving by [Fujinet](https://fujinet.online/)'s tnfs or similar. + +Currently uses The Internet Archive as its back-end but this could be extended to any site with the appropriate API/scraping code. From be495e74b5b9e2d1badb0e5c61afd1b381ca2338 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Fri, 29 Apr 2022 01:21:13 -0400 Subject: [PATCH 2/3] Don't symlink from collecitons if the symlink already exists. --- omnia_atari.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/omnia_atari.py b/omnia_atari.py index 16cf49b..e640f17 100755 --- a/omnia_atari.py +++ b/omnia_atari.py @@ -68,4 +68,5 @@ def get_item_files(item: Item) -> list: collection_item_path: pathlib.Path = collection_folder_path / atari_file item_file_path: pathlib.Path = current_item_path / atari_file print(f"Creating symlink from {item_file_path} to {collection_folder_path}") - collection_item_path.symlink_to(item_file_path) + if not collection_item_path.exists(): + collection_item_path.symlink_to(item_file_path) From d2c71954809815aa4e4d5294ad4213fbf86a1749 Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Sat, 30 Apr 2022 19:43:35 +0000 Subject: [PATCH 3/3] Use is_symlink() rather than exists() to check whether we need to create a collections folder symlink for this item --- omnia_atari.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omnia_atari.py b/omnia_atari.py index e640f17..c9038b7 100755 --- a/omnia_atari.py +++ b/omnia_atari.py @@ -67,6 +67,6 @@ def get_item_files(item: Item) -> list: for atari_file in atari_files: collection_item_path: pathlib.Path = collection_folder_path / atari_file item_file_path: pathlib.Path = current_item_path / atari_file - print(f"Creating symlink from {item_file_path} to {collection_folder_path}") - if not collection_item_path.exists(): + print(f"Creating symlink from {item_file_path} to {collection_item_path}") + if not collection_item_path.is_symlink(): collection_item_path.symlink_to(item_file_path)