Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aeneas_execute_job with absolute paths #176

Closed
hobodrifterdavid opened this issue May 12, 2017 · 5 comments
Closed

aeneas_execute_job with absolute paths #176

hobodrifterdavid opened this issue May 12, 2017 · 5 comments

Comments

@hobodrifterdavid
Copy link

I'm using aeneas with aeneas-vagrant. To get aeneas to read input and output to the shared folder (/vagrant on the VM) I use:

aeneas_execute_job /vagrant/frD/fr0.mp3 ...

I get: [ERRO] Directory '../../vagrant/frD/fr0' does not exist
In the VM shell I can see these files fine. I think it's to do with how you are joining the paths. I was taking a little look at the code.

Also tried:

aeneas_execute_job ../../vagrant/frD/fr0.mp3 ...

Doesn't work either though.

Works great otherwise. :-)

@readbeyond
Copy link
Owner

readbeyond commented May 12, 2017 via email

@hobodrifterdavid
Copy link
Author

Silly me, I'll try it. Thanks for the response.

@readbeyond
Copy link
Owner

readbeyond commented May 12, 2017 via email

@hobodrifterdavid
Copy link
Author

hobodrifterdavid commented May 12, 2017

I was lazy to write an XML batch file (I might have done a JSON file though), so I ran aeneas in the VM by executing shell commands via 'vagrant ssh -c' in a python script. If that makes any sense. It's tricky with the quotes. For reference, this works:

parameterString = "'task_language=eng|os_task_file_format=json|is_text_type=plain'"
[Single quotes inside double quotes]

command = 'vagrant ssh -c "cd /vagrant; aeneas_execute_task ' + mp3Path + " " + textPath + " " + parameterString + " " + jsonPath + '"'
[That last bit was single/double/single quotes]

os.system(command)

Just an idea, maybe not a good one: you could make python 'stubs' for the aeneas commands that live in the aeneas-vagrant folder. These would only forward the arguments to the real aeneas commands in the VM via 'vagrant ssh -c.' I think 'vagrant ssh -c' is not set up to print stderr to the terminal from the VM child process, only stdin. Not quite sure though. Like this, it's really almost like having aeneas installed natively.. I had difficulties installed aeneas natively on ubuntu 16.04 (such issues are understandable). Although, it's probably confusing for the user that they can't specify input files outside of the aeneas-vagrant folder. Ah, forget it. If I have a better idea I'll let you know. :-)

EDIT: I got it installed natively, it's easier now.

@readbeyond
Copy link
Owner

Hi,

I am closing this ticket, as the original issue is resolved.

About quotes: I guess that depends on both the shell convention of the host OS and the bash shell inside the VM. Thank you for noting what actually works for future reference.

About the "stubs": I opened the following issue: readbeyond/aeneas-vagrant#8 (comment) since it concerns aeneas-vagrant rather than aeneas per se. Let's continue the converation there.

Thank you,

AP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants