Skip to main content
added 2077 characters in body
Source Link
Lukas Lang
  • 34.4k
  • 1
  • 56
  • 99
  1. Create the paclet on the computer with internet:

    ResourceFunction["PacletizeResourceFunction"][
      {
        "LensManipulate",
        "AncientNumberRepresentation"
      },
      "useful.paclet",
      "PacletName"->"MyPaclet"
    ]
    (* "C:\\Users\\lukas\\Documents\\useful.paclet" *)
    
  2. Copy the file to your other computer

  3. Install the paclet:

    PacletInstall["C:\\Users\\lukas\\Documents\\useful.paclet"]
    

    enter image description here

  4. Use the functions as you would otherwise (note that the function is not wrapped in ResourceFunction[...]):

    AncientNumberRepresentation[13, "Babylonian"]
    

    enter image description here

  5. To look at the documentation, use the same methods as for normal functions:

    • With the cursor in the function name, press F1 (or whatever the shortcut is on your system)
    • Use the info popup button
    • Use the search in the documentation center
    • Navigate to it via the paclet guide page (see next point)

    enter image description here

  6. You can manage the paclet & go to the main overview page via the documentation center: Go to the home page, and scroll to the very bottom. Click on the "Add-ons and packages" link, and you should see an overview of the installed paclets: enter image description here The overview guide page looks like this (reached by clicking the "Documentation" button or the paclet name): enter image description here You can also reach the paclet overview page by searching the documentation for the name of the paclet: enter image description here

  7. In the latest version of PacletizeResourceFunction (this is not yet accepted to the function repository, for now it can be accessed via ResourceFunction[CloudObject["https://www.wolframcloud.com/obj/langl/DeployedResources/Function/PacletizeResourceFunction"]]), it is also possible to update an existing paclet with new/updated functions without having to reprocess all the existing ones. The workflow would go something like this:

    PacletizeResourceFunction=
     ResourceFunction[CloudObject["https://www.wolframcloud.com/obj/langl/DeployedResources/Function/PacletizeResourceFunction"]];
    
    (* create a first version of the paclet *)
    PacletizeResourceFunction[{"AreaBetweenCurves"}, "CodeFinal.paclet", "PacletName" -> "Codes"]
    (* "D:\\lukas\\Documents\\CodeFinal.paclet" *)
    
    (* install the paclet file, possibly on another computer *)
    PacletInstall@"CodeFinal.paclet"
    (* PacletObject["Codes"] *)
    
    (* load the paclet *)
    << Codes`
    
    (* it contains the following functions: *)
    Names["Codes`*"]
    (* {"AreaBetweenCurves"} *)
    

    To update the paclet, run the command again, but with a different list of functions. Make sure that the old paclet file is at the target location of the command. This way, PacletizeResourceFunction will see the paclet file and update it, rather than generating a new one from scatch

    PacletizeResourceFunction[{"ColorSearch"}, "CodeFinal.paclet",  "PacletName" -> "Codes"]
    (* "D:\\lukas\\Documents\\CodeFinal.paclet" *)
    
    (* again on the other computer, uninstall the old version (this might need a restart of Mathematica to complete fully) *)
    PacletUninstall@"Codes"
    
    (* install the new version *)
    PacletInstall@"CodeFinal.paclet"
    (* PacletObject["Codes"] *)
    
    (* load it *)
    << Codes`
    
    (* now, both functions are available from the paclet: *)
    Names["Codes`*"]
    (* {"AreaBetweenCurves", "ColorSearch"} *)
    
  1. Create the paclet on the computer with internet:

    ResourceFunction["PacletizeResourceFunction"][
      {
        "LensManipulate",
        "AncientNumberRepresentation"
      },
      "useful.paclet",
      "PacletName"->"MyPaclet"
    ]
    (* "C:\\Users\\lukas\\Documents\\useful.paclet" *)
    
  2. Copy the file to your other computer

  3. Install the paclet:

    PacletInstall["C:\\Users\\lukas\\Documents\\useful.paclet"]
    

    enter image description here

  4. Use the functions as you would otherwise (note that the function is not wrapped in ResourceFunction[...]):

    AncientNumberRepresentation[13, "Babylonian"]
    

    enter image description here

  5. To look at the documentation, use the same methods as for normal functions:

    • With the cursor in the function name, press F1 (or whatever the shortcut is on your system)
    • Use the info popup button
    • Use the search in the documentation center
    • Navigate to it via the paclet guide page (see next point)

    enter image description here

  6. You can manage the paclet & go to the main overview page via the documentation center: Go to the home page, and scroll to the very bottom. Click on the "Add-ons and packages" link, and you should see an overview of the installed paclets: enter image description here The overview guide page looks like this (reached by clicking the "Documentation" button or the paclet name): enter image description here You can also reach the paclet overview page by searching the documentation for the name of the paclet: enter image description here

  1. Create the paclet on the computer with internet:

    ResourceFunction["PacletizeResourceFunction"][
      {
        "LensManipulate",
        "AncientNumberRepresentation"
      },
      "useful.paclet",
      "PacletName"->"MyPaclet"
    ]
    (* "C:\\Users\\lukas\\Documents\\useful.paclet" *)
    
  2. Copy the file to your other computer

  3. Install the paclet:

    PacletInstall["C:\\Users\\lukas\\Documents\\useful.paclet"]
    

    enter image description here

  4. Use the functions as you would otherwise (note that the function is not wrapped in ResourceFunction[...]):

    AncientNumberRepresentation[13, "Babylonian"]
    

    enter image description here

  5. To look at the documentation, use the same methods as for normal functions:

    • With the cursor in the function name, press F1 (or whatever the shortcut is on your system)
    • Use the info popup button
    • Use the search in the documentation center
    • Navigate to it via the paclet guide page (see next point)

    enter image description here

  6. You can manage the paclet & go to the main overview page via the documentation center: Go to the home page, and scroll to the very bottom. Click on the "Add-ons and packages" link, and you should see an overview of the installed paclets: enter image description here The overview guide page looks like this (reached by clicking the "Documentation" button or the paclet name): enter image description here You can also reach the paclet overview page by searching the documentation for the name of the paclet: enter image description here

  7. In the latest version of PacletizeResourceFunction (this is not yet accepted to the function repository, for now it can be accessed via ResourceFunction[CloudObject["https://www.wolframcloud.com/obj/langl/DeployedResources/Function/PacletizeResourceFunction"]]), it is also possible to update an existing paclet with new/updated functions without having to reprocess all the existing ones. The workflow would go something like this:

    PacletizeResourceFunction=
     ResourceFunction[CloudObject["https://www.wolframcloud.com/obj/langl/DeployedResources/Function/PacletizeResourceFunction"]];
    
    (* create a first version of the paclet *)
    PacletizeResourceFunction[{"AreaBetweenCurves"}, "CodeFinal.paclet", "PacletName" -> "Codes"]
    (* "D:\\lukas\\Documents\\CodeFinal.paclet" *)
    
    (* install the paclet file, possibly on another computer *)
    PacletInstall@"CodeFinal.paclet"
    (* PacletObject["Codes"] *)
    
    (* load the paclet *)
    << Codes`
    
    (* it contains the following functions: *)
    Names["Codes`*"]
    (* {"AreaBetweenCurves"} *)
    

    To update the paclet, run the command again, but with a different list of functions. Make sure that the old paclet file is at the target location of the command. This way, PacletizeResourceFunction will see the paclet file and update it, rather than generating a new one from scatch

    PacletizeResourceFunction[{"ColorSearch"}, "CodeFinal.paclet",  "PacletName" -> "Codes"]
    (* "D:\\lukas\\Documents\\CodeFinal.paclet" *)
    
    (* again on the other computer, uninstall the old version (this might need a restart of Mathematica to complete fully) *)
    PacletUninstall@"Codes"
    
    (* install the new version *)
    PacletInstall@"CodeFinal.paclet"
    (* PacletObject["Codes"] *)
    
    (* load it *)
    << Codes`
    
    (* now, both functions are available from the paclet: *)
    Names["Codes`*"]
    (* {"AreaBetweenCurves", "ColorSearch"} *)
    
