“Fixing” ascii sorting in SQL Reports

A quick-n-dirty SQL tuturial

The Problem

Recently there was a request from IDSK – they wanted the accession register SQL report for their Rabindranath Tagore Grant collection books to be listed in a natural sort. Documents of this collection carry the prefix “RT” which is fine and dandy. The “problem” started after that. In their earlier legacy system (SOUL v1) when these books had been accessioned, they did not use an fixed uniform length accession no for this collection. For example, instead of RT00001, it was entered RT1, RT2 and so on. Further, their problem was compounded by another glitch. In several of these accession nos, there were spaces inserted between “RT” and the actual numerical part. When they migrated to Koha with L2C2 Technologies, these problems were carried over to the new system as data curation and correction was not part of the deliverables. Now, three years later, when reports were being asked for, these issues had come back to haunt them.

The “Solution”

The RT collection has over 4000+ books and a manual fix was not feasible at this time. So using the ORDER BY keyword in the report’s SQL like this: ORDER BY LPAD(REPLACE(REPLACE(TRIM(items.barcode)," ",""),"RT",""), 10, ' ') ASC we at least managed to hide the problem and also got natural sorting to work. The first REPLACE() took out any space in the accession no, and the second REPLACE() stripped off the “RT” prefix, leaving us with only the number. Finally using LPAD() we zero prefixed the number so that each one was exactly 10 characters long. And we had our naturally sorted list of accession numbers in the report as we can see below.

Bangiya Sahitya Parishat Library goes online with L2C2 Technologies

The 126-year old heritage Library chooses L2C2 Technologies as their Koha hosting service provider.

The 126-year old heritage library of Bangiya Sahitya Parishat (aka Bangiya Sahitya Parishad) chooses L2C2 Technologies as their Koha hosting service provider, and it is with great joy admixed with a sense of greater responsibility that we welcome our newest client-partner. The OPAC is available at https://library.bangiyasahityaparishat.org/

About Bangiya Sahitya Parishat

Originally founded on 23 July, 1893 as the “Bengal Academy of Literature” literary society, the institution renamed itself as “Bangiya Sahitya Parishat” in 1894 with Romesh Chunder Dutt as it’s first president and Rabindranath Tagore and Navinchandra Sen as vice presidents. With the study and development of the Bengali language and literature as its main objective, the society has over the years, has delved into the cultural, historical, archaeological, sociological and other scientific studies and researches with special reference to Bengal. The society moved into its present address in 1908. The land the building stands on was donated by Maharaja Manindra Chandra Nandy of Cossimbazar Raj. In 1997, Kolkata Municipal Corporation notified the building as a Grade-I heritage building.

About the library

Established in 1894, the Bangiya Sahitya Parishat Library was the brainchild of Archarya Ramendra Sundar Tribedi. From its early beginning with a handful of donated books and periodicals, the library today in its collection has 1,01,719 books and 17,558 journals. The collection includes very rare and valuable books as well as many rare 19th century periodicals in Bengali and English such as ‘Digdarshan’, ‘Samachar Darpan’, ‘Samachar Chandrika’, ‘Friend of India’ etc. [1] The library has several important collections, the most important highlight being the “Vidyasagar Collection” donated by the erstwhile Maharajah of Lalgola. Given the richness of its collections, the library attracts readers and researchers from both India and abroad.

References: [1] https://bangiyasahityaparishat.org/library/

SSH using PuTTY.exe into a vagrant managed kohadevbox VirtualBox VM on Win 10 Prof

Steps to set up public-key based login into a vagrant managed kohadevbox VM

What is kohadevbox?

As the README.md at https://gitlab.com/koha-community/kohadevbox says – “Create a development environment for the Koha ILS project. It uses Vagrant and Ansible to set up a VirtualBox.” Basically it automates the long and somewhat complex process of manually setting up a development system for #kohails.

Why PuTTY?

From the website – PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers. It is our go-to tool on Windows for accessing physical Koha boxes or VMs via SSH.

Vagrant sets up SSH service on the VM to use public-key authentication. Therefore our PuTTY instance needs to know the private key that Vagrant had setup inside the VM, in order to login into it. As many posts in Stackoverflow indicates, this is a point where many people get stuck. Usually they try with %USERPROFILE%\.vagrant.d\insecure_private_key and that typically fails.

Steps for kohadevbox

Using git-bash go to the directory where you had cloned kohadevbox. Be default it will be %USERPROFILE%/git/kohadevbox if you have simply followed the instructions from kohadevbox README.md file. In our case, it was %USERPROFILE%/gitdev/kohadevbox as we had changed it.

Run the command

vagrant ssh-config

You should see something like this:

The line to note in the output is IdentityFile. That’s the private key you need to grab and feed to PuTTYGen for it to convert it into a PuTTY compatible .ppk format private key.

NOTE: This path to the key is going to be different for different users, so do not attempt to copy-paste what you see here, instead use your own IdentityFile value.

Now we convert the vagrant_private_key from IdentityFile and save it as a .ppk file.

And lastly we import it into PuTTY like this and we are good to go!

Finally we are logged in into the VM

NOTES: The versions of software used – (a) PuTTY.exe – 0.71 (b) Vagrant – 2.2.7 (c) Git Bash – 2.25.0 (d) VirtualBox – 6.1.2

Nirmala College Library,Muvattupuzha chooses L2C2 Technologies for Koha Support

Nirmala College, Muvattupuzha, Kerala, India, migrated from proprietary LMS to Koha ILS on the cloud

We are happy to announce that Nirmala College, Muvattupuzha has chosen to L2C2 Technologies for migration from a legacy proprietary software to Koha on our hosted Koha on the cloud platform.

About Nirmala College

Established in 1953, Nirmala College, Muvattupuzha is a first-grade college affiliated to Mahatma Gandhi University, Kottayam. It is a minority Christian institution governed and managed by the Corporate Educational Agency, Syrian Catholic Diocese of Kothamangalam. In strict compliance with the vision of the founding fathers, the college has served the community, irrespective of caste, creed and colour and has contributed to the world quite large a number of value-based Nirmalites. Her performance in academic and non-academic activities has been acknowledged by the NIRF rankings 2017 in the form of its position on the 91st among the list of colleges in the country. In addition, the college has been bestowed with the prestigious ‘Star College’ status by the Department of Bio-Technology (DBT), Government of India, in recognition of the advancements made by the college in the field of science education, with a handsome financial grant. All science departments of the college are supported by the DST- FIST scheme.

The college is located on a hill top at the doorstep of high ranges in the western ghats. The campus is spread over 53 acres of land with state of the art facilities for a constructive learning experience. The college has now grown to become a centre of learning that offers graduation in 16 disciplines, post-graduation in 14 and research facility in six. The college also runs 17 certificate/ diploma programmes. The IGNOU Study Centre, functioning in the college, offers 11 UG and 04 PG Programmes. The Nirmala Civil Service Academy, functioning in the college, caters to the needs of civil service aspirants.

From : http://nirmalacollege.ac.in/welcome-to-nirmala-college/

About the Library

The Library has a collection of over 80,000 volumes. The Library subscribes to 190 journals and periodicals both national and international. The entire legacy data was migrated over to Koha ILS. The OPAC is available at https://nirmala-opac.l2c2.co.in/