How to program in Grimport?

Ask us for help with programming in Grimport TRANSLATE THIS PAGE WITHOUT TOUCHING THE CODES

Grimport Language Documentation

 

Introduction


The Grimport documentation presents basic and advanced Grimport concepts. Our Grimport documentation is designed for beginners and professionals.

It includes all topics of Grimport programming such as installation, strings, lists, control structures, data extraction, etc. We also offer a "To Go Further" section to help you better understand Grimport programming at an advanced level.

 

 

What is Grimport?


Grimport is a computer language derived from Groovy, close to Java and Javascript. Therefore, the Java and Groovy documentations are complementary (but not essential) to this documentation, because you can program with these two languages in Grimport.

Grimport was created to automate as much as possible the heavy tasks of web-mining.
This language is the main one used in Ecommerce.

Grimport is associated with Grimport Crawler. Grimport Crawler is a robot that crawls websites by running a script (computer program) on their web pages. The purpose of this is to extract data from each of these pages.
In grimport, you have two types of scripts:

  • a simple script
  • a crawling script wich includes:
    • the INITIAL script (script executed at the beginning of the crawling)
    • the FORPAGE script (script executed on each page)
    • the FINAL script (script executed at the end of the crawling)

 

Why use Grimport?


The Grimport was conceived especially for the Web-Mining. It allow to import the products of a suppliers on the web shops of a e-merchant, for example. You can automate the management of your catalogs by linking the sites of supplier with your shop.
For example, when an e-merchant executes a Grimport script on a supplier, he can recover the data there to update its web shop. Indeed, product descriptions and other information are not protected by copyright and can be retrieved freely (commercial information rights).

N.B.:

Throughout this documentation, you can access the functionality of each function by clicking on it.

Moreover, we will use the console() function several times. This function displays what is inside the round brackets. We will use it to illustrate our examples. We will write the result in the following form: // -> result.

 

Paradigms of language


Grimport introduces several paradigms of its own:

  • Remote programming: you have the impression that you are developing in a single language on a single system, but in reality you are programming in several languages and on different systems.
  • Functional programming: unlike other languages, which focus more on performance and resource savings, Grimport is robustness-oriented. For this reason, even if pointers are allowed, the language fights against them to avoid NullPointer errors (60% of errors), which are likely to cause a crawling system to crash indefinitely. We therefore use a functional style: substring(text, 2, 6) rather than text.substring(2, 6).
  • null = do nothing: the null variable doesn't just mean "nothing". It means "do nothing to this variable", "choose the default action". While it would raise an error in another language, it is rare for a badly placed null to create an error in Grimport, because we will always find an interpretation for it.
  • Intelligent functions that correct you and less literalness: always in the spirit of robustness, the Grimport functions correct your mistakes. You insert a string where it should be a number? It will be converted. You put in a single entry when you're asked for an array of values? An array of values containing a single entry will be created. Beware, you may be surprised by how this works, because interpreting things all the time sometimes means making mistakes.
  • Suggested programming processes: the same thing can often be programmed in many different ways, but Grimport will often strongly encourage you to use a particular approach.
  • Pre-integrated authoritative technologies: Google Translate, NordVPN, Anti-captcha, ChatGPT, all these technologies are authorities in their field. Every time you want to integrate them into your applications, you have to reintegrate them with their library and understand how to connect to them. In Grimport, they are already integrated and adapted into functions that allow you to stay within the Grimport logic. We're here to make your life easier.
  • Single or triple script: Grimport is dedicated to webmining and webmining often involves 3 processes, one algorithm interpreting the page, another preparing the start and one at the end of the crawling. You can code through a single script in the traditional way (supervised crawling) or be assisted by Grimport's pre-integrated crawler (unsupervised crawling).
  • An open language: do you want to switch to Python, Java or AutoHotKey programming? Run an external programme in a single line? Grimport offers you simple solutions to connect to it.
  • Dedicated tools: crawling can be a tedious task that requires a mastery of a number of technologies. Several tools are available to help you organise, reverse-engineer or decode texts. You can then quickly produce content in Grimport using these tools and the working methods associated with them.
  • Upstream reflection on algorithmic complexity: webmining can be a real gas factory. Grimport, with its logic based on the memory of identifiers transmitted from function to function during a PHP instance, reduces crawling time exponentially and encourages you to address the threat of your algorithms being too complex, because your main threat is not processor time but its combination with network time.
  • Other paradigms: Grimport is a high-level, functional, event-driven, robustness-oriented, imperative scripting language with strong interpretation/transformation. It is a client language with transparent server-side interaction facilities, metaprogramming and a GUI per comment. It is slightly extensible and open-source.

 

 


Next ❯