Skip to content

Instantly share code, notes, and snippets.

View l2c2technologies's full-sized avatar

Indranil Das Gupta l2c2technologies

  • L2C2 Technologies
  • Kolkata, IN.
View GitHub Profile
@l2c2technologies
l2c2technologies / 260search.pl
Last active January 15, 2017 14:48
Fork of Koha's cataloging/ysearch.pl for autocomplete support to MARC 260 / 264 $a and $b fields
#!/usr/bin/perl
# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
# Copyright 2007 Tamil s.a.r.l.
# Forked parts copyright 2016 L2C2 Technologies (http://www.l2c2.co.in/)
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@l2c2technologies
l2c2technologies / biblioteksok.xslt
Created June 7, 2016 08:45 — forked from MagnusEnger/biblioteksok.xslt
XSLT transformation to make Koha's OAI-PMH records comply with the harvesting for Biblioteksøk
<xsl:stylesheet version="1.0"
xmlns:marc="http://www.loc.gov/MARC21/slim"
xmlns:items="http://www.koha-community.org/items"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:package="info:srw/extension/13/package-v1.0">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
@l2c2technologies
l2c2technologies / ETD framework jQuery listing
Created June 3, 2016 22:11
ETD Framework JQuery listing
$(document).ready(function(){
if (($.trim($('#Frameworks').find(":selected").text())) == "Electronic Theses and Dissertations"){
$('a:contains("LEADER")').append('<span class="etd"> ( dc.type - set position 6 to "a" [or "m" for multimedia ETD], position 7 as "m" )</span>');
$('a:contains("FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION")').append('<span class="etd"> | THESIS DATE ( dc.date - positions 7-10 )</span>');
$('a:contains("MAIN ENTRY--PERSONAL NAME")').replaceWith('<span class="etd"> AUTHOR OF THESIS / DISSERTATION ( dc.creator ) </span>');
$('div[id^="subfield100a"] > label > span.subfield').text('Name (first, last)');
$('a:contains("TITLE STATEMENT")').replaceWith('<span class="etd"> TITLE OF THESIS / DISSERTATION ( dc.title ) </span>');
$('a:contains("TRANSLATION OF TITLE BY CATALOGING AGENCY")').replaceWith('<span class="etd"> TRANSLATED TITLE ( dc.title.translated ) </span>');
$('a:contains("VARYING FORM OF TITLE")').replaceWith('<span class="etd"> ALTERNATIVE TITL
span.etd {
color: red !important;
}
.tag_editor_upload {
background: transparent url("http://etddemo-staff.l2c2.co.in/intranet-tmpl/prog/img/upload_16x16.png") top left no-repeat;
display : block;
float : left;
width : 16px;
height: 16px;
@l2c2technologies
l2c2technologies / ETD framework AUTH_VAL SQL inserts
Created June 3, 2016 22:09
ETD Framework setup support file (SQL)
INSERT INTO `authorised_values` (`category`, `authorised_value`, `lib`, `lib_opac`, `imageurl`) VALUES
('856Q_LIST', 'text/html', 'text/html', 'text/html', ''),
('856Q_LIST', 'application/pdf', 'Adobe PDF (.pdf)', 'Adobe PDF (.pdf)', ''),
('856Q_LIST', 'application/msword', 'MS-Word (.doc / .docx)', 'MS-Word (.doc / .docx)', ''),
('856Q_LIST', 'jpeg', 'JPEG image (.jpg / .jpeg)', 'JPEG image (.jpg / .jpeg)', ''),
('856Q_LIST', 'application/vnd.ms-excel', 'MS-Excel (.xls / .xlsx)', 'MS-Excel (.xls / .xlsx)', ''),
('DEG_NAME', 'Master of Science', 'Master of Science', 'Master of Science', ''),
('DEG_NAME', 'Doctor of Education', 'Doctor of Education', 'Doctor of Education', ''),
('DEG_NAME', 'Doctor of Philosophy', 'Doctor of Philosophy', 'Doctor of Philosophy', ''),
('DEG_ROLES', 'GS', 'Guide / Supervisor', 'Guide / Supervisor', ''),
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1
@l2c2technologies
l2c2technologies / example.html
Last active August 29, 2015 14:16 — forked from jbaiter/example.html
IA Reader Gist
<html>
<head>
<title>bookreader example</title>
<link rel="stylesheet" type="text/css" href="BookReader/BookReader.css"/>
<script type="text/javascript" src="http://www.archive.org/includes/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="BookReader/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="BookReader/dragscrollable.js"></script>
<script type="text/javascript" src="BookReader/jquery.colorbox-min.js"></script>
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1
@l2c2technologies
l2c2technologies / utlization_certificate
Created March 6, 2015 06:34
koha-utilization-certificate-report
SELECT
GROUP_CONCAT(DISTINCT(f.ifund) ORDER BY f.ifund separator ", ") AS "Fund Source",
f.bibno AS "Bib. No.",
f.btitle AS "Item Title",
f.bauthor AS Author,
f.ted AS Edition,
f.tpub AS Publisher,
f.tisbn AS ISBN,
GROUP_CONCAT(f.idate separator ", ") AS "Date Acquired",
GROUP_CONCAT(f.ibarcode separator ", ") AS Barcodes,
@l2c2technologies
l2c2technologies / kangsabati sishu vidyalaya
Last active August 29, 2015 14:16
jQuery snippet designed to allow repetitive entry of similar addresses for patrons in a Koha installation. Details of the use-case is provided at https://www.facebook.com/notes/l2c2-technologies/jquery-to-solve-a-third-world-village-schools-address-problem/779090322180203
$(document).ready(function(){
var address_data = {
'location0': 'Vill. Amtala',
'location1': 'Vill. Karunamoyee',
'location2': 'Vill. Phoolbagan',
'location3': 'Vill. Maniktala'
}
var address2_data = {
'location1': 'PO + PS Khatra'