Sunday, October 30, 2016

824 (4 of 10 in the series) Java 8 Text Editor to edit bits/chunks of text files on RECORD BY RECORD basis


PURPOSE OF THIS RECORD_TEXT_EDITOR: In traditional text editors, text is edited as entire mass or lump. In this Record Text Editor or Text_Record_Editor, text is broken into small chunks. Each chunk is taken as a record. A text file, when broken into 'bits', can have any number of bits/chunks/fragments, just as a bread can have any number of loaves / slices / layers / strata ranging from 1 to infinity. Then these chunks are loaded into a java text area, in their natural order as in the original file. Now, these chunks can be browsed / edited / deleted and transported to the original text file, to their original location.

There is also a Search button. You can search, and if you find some record containing your search term, you can browse/ edit / delete. Occasionally, after editing / deleting, you can go to the original file using a traditional editor and see how the modifications have taken place.

You have a Delete button, which is in red color, because it is to be used carefully.

LIMITATIONS AND LEGAL DISCLAIMERS


This set of Java 8 classes is still in an experimental stage. There are numerous bugs and shortcomings. After getting reader/user feedback, if they will be kind enough to send, this ybrao-a-donkey will try to rectify them.

This piece of software class(es) and the accompanying medicdicti.txt file is being provided, absolutely with no warranties/guarantees whatsoever. The medicdicti.txt file is being provided as a SAMPLE TEXT which is NOT TO BE USED FOR MEDICAL / COMMERCIAL / SERIOUS PURPOSES. However, the file can be freely edited by users and kept with the user for personal reference. This medicdicti.txt file is nearly 14.8 mb in size, and has about 1,88,000 records. With ybrao-a-donkey also, it is in a very very primitive rough draft condition, under editing stage.


DOES IT WORK IN WINDOWS / MAC? WILL IT WORK ONLY IN UBUNTU / LINUX?



I have compiled, and used it in Ubuntu 10.04 version of Linux. It works reasonably well. As ybtextrecoredit class is based on Java ONLY, it is expected to work on Windows and Mac machines also.

HOW TO DOWNLOAD?


At this moment, I have uploaded the ytextrecoredit.zip file containing the Java class, txt file, and this read me file, a screenshot jpg image file, to my free web host http://ayyo.x10.mx. Here, I furnish a link for the download: Click here to go to my sub-domain ayyo.x10.mx, for downloading.. There are no advertisements at the site. When the download window appears, instead of selecting 'open', select 'save', and save it to your choice folder. The zip file has a size of 5.1 mb, including the default sample medical dictionary text file which has approx. 1,88,000 records and is 14.8 mb. approx. size.

HOW TO INSTALL?


There is no need of installation. It works with java8 version, and with a java command plus the classname when typed at dos prompt / commandline. Go to a folder of your choice and unzip the ytextrecordedit.zip file. You will get ytextrecoredit folder. It contains all the above files, i.e.

java classes, medicdicti.txt file, readme, screenshot.

IF YOU WANT TO EDIT TEXT FILES OTHER THAN WHAT I AM GIVING YOU AS DEFAULT (medicdicti.txt)?



No problem. The purpose of this record-chunk editor is to edit all types of text files, not only text dictionaries. You can copy and paste those other text files, into this ybtextrecoredit folder, and change the default text file at run time.

Alternatively you can copy the ytextrecordedit classes in the folder to somewhere else where those text files are located, and edit there itself. There is one main class + 7 associated sub classes with NOs. 1 to 7 with the same name but Nos. 1 to 7 are added. You have to copy all these. But a better thing will be to copy your zip file downloaded by you, anywhere else you want and unzip there.

DEPENDENCIES?



These java 8 classes work only if you have jdk8 or an appropriate jre8. You can download the jdk8 or jre8 from Oracle.Java website.


HOW TO START USING?


If you have java8 already installed in your system:
you can go to the dost prompt / linux commandline / mac... and type java ytextrecoredit and press enter.

If you want to use java8 from a usb pendrive (I often do), without installing it:
You can use java8 from pen drive, or from some folder like Desktop or My Documents etc.
From the dos prompt / commandline go to that folder, wherever the java8 /jdk8 / jre8 files are situated.

Then type: path (with \ in case of windows, and with / in case of Linux) java ytextrecoredit and press enter.

The window shown in the screenshot will open. Then you can start working with medicdicti.txt. If you want you can change the text file, and start editing.

Question: At post No. 823 also you have given a Text Records Editor, with similar features. How this is an improvement over the previous one?


Ans: After using the Records Editor given by me to the users, for some days, I felt that the Text Area which shows the result, should have a horizontal scroll bar, and vertical scroll bar, to HANDLE LARGER SIZE CHUNKS OF RECORDS. Hence, a JScrollPane has been added with compulsory horizontal and vertical scroll bars, irrespective of the size of the current record which is being shown. In the previous version, when a record of size larger than the JTextArea came for showing, some buttons disappeared, because there was no place on the JFrame and JPanels. After adding JScrollPane with compulsory horizontal and vertical scroll bars, this problem of encroachment by the upper panel of result, into the lower panel of buttons set, has been overcome. However, my readers can suggest other solutions.

This yb-donkey's IMMENSE THANKS OF GRATITUDE TO NETIZEN GEEKS


I have been learning the Java 8, with the help of numerous threads and tutorials available on the internet, and NOT from any Institute/College. All this, I am getting free of cost. While it is not practical/possible for me, to send individual thanks emails, I am expressing it openly. Hail the Linux and Java Community!
To continue. सशेष. ఇంకా ఉంది.

No comments:

Post a Comment

ఘోరమైన విమర్శలకు కూడ స్వాగతం, జవాబులు ఇవ్వబడతాయి.