Skip to content

Batch processing of a directory - #19

Merged
ebranlard merged 1 commit into
ebranlard:mainfrom
Pablo1990:main
Nov 30, 2023
Merged

ebranlard merged 1 commit into
ebranlard:mainfrom
Pablo1990:main

Conversation

@Pablo1990

@Pablo1990 Pablo1990 commented Oct 25, 2023 •

Copy link
Copy Markdown
Contributor

Hi, I think matlab2python needed a batch-processing file to process all the files from a given directory.

Add permissions:
chmod +x batchProcessing.sh

Run with a given directory
./batchProcessing.sh **directoryToProcess**

Thanks for the amazing work!
Pablo

@Pablo1990
Pablo1990 marked this pull request as ready for review October 25, 2023 08:23
@ebranlard

Copy link
Copy Markdown
Owner

For reference, here's a similar feature for windows:

@echo off
setlocal EnableDelayedExpansion
FOR %%a IN (%*) DO (
    set inputfile=%%~a
    set basename=%%~na
    set outname=!basename!.py
    echo - Generating file !outname! from !inputfile!
    python path/to/matlab2python.py !inputfile! -o !outname!
)

@ebranlard

Copy link
Copy Markdown
Owner

Thank for contributing, I'll merge this, maybe I'll move / adapt the script in the future.

@ebranlard
ebranlard self-requested a review November 30, 2023 16:36
@ebranlard
ebranlard merged commit 2fd2045 into ebranlard:main Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants