Import private macro from Github to Warp10

82 Views Asked by At

Do you know how to import a macro from Github to Warp10 using WarpScript ?

[ 'https://github.com/miton18/test-ws/blob/master' ] WF.SETREPOS

WF.GETREPOS

'miton18/test-ws' 'me' IMPORT

[ NEWGTS ] @me/renameWithLabel

content of renameWithLabel.mc2 on Git:

<% DROP DUP LABELS $label GET RENAME %> LMAP
3

There are 3 best solutions below

0
On

Indeed, you always need a subdirectory (as every macros repos, even the macros directory of your Warp 10 egress)

IMPORT is usefull if the full path of your macro contains lots of subdirectories.

'https://raw.githubusercontent.com/pi-r-p/warpscript/master' WF.ADDREPO
'viz' 'a' IMPORT  
[] @a/juxtaposeGTS  //now I can call a instead of viz.

playable warpscript here.

0
On

you can use https://github.com/senx/WarpFleetSynchronizer ;) You will be able to deploy a private WarpFleet resolver with git repos synchronization.

0
On

as explained here: https://blog.senx.io/share-your-warpscript-macros/

'https://raw.githubusercontent.com/miton18/test-ws/master'  WF.ADDREPO
WF.GETREPOS // check...
[] @utils/renameWithLabel

Your macro must be in a sub folder ;)

But for private repos, try https://user:pass@xxxx or modify the Warp 10 configuration.