I'm trying to work with mega.nz via command line (batch file), use for it megatools
https://github.com/megous/megatools
Sync work fine, download work fine, but i can't found how to generate shareable link to file on mega. Is there any possible way?
May be use Megacmd, or something else?
https://github.com/meganz/MEGAcmd
Can't find command to share file...
put YouUploadFileName
export -a YouUploadFileName
https://github.com/meganz/MEGAcmd/blob/master/UserGuide.md
Related
I have a footer that generates info about the diagram, like the date and user who created the image. I would like to include the git SHA. I need some sort of built-in function, probably a preprocessor function, that lets me envoke system commands. I'm thinking something like the %date() command, only where I pass in the command and arguments I want to be executed and I get back the text from it being run in the shell. Something like
%sys_call("git rev-parse --short=10 HEAD")
There are different ways you could achieve this but it would require a bit of scripting:
Solution 1/:
Pass the git sha through an environment variable and use
%getenv function to retrieve it from the plantuml file
see here: https://plantuml.com/en/preprocessing#291cabbe982ff775
Solution 2/:
Have a script that write the sha in a text file and include this file from your plantuml file:
https://plantuml.com/en/preprocessing#393335a6fd28a804
I'm working in Jupyter Notebook. I've installed music21, musescore, set the xml path as below:
us = environment.UserSettings()
us['musicxmlPath'] ='Applications/musescore.app'
I've also run config, and see that musescore is being detected by music21. However, when I use the show method, I get the following error:
SubConverterFileIOException: png file of xml not found. Or file >999 pages?
Any help is appreciated. Thanks!
An .app file is a directory. Inside the MuseScore.app directory is a bin directory and a file called mscore -- that's the actual name in the path. It'd be much easier to run python -m music21.configure and let the automatic configuration program take care of it.
Are you sure that file is exist?
try changing 'Applications/musescore.app' to '/Applications/musescore.app'
Hope that helps
I found a answer from here wrote by GaetanBaert,It works well and now I can use show method.
He said that "you should change os.system(musescoreRun) line 891 of subconverters.py by subprocess.run(musescoreRun). You need also to import subprocess at the start of subconverters.py."
There are many programs which help me write more efficient code (NirCmd etc.), but they can't run properly if they aren't installed in the computer. So is there a way to, for example, in the temp folder, extract the program from a batch program and use it.
I tried reading the executables with a hex editor, putting the hex code into another file and saving it as an executable. But this failed. So, is there any way to efficiently store an executable inside a batch file, create it and then run it?
Yes, there is one that I know of and works perfectly.
It is a program called bhx.exe (link to its site here).
It can also embed other file types.
The usage is quite simple:
(optional) Create a cabinet (.cab) file from the original .exe using this command: makecab yourexe.exe yourexe.cab. For better compression you can use the /D switch in this way: makecab /D CompressionType=LZX yourexe.exe yourexe.cab
CD to the directory bhx is in and do this: bhx yourexe.cab. Other switches are described in the website.
There you go, the mybin.cmd file is generated.
I have a problem when trying to upload multiple files to one WinSCP directory, i can manage to copy just one single file, but the problem is that i need to upload many files that are generated by a software, the names are not fixed ones, so i need to make use of wildcards in roder to copy all of them, i have tried many variants on the code, but it all was unsuccessful, the code i am using is:
open "sftp://myserver:MyPass#sfts.us.myserver.com" -hostkey="hostkey"
put "C:\from*.*" "/Myserverfolder/Subfolder/"
exit
This code does actually copy the first alphabetically named file, but it ignores the rest of the files.
Any help with it would be much appreciated
Try this in script
Lcd C:\from
Cd Myserverfolder/Subfolder
Put *
Try and do all manually first so you can see what's going on.
I am trying to use a MEL script to load ANIMATION.MA file that references CHARACTER_RIG.MA. The CHARACTER_RIG.MA and ANIMATION.MA files are produced by someone else and supplied to me. The ANIMATION.MA is looking for N:/Project/Maya//char/character/CHARACTER_RIG.MA
If I open ANIMATION.MA from Maya, or use the equivalent MEL command I always get prompted with:
"Reference File Not Found"
Reference File Not Found: N:/Project/Maya//char/character/CHARACTER_RIG.MA.
[Abort File Read] [Skip] [Browse...] [Retry]
If I tap browse, and select the CHARACTER_RIG.MA then it opens perfectly. I can see it created a reference in the Reference Editor that has the Unresolved Path (N:/...) , the Resolved Path (/my/path) and the namespace and the namespaceRN.
My question is, how do I do the equivalent of the "Browse..." from MEL? I tried pre-creating a reference, but it doesn't let me set the unresolved path, so when I load the ANIMATION.MA it keeps prompting in MAYA.
file -f -options "v=0" -typ "mayaAscii" -o "/Source/project/assets/anims/ANIMATION.MA"
If you know the directory where the file is, then you can use the dirmap command. The command dirmap allows you to remap directory structures if your disk configuration changes. So in this case it would look like:
dirmap -en true;
dirmap -m "N:/Project/Maya//char/character" "/my/path";
Possibly more manageable if you have lots of mappings to do especially when moving form a windows machine to a *nix one. However it is much more useful to define your project structure because then things just work when you move, tough this may not be the best of choice for shared assets.
I ended up finding several solutions:
Rename the RIG.MA file to match the filename in ANIM.MA (they were different in my case) and put it in one of the search or project folders that MAYA uses and it will automatically find it.
or
Programatically through code (or manually) edit the ANIM.MA file to remap the file/folder of the RIG.MA to where you want to load it from. Note: You
also need to remap any other files, such as textures. I did this with
perl -pi -e 's/\Qold-path\E/\Qnew-path\E/g' ANIMATION.MA
HTH someone else.
Quick and easy, File, Project, Set and select the folder where meshes or whatever it is.