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

EmuWebApp annotation via URL: Change file name for export #249

Open
julianpoemp opened this issue Jan 10, 2018 · 2 comments
Open

EmuWebApp annotation via URL: Change file name for export #249

julianpoemp opened this issue Jan 10, 2018 · 2 comments

Comments

@julianpoemp
Copy link
Member

Scenario:

  1. User opens the EmuWebApp with GET parameters for audio source and transcript file
  2. After annotation the user would like to save the changed annotation and clicks on one of the download buttons
  3. The default file name for the download to AnnotJSON in a URL session is "from URL parameters_annot.json"

Suggestion:

It would be nice if the file name would be named with the same name as the audio file (with the correct extension of course)

@raphywink
Copy link
Contributor

good point. Shouldn't bee to difficult to implement either... might still take some time till I get around to implementing this though...

@samgregory
Copy link
Contributor

Hi @MJochim - another simple fix here.

During the load from URL parameters the curBndlName is set to the basename (- extension) of the audio file in this line:

this.LoadedMetaDataService.setCurBndlName(tmp.substr(0, tmp.lastIndexOf('.')).substr(tmp.lastIndexOf('/') + 1, tmp.length));

If we change line 684 from:

var bndlList = [{'session': 'File(s)', 'name': 'from URL parameters'}];

to
var bndlList = [{'session': 'File(s)', 'name': this.LoadedMetaDataService.getCurBndlName()}];

then you will get the desired audiofilename_annot.json format in the download modal.

I hope it's ok that I'm not bothering with pull requests for these one line fixes?

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

No branches or pull requests

3 participants