how to (automatically) convert many .sws to .ipynb?
Thanks to Volker Braun, there is a great tool to convert sagenb work sheets to jupyter ones, e.g.:
sage --notebook=export --ipynb=newname.ipynb admin:383
However, I got a folder full of exported worksheets as .sws files that are not in my .sagenb folder. Do I have to import them one by one, then find out their numbers and export using a command equivalent to the above? Surely there must be a way to automate this from the command line or convert directly. Or is there a way to pass an .sws-file to sage --notebook=export? https://github.com/vbraun/ExportSageNB does not mention such a possibility. Thanks already for your help!
I think eventually we want to have a button to click to do this, at least in the Mac app, but so far this hasn't made it in. (See https://trac.sagemath.org/ticket/20316 .) Yes there would also be a way to automate this using a shell script but I don't have time to reconcoct it today - surely someone else will, though :)
If there was a way to import an .sws file into the sagenb notebook using shell syntax, it would be easy, but I haven't seen a way to do that.
I found this ticket: https://trac.sagemath.org/ticket/8473 The way to upload an .sws file from the command line is:
Yes. I see now why you wanted this - I didn't get that you had downloaded
sws
files, not ones currently in the notebook directory. Not sure why I didn't see that.Also, I'm a little surprised that Volker's script doesn't take notebook file paths as an argument!