Page 1 of 2

Introducing muddler, the build tool for Mudlet packages

Posted: Wed Jul 17, 2019 7:11 am
by demonnic
tl;dr
Requires Java 1.8 or higher. It's built using Groovy. This makes it cross platform as long as you have java.
Releases for muddler can be found HERE
Wiki where the documentation will hopefully improve can be found HERE
Report any issues or feature requests HERE

Hello fine people. I've been quietly working on a project since about March, though the birth of my most recent child at the beginning of May did put a pause on it. I have written a build tool to (hopefully) make collaborating and source versioning Mudlet package projects a little bit easier. The tool is still kind of rough, it doesn't take any command line arguments, it just takes a project structure and assembles it into a mudlet package, both .xml and he zipped .mpackage.

The specifics are gone into in a bit more detail at the wiki, but I completely favor convention over configuration. The basic structure is a src directory with "triggers", "aliases", "timers", "scripts", and "resources" folders in them. Within these folders you describe the mudlet objects, with a .json file to describe the objects and .lua files matched to the name of the Mudlet object automatically read in for the script portion. The resources folder is where you place any additional files you want includes in the zipped mpackage. The filetree for recreating my animated timers package looks like this:

Code: Select all

C:\ANITIMERS
│   mfile
│
└───src
    ├───aliases
    │   └───AnimatedTimers
    │           aliases.json
    │           anitimer_demo.lua
    │
    ├───resources
    │       test1.jpg
    │       test5.jpg
    │
    ├───scripts
    │   └───AnimatedTimers
    │           code.lua
    │           scripts.json
    │
    └───timers
        └───AnimatedTimers
                animate.lua
                timers.json
I checked that and a nested prompt trigger using a gate, a filter, and does some highlighting in the repository under testmuddlers. Running muddle in the anitimers directory produces a mudlet package which will run the "anitimer demo" alias without throwing errors.

Right now it has the limitation of not working if you don't nest your items in a subdirectory, above I used AnimatedTimers. Having items directly in , for instance, /src/scripts causes an error and I haven't bothered to track it down yet. Also, you cannot add script to folders, nor can you have multiple items with the same name in the same folder, they'll get merged. At some point down the line perhaps I or someone else will work that bit out. I also have not yet done keybindings or buttons, as I use those least often and these were the Big 4 I felt like I had to have done to present it to the world.

I hope this helps some folks out. If you have issues with muddler, please file them on the github page.

Re: Introducing the 0.1 beta release of muddler, the build tool for Mudlet packages

Posted: Wed Jul 17, 2019 7:18 am
by demonnic
A couple of examples created using muddler. These are in the git repo under testmuddlers if you want to look over what produced these files.

Re: Introducing the 0.1 beta release of muddler, the build tool for Mudlet packages

Posted: Sat Jul 20, 2019 12:40 am
by demonnic
Muddler 0.2 release, now with Keybinding support. This is new, but my limited testing has shown it to be functional. If you run into any bugs with it please let me know.

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Fri Aug 09, 2019 10:38 pm
by demonnic
I did a livestream and attempted to demonstrate muddler a bit: https://www.youtube.com/watch?v=LNKl0BZud5c

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Sat Aug 10, 2019 5:04 am
by demonnic
Muddler version 0.3 released https://github.com/demonnic/muddler/releases/tag/0.3

In this release, I add token filtering for @PKGNAME@ which will be replaced by $package-$version, which is what the package is named in the config.lua . Useful for pathing, as @PKGNAME@ will be replaced with the directory name inside the mudlet profile that the files will be dropped in. So with this if you bump your version or change your packagename, your source won't need to be changed, muddler will handle the change for you.

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Wed Jul 22, 2020 11:15 pm
by demonnic
Muddler version 0.4 released https://github.com/demonnic/muddler/releases/tag/0.4

Removes the mandate that all muddled packages contain a version in their name. Also outputs to packageName-packageVersion.extension if a version is supplied, packageName.extension if there is no version.

If you are using the docker version you can simple `docker pull demonnic/muddler:latest` to update your image

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Thu Jun 03, 2021 5:17 am
by demonnic
Muddler version 0.6 released! This release includes support for the new options in the package manager in Mudlet 4.12. https://github.com/demonnic/muddler/releases/tag/0.6 has more info, but highlights are:
* you can set an icon
* automatically reads your project's README.md file for the package's description if it exists
* automatically sets the creation time for you
docker image demonnic/muddler:0.6 pushed, and demonnic/muddler:latest now points to 0.6
GitHub action uses the latest release by default, have verified this one works and is picked up for the action.

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Thu Jun 10, 2021 1:25 am
by demonnic
https://github.com/demonnic/muddler/releases/tag/0.7
muddler 0.7 released, now with basic error handling and increased/improved output!

Also can refer to `*` as 'asterisk', `/` as 'slash', and `-` as 'minus' in keybinding json descriptors.
Selection_101.png

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Sun Jun 20, 2021 2:09 am
by demonnic
Muddler 0.8 released https://github.com/demonnic/muddler/releases/tag/0.8
* fixes keybinding groups to use what Mudlet puts in for them currently
* add `outputFile` key to mfile, which when true causes muddler to write a file called `.output` to your project root
* add Muddler.mpackage which allows for creating custom testing lifecycles for your muddler projects. Watches for changes to the .output file and reloads your package with optional pre/post remove/install hooks separate from your package itself. Example I'm using for the MDK
Code: [show] | [select all] lua
local function killMDK()
  for pkgName, _ in pairs(package.loaded) do
    if pkgName:find("MDK") then
      debugc("Uncaching lua package " .. pkgName)
      package.loaded[pkgName] = nil
    end
  end
end
local function create_helper()
  if MDKhelper then MDKhelper:stop() end
  MDKhelper = Muddler:new({
    path = "/home/demonnic/gitbox/MDK",
    postremove = killMDK,
  })
end

if not MDKhelper then
  registerAnonymousEventHandler("sysLoadEvent", create_helper)
end

Re: Introducing muddler, the build tool for Mudlet packages

Posted: Sat Aug 21, 2021 11:56 pm
by demonnic
Muddler 0.9 released https://github.com/demonnic/muddler/releases/tag/0.9

* fixes function keys (F1-F18) which were previously not properly converted.
* Adjusts the ci bridge mpackage to use relative pathing for some things, which should make it work regardless of how you ran muddler to create the mpackage and output file.