Announcement

Collapse
No announcement yet.

Using Lua modules with AMS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Lua modules with AMS

    Does anyone know how to get this Lua utility-library from GitHub working in AMS?

    Web Data Mining for Lua: https://github.com/mkottman/wdm

    Using the example (google.lua) provided there, I've placed a copy of the wdm.lua script (module) in my project's Scripts folder, and then called it from my On Click event via:
    Code:
    require 'wdm'.
    However, the wdm.lua script itself uses several 'require' statements (ie. it has its own dependencies):
    • require, 'luasql.sqlite3'
    • require, 'curl' (or require, 'luacurl')
    • require, 'iconv'
    • require, 'bz2'
    • require, 'tidy'

    ... for which I don't know how to compile the necessary .lua scripts (modules)

    The aforementioned GitHub page on which this is hosted, does provide links to these required modules but they're either dead links or they don't link to actual .lua scripts. For example, the link for the 'tidy' module:(https://github.com/mkottman/tidy) just goes to the C++ source code for the Lua htmltidy bindings. And I have no clue as to how to produce a .lua tidy.script (module) from it.

    If I try to google for pre-existing .lua scripts for any of the above-listed required modules, they just don't seem to exist. So, am I doing something wrong? Or am I misunderstanding something about this concept, entirely?

    And can anyone actually get the example script (google.lua) which is provided there, up and running in an AMS .apz?
    Because I'm thoroughly confused.

  • #2
    After i started using AMS i tried to learn Lua and the first question came up is how to use Lua library inside AMS.

    Hope one AMS Guru can Answer it.

    Comment


    • #3
      If you cannot find the modules pre-compiled for Windows, you'll have no choice but to compile them yourself. This can be a hassle some times, but I bet if you simply jump in and try it you'll learn quite a bit about the configure / make and compilation process of C and C++ projects. That might be very valuable for you, as you then can try to write your own Lua module. The Lua back-end gives you so much insight in Lua, it's crazy!
      Bas Groothedde
      Imagine Programming :: Blog

      AMS8 Plugins
      IMXLH Compiler

      Comment


      • #4
        Me, loose with a C++ compiler? You sure about that one, sensei? LOL, I fear it might actually cause a tear in the fabric of space/time itself!


        Though I do hear the wisdom of your suggestion about the learning-process to be gained from just 'jumping in'. So, okay, okay. You've convinced me to at least give it a look and a try. It's quite daunting because I remember both Sakuya and Centauri Soldier once commenting on how hard they found C++. And those guys were good! But I've just finished telling telco how he shouldn't shy away from Riz's DatabaseEX plugin, so I guess it'd be hypocritical of me not to take my own advice.

        But, if I can figure this one out, will you upgrade my kung-fu status to black-belt?

        LOL, so what am I gonna need for this? Please don't tell me I need to install Visual Studio! That behemoth is such a resource-hog that it practically sent my CPU into cardiac-arrest, the last time I ran it in a sandbox. Anything more i3/2Gb friendly that u can suggest?

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