Properties similar to .gitconfig - java

This question is not specifically related Git. I want to create a properties/configuration file in Java with groups (similar to .gitconfig). For example, I want to group the properties as follows
[group1]
prop1=value1
prop2=value2
[group2]
prop1=value1
prop3=value3
Instead of
group1.prop1=value1
group1.prop2=value2
group2.prop1=value1
group2.prop3=value3
I researched internet thoroughly but didn't find anything related to grouping of properties. May be I am not searching with right keywords. Excuse me if I may have missed something online.
Thanks

It is the same format used by the windows "ini" files.
There is a niche Java Library for that.
See: What is the easiest way to parse an INI file in Java?

Related

Is there any way I can try to read files with suffix like '.sas7bdat', '.dta', '.sav' and '.xpt' by using JAVA?

I am working on a module, which can import different kinds of files(currently those file types are SAS output format). Of course, this module is written by java, springboot. The main logic is that when user upload a file, the controller will pass the file inputstream to this module, and call the corresponding method by the file's suffix.
I have done some investigation and found that R-language and python could do this. Can anybody tell me whether there is another way, I mean, can do this job only by JAVA. Thanks.
The sas7bdat is a binary, proprietary format. Its layout has never been made public. Some people have figured it out (like the parso mentioned in the comment). If you really want to go down this path, use the python library as a guide. It will help with sas7bdat and sas7bcat. For the old SAS transport format, see my library on GitHub which is in C#. The new transport format appears to have some incorrect information in its description on the SAS website which I couldn't get around. I have put my code on GitHub in case you want to try.
All that said, let me offer a few words of wisdom: don't do it. Use the python library vs doing it in Java. Also, these libraries read the format vs having read/write. Keep that in mind (it sounds like it doesn't matter but FYI).

Google translate project for java properties files

I am looking for a project to automatically translate my java properties files!
I just tried copy/paste the entirety of a properties file in translate.google.com and it the translator respected the file format keeping the keys intact while translating only the values!!!! Amazing job Google.
Depending on the number of files you have to translate it might be a long process to do it one by one (there is also 5000 character limit) but in the case of few files, it is a very viable solution to automation.
I have found a recent and maintained project for google translate of java properties files:
translate
Unfortunately I need an api key and for that a business account, which I do not have...
I still cannot translate my java properties files :-(
I cannot recommend to auto-translate. But I can recommend to maintain your translations in better way than properties files. This plugin will automatically compile your translations into properties files: https://github.com/hoereth/i18n-maven-plugin/blob/master/doc/README_JAVA.md
Feel free to ask me if you have troubles using it.

Accessing a Property of an odt File?

I asked lately how i can access the meta data of a odt file and the most recomended way to do this was using the apache tika library.
I tried finding out how i can use this Libraries in Detail.
Reading through all this stuff I find that this tika service is pretty hard (at least for someone that is new to Programming like me)
So my question is if maybe someone has a link to a side where there is like a step by step tutorial on how to use it or maybe as a different method to do this. I realy dont want you to do my work but i am working so long on this now and did not get this far so i think its time to ask for help here. :(
I want to acces and set only one property of my file which is the "DocumentID".
Thank you for helping and sorry for my maybe bad english but it is not my foreign language.

Editing/adding IPTC metadata in Android app

I have looked at many of the other similar questions but none of them seem to have a precise answer.
I'm working on an Android app that works with a lot of images. I am looking to add information to images by editing the value of their IPTC keyword tag (or other appropriate tags). I am using Metadata Extractor for reading metadata but this library doesn't support writing metadata.
I have looked at Apache Sanselan which doesn't seem to be appropriate because it has heavy dependency on java.awt (which is not available in Android). I'm aware of Imagero but I have not used it yet in the hope of finding a better open source library.
Has anyone come across such a library? I prefer it to be open source but even commercial suggestions would be appreciated.
Thanks in advance.
https://github.com/k3b/pixymeta-android/ is a fork of https://github.com/dragon66/pixymeta-android/ that implemented
single source for android and jave2se/awt
However there is still a lot of work to implement a simple to use api
Use http://sourceforge.net/projects/iim4j/ Won't work out of box, but can be adapted. I did it to add Copyright notice and Contact fields. Didn't tried other fields, as I didn't needed them. So that would be your bet.
Sorry, can't share the code.

Exporting Access Tables Programmatically

alright, after a few hours of searching and reading all over the net, I have broken down and decided to ask for help. I am working to automate many of the more medial and repetitive tasks as work, and stumbled upon AutoIt, I love the tool. anyway, Today's task is the export of a slew of tables and queries from Access 2007 in a few different formats. mostly CSVs some Tab delimited, and a couple of dBase DBFs and DBTs. now none of this is all that difficult and in fact the person who previously held my position created about a hundred Macros in the mdb that export the tables. seems to me that he fell well short of hastening the process as you still have to run each macro. I am looking to create an autoit script that will export the correct tables in the correct format to the correct place with the correct name. doesn't seem like it should be that difficult.
so thus far I have been imagining using ADO to tell Access to export which table in which format and where. but I cannot seem to find the necessary commands needed to do that. I also figured that perhaps, at least with the text based formats (CSV, txt, tab) I could read each record out of a given table or query and then build the text file myself in autoit, not the simplest way of doing it, but it could work. The problem arises when trying to create the dBase file, I haven't a clue where to begin with that.
I am open to using JAVA, AutoIt, PHP, or Perl to accomplish my task.
I should note that I am fairly new to ADO. the syntax in ADO seems to elude me frequently. so, any and all help is appreciated, please refrain from the "Just google it" responses. if you have a link to share, or a resource that you have found helpful please post that as well, I am not allergic to reading or doing research. Sometimes it just makes more sense to ask for help.
Thanks,
Kyle
If you are open to using VBA, you could probably make it work with only a little code and the DoCmd-Object.
To export as CSV, have a look at DoCmd.Transfertext
To export to dBase, have a look at DoCmd.TransferDatabase
If you have questions about using those, just ask in the comments and I will provide more information.
This is a sort of bonkers idea, but if you already know Java, you may be able to get this to work with the JDBC-ODBC bridge. You'll first have to register your particular Access database as a named ODBC data source, as the bridge does not appear to support on-the-fly ODBC. I don't have a Windows machine on hand and don't remember the exact sequence of steps to do that, but it should be available from the ODBC driver manager.

Categories

Resources