Source Link
Lukas Lang
  • 34.4k
  • 1
  • 56
  • 99

Putting my comment into an answer, since it seems to have solved the question

You can use ResourceFunction["PacletizeResourceFunction"] to package a collection of resource functions into a paclet, which can then be installed on another computer.

The process works like this: Let's say you want the resource functions LensManipulate and AncientNumberRepresentation on a computer without internet.

  1. Create the paclet on the computer with internet:

    ResourceFunction["PacletizeResourceFunction"][
      {
        "LensManipulate",
        "AncientNumberRepresentation"
      },
      "useful.paclet",
      "PacletName"->"MyPaclet"
    ]
    (* "C:\\Users\\lukas\\Documents\\useful.paclet" *)
    
  2. Copy the file to your other computer

  3. Install the paclet:

    PacletInstall["C:\\Users\\lukas\\Documents\\useful.paclet"]
    

    enter image description here

  4. Use the functions as you would otherwise (note that the function is not wrapped in ResourceFunction[...]):

    AncientNumberRepresentation[13, "Babylonian"]
    

    enter image description here

  5. To look at the documentation, use the same methods as for normal functions:

    • With the cursor in the function name, press F1 (or whatever the shortcut is on your system)
    • Use the info popup button
    • Use the search in the documentation center
    • Navigate to it via the paclet guide page (see next point)

    enter image description here

  6. You can manage the paclet & go to the main overview page via the documentation center: Go to the home page, and scroll to the very bottom. Click on the "Add-ons and packages" link, and you should see an overview of the installed paclets: enter image description here The overview guide page looks like this (reached by clicking the "Documentation" button or the paclet name): enter image description here You can also reach the paclet overview page by searching the documentation for the name of the paclet: enter image description here