Mucommander commands.xml linux4/5/2023 ![]() The only missing bit there is a proper icon, which I was too lazy to bother about :) outfile mu.app \ -srcfiles mucommander.jar -appclass -name "muCommander" \ -title "muCommander" $JAVA_HOME/bin/javapackager -deploy -native -outdir. Apparently, there's a javapackager utility included in JDK distribution that you can use to create native packages.īy running the following command in the same folder where mucommander.jar is located, it created the desired artefacts: We should do better! So I found another documentation page: Java Platform, Standard Edition Deployment Guide: Self-Contained Application Packaging. One has to download some strange utility and use a legacy build tool to assemble the final artifact. This is all cool and works, but the process is a bit clumsy. Downloaded the appbundler utility from Ģ. ![]() And the instructions worked just fine! Here's what I did:ġ. ![]() So I found this guide: Packaging a Java App for Distribution on a Mac. So I tried looking for an alternative solution. However, I didn't have enough patience to do apply the tool. One option is to assemble the *.app package using Launch4j. ![]() Launching a GUI app from the command line is not convenient at all. The native installer did not work, saying that the launcher is corrupted, but the portable version worked just fine via the command line: csvformat from the csvkit CSV parser: $ xq -r '.as before.' file.Stumbled upon an issue with installing muCommander on Mac. To change the delimiters from the ordinary commas to semi-colons, use e.g. The formatter then converts these arrays to CSV records. It first creates an array with the headers and then extracts the wanted data from the XML structure, one array per data node. This uses jq expressions to create a CSV table. Using xq (part of yq from ): $ xq -r ', (.root.record |. This would work, and a CSV parser would be able to read the output, for as long as none of the extracted data contains embedded semi-colons or newlines. The header is outputted by echo, and the data is extracted using an XPath query that for each record/data node concatenates the id_localisation value from the parent record node with the current node's id_client and key values. Using xmlstarlet: $ echo 'id_localisation id_client key' xmlstarlet sel -t -m '//record/data' -v 'concat(./id_localisation," ",id_client," ",key)' -nl file.xml That may sound like hard work, but trust me - there is nothing worse than trying to troubleshoot something that mysteriously broke one day because the upstream data format changed (in a spec valid fashion) but a downstream script doesn't implement the standard. If you're planning on using this for any sort of production function, then first poke whoever won't let you install things and get them to install the libraries you need. Which will print: id_localisation id_client key My $twig = XML::Twig->new()->parsefile ( 'your_xml_file.xml' ) įoreach my $record ( $twig->root->children('record') ) So for example using XML::Twig with Perl, you'd get: use strict Without libraries this is difficult - XML is pretty fundamentally a thing that needs proper parsing. XML is complex language with a detailed spec. There's a pretty fundamental problem here. I can't install any library but i can use awk, perl, bash so i'am open on solution. the csv i need, note that the headers are output id_localisation id_client key I found a solution with xmlstarlet but it is not available so i am returning to point 0. I need to convert a xml to csv using script.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |