INNER CODE UNIT · Python
main
DmitryRyumin/ICCV-2023-25-Papers · code/markdown_to_json_parser.py:630
def main():
# Check if running in GitHub Actions
in_actions = os.getenv("GITHUB_ACTIONS") == "true" or os.getenv("CI") == "true"
# Define the paths based on the environment
if in_actions:
# Define the paths using the GitHub workspace
markdown_directory = Path(Config.GITHUB_WORKSPACE) / Config.MARKDOWN_DIRECTORY
output_directory = Path(Config.GITHUB_WORKSPACE) / Config.OUTPUT_DIRECTORY
else:
# Define local paths
markdown_directory = Path(Config.MARKDOWN_DIRECTORY_LOCAL)
output_directory = Path(Config.OUTPUT_DIRECTORY_LOCAL)
# Add this line at the end to print the paths for verification
print(f"Markdown Directory: {markdown_directory}")
print(f"Output Directory: {output_directory}")