Eclipse EMF. Generate a .JPG file from aird at each commit - eclipse

I would like to know if there is a small tutorial or quick instructions to make gitlab generate a capture of the aird/ecore file in the form of jpg file each time I push my model.
I know I would set a CICD pipeline in gitlab but dont know where to start.
Thank you in advance for your help.
Abdelghani

I am guessing you have an Ecore metamodel (.ecore), with a graphical representation (.aird). This graphical representation comes from EcoreTools which is based on Eclipse Sirius.
Sirius does provide an API to export a diagram as an image, start looking around this: https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/actions/export/ExportAction.java

Related

How to convert cgm to png on windows

I want to convert a .cgm file to an image file (.png) on windows.
Are there any freeware/opensource tools for this? I tried to ImageMagik but it does not support this operation. Commandline inteface will be an added advance if any of the tools provide it.
UniConvertor is open source, and the best choice in my opinion.
The windows binaries worked great for me, https://sk1project.net/uc2/download/
From a command line you'd simply type uniconvertor input.cgm output.png
You can try https://cortona3d.com/en/cortona2d-viewer-download. When installed it understand .cgm extension and directly opens in IE and you can view it/or take snapshot.
Other tool that you can try(but not free) is reaConverter(https://www.reaconverter.com/)
It has a nice command line interface that converts cgm to PNG directly
There is a free tool available XnView which is very handy when it comes to view, resize and edit your images. It supports more than 500 different formats. But you will have to download an additional plug-in https://www.cadsofttools.com/products/plugins-for-3d-party-programs/ It will enable your need to deal with CGM file formats.

Run Tika source code from Eclipse

I have been using Apache Tika for extracting text from different document formats. Now i want to make it handle header, footer and text boxes differently. So i downloaded source code of Tika from GitHub and trying to make changes in it.
I want to run Apache Tika source code from Eclipse and debug its execution by passing an input document. How can i do that? There are so many main classes. Where do i start? I understand its a Maven project and i am new to it.
And once i make changes how can i create new jar file?
Take a look at Tika's xhtml output first, maybe it extracts headers/footers and you can use parser API to handle these parts as you wish. If it's that way, use API as examples say passing custom SAX-like handler to it.

Talend : Create a Component using java code

I am new in user of Talend open studio
I want to find a way to add component like tinputfile or tligrow without the drag and drop tools , but with java code manually
Help please
Thank you very much
I don't think it's possible (in fact I'm quite sure you cannot).
When you drag&drop components you "generate" Java source code which is compiled later when you build the job (or run in the studio).
How do you expect to change the byte code at run time?
TRF
Yes , it is possible to create your own Talend components . There is a very thorough, multi-part tutorial at http://powerupbi.com/talend/componentCreation_1.html
You can also view the source to existing components for an idea of how they are implemented and setup.
Perhaps study how tInputFile is built , make a copy, and extend to your purpose.
Alternatively, if all the files have the same schema and reside in the same directory, you may not need a custom component . Rather create a prenr job which gets a list of files in the directory and loops through each file name. For each file, it would call a sub job to read and process that file .
I have provided the all the steps by which you can create the custom component with Java only here is the link to my answer
Custom component with dynamic configuration like jira, jdbc or azurestorage in talend

What's the best way to use CSV source data in a list component?

Disclaimer: I am not an AEM developer, I'm filling in on a project, so forgive me if I am missing the obvious.
I have a page template that will contain a component that will show a list of locations, this template will be used for many city pages.
I'm trying to figure out the best way to get the content into the JCR or read it using a script from a CSV file.
Are there any out-of-the box or open source components out there that can accomplish this?
There are several ways to accomplish your task. The easy part should be rendering the information. You would usually implement a Sling model or a class extending WCMUse, access the repository via the Sling API and render the resources via Adobe HTL. The resources being rendered have to be selected of course: write a Servlet which provides an interface to the resources and use an adequate form element in the component's dialog.
The hard part consists of two parts:
Perhaps just upload the file, process the data and by using the Sling API for resource creation, you can write the data into the repo. You could also utilise the DAM for such tasks and implement a workflow.
Depending on the amount of data, you might want to save the data as JSON string as property of a node.
I hoped that helped a bit.
"Are there any out-of-the box or open source components out there that can accomplish this?"
Simple answer: NO
While there are several libraries that can help you parse CSV files, storing it in JCR depends completely on your project. The structure can be arbitrary or (in a brute force way) you can just store the CSV file as data in your node but that may not be useful.
Depending on how you plan to use the data, it may be useful and optimal to save it in a relevant hierarchy for your project.

How to expand a traineddata file in Tesseract?

I want to add a new font to my language trained data file. I can build a new trained data file, and it works fine but is there any way that I could expand the old trained data file with the new one?
I have seen here someone seems to do it... I am not able to check it since I am on Windows...
https://github.com/CavemanNinja/shell_scripts/blob/master/traintess.sh