Skip to content

Instantly share code, notes, and snippets.

View eulereadgbe's full-sized avatar

Elvi Nemiz eulereadgbe

  • Southeast Asian Fisheries Development Center, Aquaculture Department
View GitHub Profile
@eulereadgbe
eulereadgbe / bookview-banner.html
Created February 10, 2022 01:15 — forked from terrywbrady/bookview-banner.html
Sample FlexPaper Document Viewer for XMLUI
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<div id="close"><a href="javascript:window.close();">Close Book Viewer</a></div>
@eulereadgbe
eulereadgbe / Install DSpace 6 with Mirage 2 theme.ipynb
Created October 30, 2021 13:29 — forked from otuoma/Install DSpace 6 with Mirage 2 theme.ipynb
How to install DSpace 6 with Mirage 2 enabled
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eulereadgbe
eulereadgbe / theme.xsl
Last active March 4, 2020 04:08
Added top 10 most downloaded items to /statistics-home
<xsl:template match="dri:div[@id='aspect.statistics.StatisticsTransformer.div.home' and @n='home']//dri:table[@id='aspect.statistics.StatisticsTransformer.table.list-table' and @rend='tableWithTitle detailtable']">
<xsl:variable name="statsURL" select="confman:getProperty('solr-statistics.server')"/>
<xsl:apply-templates select="document(concat($statsURL,'/select?q=type:2+-isBot:true+statistics_type:view&amp;wt=xml&amp;indent=true&amp;facet=true&amp;facet.field=id&amp;facet.sort=count&amp;facet.limit=10'))" mode="most-visited"/>
<xsl:apply-templates select="document(concat($statsURL,'/select?q=type:0+-isBot:true+statistics_type:view&amp;wt=xml&amp;indent=true&amp;facet=true&amp;facet.field=owningItem&amp;fq=bundleName:ORIGINAL&amp;facet.sort=count&amp;facet.limit=10'))" mode="most-downloaded"/>
</xsl:template>
<xsl:template match="/" mode="most-downloaded">
<h3 class="ds-table-head">Total Downloads</h3>
<div class="table-responsive">
<table clas
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
//DSpace 5
select
h.handle,
rp.policy_id,
bit.sequence_id,
bitmv.text_value,
bit.internal_id,
brp.policy_id
from handle h
join item i
@eulereadgbe
eulereadgbe / navigation.xsl
Created September 6, 2018 09:46
Additional sidebar menu
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
@eulereadgbe
eulereadgbe / WaterMark.java
Created November 28, 2017 03:16
Media filter to create watermarked image
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.mediafilter;
import org.dspace.core.ConfigurationManager;
@eulereadgbe
eulereadgbe / WaterMark.java
Created October 5, 2017 06:27
Mediafilter to create diagonal watermarks with Java
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.mediafilter;
import org.dspace.core.ConfigurationManager;
@eulereadgbe
eulereadgbe / asfa.xslt
Last active October 20, 2019 17:54
XSLT to transform ASFA Thesaurus to DSpace controlled vocabulary
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:key name="kConcByCode" match="CONCEPT" use="DESCRIPTOR"/>
<xsl:key name="useFor" match="CONCEPT" use="NON-DESCRIPTOR"/>
<xsl:template match="/">
<node id="ASFA" label="ASFA Thesaurus">
<isComposedBy>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import requests
import json
import xml.etree.ElementTree as ElementTree
from javax.servlet.http import HttpServlet
from net.sf.ehcache import Cache;