Add notes for 2016-02-07 and update public

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2016-02-07 21:33:55 +02:00
parent 6103f22edb
commit 618eeef3d4
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
18 changed files with 1679 additions and 809 deletions

View File

@ -50,3 +50,38 @@ DELETE 25
- Hmm, I indexed, cleared the Cocoon cache, and restarted Tomcat but the 25 "|||" countries are still there
- Maybe I need to do a full re-index...
- Yep! The full re-index seems to work.
- Process the empty countries on CGSpace
## 2016-02-07
- Working on cleaning up Abenet's DAGRIS data with OpenRefine
- I discovered two really nice functions in OpenRefine: `value.trim()` and `value.escape("javascript")` which shows whitespace characters like `\r\n`!
- For some reason when you import an Excel file into OpenRefine it exports dates like 1949 to 1949.0 in the CSV
- I re-import the resulting CSV and run a GREL on the date issued column: `value.replace("\.0", "")`
- I need to start running DSpace in Mac OS X instead of a Linux VM
- Install PostgreSQL from homebrew and configure:
```
$ postgres -D /opt/brew/var/postgres
$ createuser --pwprompt dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
```
- After building and running a `fresh_install` I symlinked the webapps into Tomcat's webapps folder:
```
$ mv /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT.orig
$ ln -sfv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT
$ ln -sfv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/rest
$ ln -sfv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/jspui
$ ln -sfv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/oai
$ ln -sfv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/solr
$ /opt/brew/Cellar/tomcat/8.0.30/bin/catalina start
```
- Add CATALINA_OPTS in `/opt/brew/Cellar/tomcat/8.0.30/libexec/bin/setenv.sh`, as this script is sourced by the `catalina` startup script
- For example:
```
CATALINA_OPTS="-Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8"
```

View File

@ -1,82 +1,50 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" November, 2015 &middot; CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/2015-11/" />
<meta property="og:type" content="article" />
<meta property="og:article:published_time" content="2015-11-23T17:00:57&#43;03:00" />
<meta property="og:article:tag" content="notes" />
<title>
November, 2015 &middot; CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>November, 2015 - CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url(../images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
</div>
<a href="/cgspace-notes/" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
</section>
</header>
<main class="container">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<article>
<header>
<h1 class="text-primary">November, 2015</h1>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-11-23T17:00:57&#43;03:00">
Nov 23, 2015
</time>
</div>
<div class="pull-right">
<span class="post-tag small"><a href="/cgspace-notes//tags/notes">#notes</a></span>
</div>
</div>
</header>
<section>
<main role="main" class="article">
<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2015-11-23">November 23, 2015</time></span>
<br>
<span class="key">tags:</span>
<span class="val">
<a href="/cgspace-notes/tags/notes">notes</a>
</span>
</div>
<h1 class="headline" itemprop="headline">November, 2015</h1>
<section class="body" itemprop="articleBody">
<h2 id="2015-11-22:3d03b850f8126f80d8144c2e17ea0ae7">2015-11-22</h2>
@ -225,56 +193,19 @@ db.statementpool = true
</ul>
</section>
<footer>
<section class="author-info row">
<div class="author-avatar col-md-2">
</div>
<div class="author-meta col-md-6">
<h1 class="author-name text-primary">Alan Orth</h1>
</div>
</section>
<ul class="pager">
<li class="previous disabled"><a href="#"><span aria-hidden="true">&larr;</span> Older</a></li>
<li class="next"><a href="/cgspace-notes/2015-12/">Newer <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</footer>
</article>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
</main>
</div>
</footer>
<footer>
<div class="container">
<span class="copyright">&copy; 2015 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

View File

@ -1,82 +1,50 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" December, 2015 &middot; CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/2015-12/" />
<meta property="og:type" content="article" />
<meta property="og:article:published_time" content="2015-12-02T13:18:00&#43;03:00" />
<meta property="og:article:tag" content="notes" />
<title>
December, 2015 &middot; CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>December, 2015 - CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url(../images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
</div>
<a href="/cgspace-notes/" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
</section>
</header>
<main class="container">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<article>
<header>
<h1 class="text-primary">December, 2015</h1>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-12-02T13:18:00&#43;03:00">
Dec 2, 2015
</time>
</div>
<div class="pull-right">
<span class="post-tag small"><a href="/cgspace-notes//tags/notes">#notes</a></span>
</div>
</div>
</header>
<section>
<main role="main" class="article">
<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2015-12-02">December 02, 2015</time></span>
<br>
<span class="key">tags:</span>
<span class="val">
<a href="/cgspace-notes/tags/notes">notes</a>
</span>
</div>
<h1 class="headline" itemprop="headline">December, 2015</h1>
<section class="body" itemprop="articleBody">
<h2 id="2015-12-02:012a628feed6d64ae1151cbd6151ccd6">2015-12-02</h2>
@ -240,56 +208,19 @@ $ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle
</ul>
</section>
<footer>
<section class="author-info row">
<div class="author-avatar col-md-2">
</div>
<div class="author-meta col-md-6">
<h1 class="author-name text-primary">Alan Orth</h1>
</div>
</section>
<ul class="pager">
<li class="previous"><a href="/cgspace-notes/2015-11/"><span aria-hidden="true">&larr;</span> Older</a></li>
<li class="next"><a href="/cgspace-notes/2016-01/">Newer <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</footer>
</article>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
</main>
</div>
</footer>
<footer>
<div class="container">
<span class="copyright">&copy; 2015 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

View File

@ -1,82 +1,50 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" January, 2016 &middot; CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/2016-01/" />
<meta property="og:type" content="article" />
<meta property="og:article:published_time" content="2016-01-13T13:18:00&#43;03:00" />
<meta property="og:article:tag" content="notes" />
<title>
January, 2016 &middot; CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>January, 2016 - CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url(../images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
</div>
<a href="/cgspace-notes/" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
</section>
</header>
<main class="container">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<article>
<header>
<h1 class="text-primary">January, 2016</h1>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2016-01-13T13:18:00&#43;03:00">
Jan 13, 2016
</time>
</div>
<div class="pull-right">
<span class="post-tag small"><a href="/cgspace-notes//tags/notes">#notes</a></span>
</div>
</div>
</header>
<section>
<main role="main" class="article">
<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-01-13">January 13, 2016</time></span>
<br>
<span class="key">tags:</span>
<span class="val">
<a href="/cgspace-notes/tags/notes">notes</a>
</span>
</div>
<h1 class="headline" itemprop="headline">January, 2016</h1>
<section class="body" itemprop="articleBody">
<h2 id="2016-01-13:3846b7fcbca60cdedafd373cb39cd76d">2016-01-13</h2>
@ -165,56 +133,19 @@ $ find SimpleArchiveForBio/ -iname &ldquo;*.pdf&rdquo; -exec basename {} \; | so
<p><img src="../images/2016/01/xmlui-subjects-after.png" alt="XMLUI subjects after" /></p>
</section>
<footer>
<section class="author-info row">
<div class="author-avatar col-md-2">
</div>
<div class="author-meta col-md-6">
<h1 class="author-name text-primary">Alan Orth</h1>
</div>
</section>
<ul class="pager">
<li class="previous"><a href="/cgspace-notes/2015-12/"><span aria-hidden="true">&larr;</span> Older</a></li>
<li class="next"><a href="/cgspace-notes/2016-02/">Newer <span aria-hidden="true">&rarr;</span></a></li>
</ul>
</footer>
</article>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
</main>
</div>
</footer>
<footer>
<div class="container">
<span class="copyright">&copy; 2016 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

159
public/2016-02/index.html Normal file
View File

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>February, 2016 - CGSpace Notes</title>
</head>
<body>
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<main role="main" class="article">
<article class="single" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-02-05">February 05, 2016</time></span>
<br>
<span class="key">tags:</span>
<span class="val">
<a href="/cgspace-notes/tags/notes">notes</a>
</span>
</div>
<h1 class="headline" itemprop="headline">February, 2016</h1>
<section class="body" itemprop="articleBody">
<h2 id="2016-02-05:124a59adbaa8ef13e1518d003fc03981">2016-02-05</h2>
<ul>
<li>Looking at some DAGRIS data for Abenet Yabowork</li>
<li>Lots of issues with spaces, newlines, etc causing the import to fail</li>
<li>I noticed we have a very <em>interesting</em> list of countries on CGSpace:</li>
</ul>
<p><img src="../images/2016/02/cgspace-countries.png" alt="CGSpace country list" /></p>
<ul>
<li>Not only are there 49,000 countries, we have some blanks (25)&hellip;</li>
<li>Also, lots of things like &ldquo;COTE D`LVOIRE&rdquo; and &ldquo;COTE D IVOIRE&rdquo;</li>
</ul>
<h2 id="2016-02-06:124a59adbaa8ef13e1518d003fc03981">2016-02-06</h2>
<ul>
<li>Found a way to get items with null/empty metadata values from SQL</li>
<li>First, find the <code>metadata_field_id</code> for the field you want from the <code>metadatafieldregistry</code> table:</li>
</ul>
<pre><code>dspacetest=# select * from metadatafieldregistry;
</code></pre>
<ul>
<li>In this case our country field is 78</li>
<li>Now find all resources with type 2 (item) that have null/empty values for that field:</li>
</ul>
<pre><code>dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value='' OR text_value IS NULL);
</code></pre>
<ul>
<li>Then you can find the handle that owns it from its <code>resource_id</code>:</li>
</ul>
<pre><code>dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = '22678';
</code></pre>
<ul>
<li>It&rsquo;s 25 items so editing in the web UI is annoying, let&rsquo;s try SQL!</li>
</ul>
<pre><code>dspacetest=# delete from metadatavalue where metadata_field_id=78 and text_value='';
DELETE 25
</code></pre>
<ul>
<li>After that perhaps a regular <code>dspace index-discovery</code> (no -b) <em>should</em> suffice&hellip;</li>
<li>Hmm, I indexed, cleared the Cocoon cache, and restarted Tomcat but the 25 &ldquo;|||&rdquo; countries are still there</li>
<li>Maybe I need to do a full re-index&hellip;</li>
<li>Yep! The full re-index seems to work.</li>
<li>Process the empty countries on CGSpace</li>
</ul>
<h2 id="2016-02-07:124a59adbaa8ef13e1518d003fc03981">2016-02-07</h2>
<ul>
<li>Working on cleaning up Abenet&rsquo;s DAGRIS data with OpenRefine</li>
<li>I discovered two really nice functions in OpenRefine: <code>value.trim()</code> and <code>value.escape(&quot;javascript&quot;)</code> which shows whitespace characters like <code>\r\n</code>!</li>
<li>For some reason when you import an Excel file into OpenRefine it exports dates like 1949 to 1949.0 in the CSV</li>
<li>I re-import the resulting CSV and run a GREL on the date issued column: <code>value.replace(&quot;\.0&quot;, &quot;&quot;)</code></li>
<li>I need to start running DSpace in Mac OS X instead of a Linux VM</li>
<li>Install PostgreSQL from homebrew and configure:</li>
</ul>
<pre><code>$ postgres -D /opt/brew/var/postgres
$ createuser --pwprompt dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
</code></pre>
<ul>
<li>After building and running a <code>fresh_install</code> I symlinked the webapps into Tomcat&rsquo;s webapps folder:</li>
</ul>
<pre><code>$ mv /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT.orig
$ ln -sfv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT
$ ln -sfv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/rest
$ ln -sfv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/jspui
$ ln -sfv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/oai
$ ln -sfv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/solr
$ /opt/brew/Cellar/tomcat/8.0.30/bin/catalina start
</code></pre>
<ul>
<li>Add CATALINA_OPTS in <code>/opt/brew/Cellar/tomcat/8.0.30/libexec/bin/setenv.sh</code>, as this script is sourced by the <code>catalina</code> startup script</li>
<li>For example:</li>
</ul>
<pre><code>CATALINA_OPTS=&quot;-Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8&quot;
</code></pre>
</section>
</article>
</main>
</div>
<footer>
<div class="container">
<span class="copyright">&copy; 2016 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
</body>
</html>

View File

@ -1,93 +1,51 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" 404 Page not found &middot; CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/404/" />
<meta property="og:type" content="website" />
<title>
404 Page not found &middot; CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>404 Page not found - CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url( /images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<main role="main" class="page-not-found">
<h1>
<span class="base05">[</span><span class="base08">4</span><span class="base09">0</span><span class="base0a">4</span><span class="base05">]</span>
<span class="base05"># _</span>
</h1>
<h2>
not found
</h2>
</main>
</div>
<a href="/cgspace-notes/" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
<a href="/cgspace-notes/index.xml" class="btn-header btn-subscribe hidden-xs">
<i class="fa fa-rss" aria-hidden="true"></i>
&nbsp;Subscribe
</a>
</section>
</header>
<main class="container">
<footer>
<div class="container">
<span class="copyright">&copy; 2016 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
<section class="row not-found">
<h1 class="col-md-4 col-md-offset-4">404</h1>
<div class="col-md-4 col-md-offset-4">That page doesn't exist!</div>
</section>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

View File

@ -0,0 +1,494 @@
/* Base16 Eighties Colorscheme by Chris Kempson (http://chriskempson.com) */
:root {
--base00: #2d2d2d;
--base01: #393939;
--base02: #515151;
--base03: #747369;
--base04: #a09f93;
--base05: #d3d0c8;
--base06: #e8e6df;
--base07: #f2f0ec;
--base08: #f2777a;
--base09: #f99157;
--base0a: #ffcc66;
--base0b: #99cc99;
--base0c: #66cccc;
--base0d: #6699cc;
--base0e: #cc99cc;
--base0f: #d27b53;
}
.base00 { color: var(--base00); }
.base01 { color: var(--base01); }
.base02 { color: var(--base02); }
.base03 { color: var(--base03); }
.base04 { color: var(--base04); }
.base05 { color: var(--base05); }
.base06 { color: var(--base06); }
.base07 { color: var(--base07); }
.base08 { color: var(--base08); }
.base09 { color: var(--base09); }
.base0a { color: var(--base0a); }
.base0b { color: var(--base0b); }
.base0c { color: var(--base0c); }
.base0d { color: var(--base0d); }
.base0e { color: var(--base0e); }
.base0f { color: var(--base0f); }
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700);
@custom-media --breakpoint-md (max-width: 52em);
/* General Page Layout */
body {
margin: 0;
background-color: var(--base00);
color: var(--base07);
line-height: 1.5;
font-size: 100%;
font-family: 'Source Code Pro', monospace;
}
.container {
max-width: 52em;
margin-left: auto;
margin-right: auto;
}
@media (--breakpoint-md) {
.container {
width: 100%;
}
}
article.single section,
.article-list article {
background-color: var(--base07);
color: var(--base00);
padding-left: 8rem;
padding-right: 8rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
@media (--breakpoint-md) {
article.single section,
.article-list article {
padding-left: 2rem;
padding-right: 2rem;
}
}
header, footer {
background-color: var(--base01);
padding-top: 1rem;
padding-bottom: 1rem;
}
header {
margin-top: 1rem;
margin-bottom: 2rem;
}
@media (--breakpoint-md) {
header {
margin-top: 0;
padding-left: 2rem;
padding-right: 2rem;
}
}
footer {
margin-top: 2rem;
margin-bottom: 1rem;
text-align: center;
font-size: 0.9em;
color: var(--base03);
}
@media (--breakpoint-md) {
footer {
margin-top: 0;
margin-bottom: 0;
}
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
line-height: 1.25;
margin-top: 1em;
margin-bottom: .5em;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
h1 { font-size: 2rem }
h2 { font-size: 1.5rem }
h3 { font-size: 1.25rem }
h4 { font-size: 1rem }
h5 { font-size: .875rem }
h6 { font-size: .75rem }
pre, code {
font-family: inherit;
font-size: inherit;
}
/* Header Layout */
header a.path {
color: var(--base0d);
}
header span.caret {
color: var(--base07);
}
/* Footer Layout */
footer a {
color: var(--base03);
text-decoration: none;
}
/* 404 Page Layout */
.page-not-found h1 {
text-align: center;
font-size: 5em;
}
.page-not-found h2 {
text-align: center;
font-size: 3em;
color: var(--base04);
margin-bottom: 4rem;
}
@media (--breakpoint-md) {
.page-not-found h1 {
font-size: 3em;
}
.page-not-found h2 {
font-size: 2em;
}
}
/* Homepage Layout */
@media (--breakpoint-md) {
.homepage {
margin-bottom: 2rem;
}
}
.homepage h1.site-title {
text-align: center;
font-size: 5em;
color: var(--base0c);
}
@media (--breakpoint-md) {
.homepage h1.site-title {
font-size: 3em;
}
}
.homepage h1.headline {
font-size: 3em;
color: var(--base0a);
}
@media (--breakpoint-md) {
.homepage h1.headline {
padding-left: 2rem;
padding-right: 2rem;
}
}
.homepage .hero-logo img {
width: 100%;
}
.homepage section.categories,
.homepage section.tags {
padding-left: 2rem;
padding-right: 2rem;
}
.homepage .category,
.homepage .category a,
.homepage .tag,
.homepage .tag a {
color: var(--base0e);
}
.homepage .tag {
margin-right: 2em;
}
/* Post List Layout */
.article-list h1.list-title {
font-size: 3em;
color: var(--base0a);
}
.article-list article {
padding-top: 4rem;
padding-bottom: 4rem;
margin-bottom: 4rem;
}
.article-list article h2.headline,
.article-list article h2.headline a {
margin-top: 0;
color: var(--base0d);
}
.article-list article .meta {
margin-bottom: 1rem;
}
.article-list article .meta .key {
color: var(--base03);
}
.article-list article .meta .val,
.article-list article .meta .val a {
color: var(--base0e);
}
.article-list article section.summary a { color: var(--base0f); }
/* Single Post Layout */
article.single .meta {
font-size: 0.9em;
text-align: right;
}
article.single .meta .key {
color: var(--base03);
}
article.single .meta .val, article.single .meta .val a {
color: var(--base0e);
}
@media (--breakpoint-md) {
article.single .meta {
padding-left: 2rem;
padding-right: 2rem;
}
}
article.single h1.headline {
margin-top: 0;
font-size: 3em;
color: var(--base0a);
}
@media (--breakpoint-md) {
article.single h1.headline {
padding-left: 2rem;
padding-right: 2rem;
}
}
article.single section.body {
padding-top: 4rem;
padding-bottom: 3rem;
}
@media (--breakpoint-md) {
article.single section.body {
padding-top: 2rem;
padding-bottom: 1rem;
}
}
/* Highlight Colors */
article.single section.body h1 { color: var(--base0d); }
article.single section.body h2 { color: var(--base0b); }
article.single section.body h3 { color: var(--base09); }
article.single section.body h4 { color: var(--base08); }
article.single section.body h5 { color: var(--base02); }
article.single section.body h6 { color: var(--base03); }
article.single section.body a { color: var(--base0f); }
/* Article Elements */
article.single pre {
margin-top: 0;
margin-bottom: 1rem;
overflow-x: scroll;
border-radius: 3px;
padding: 2rem;
}
article.single p code {
padding: 0.2em 0.5em;
border-radius: 3px;
background: var(--base03);
color: var(--base07);
}
article.single figure {
box-sizing: border-box;
max-width: 52rem;
width: 52rem;
margin-left: -8rem;
margin-right: -8rem;
margin-bottom: 1rem;
padding: 1em;
background-color: var(--base01);
}
@media (--breakpoint-md) {
article.single figure {
width: 100%;
margin-left: 0;
margin-right: 0;
border-radius: 3px;
}
}
article.single figure img {
max-width: 100%;
width: 100%;
border-radius: 3px;
}
article.single figure figcaption {
margin-top: 1rem;
}
article.single figure figcaption h4 {
margin-top: 0;
text-align: center;
font-style: italic;
font-weight: normal;
color: var(--base07);
}
article.single table {
border-collapse: separate;
border-spacing: 0;
max-width: 100%;
width: 100%;
}
article.single th,
article.single td {
padding: .25rem 1rem;
line-height: inherit;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: var(--base04);
}
article.single tr:last-child td {
border-bottom: 0;
}
article.single th {
text-align: left;
font-weight: bold;
vertical-align: bottom;
}
article.single td { vertical-align: top }
article.single blockquote {
margin-left: 2rem;
margin-right: 3rem;
padding-left: 1rem;
border-left: 5px solid var(--base0c);
}
article.single hr {
border: 0;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: var(--base04);
}
/* Pygments template by Jan T. Sott (https://github.com/idleberg) */
pre { background: var(--base00); color: var(--base07) }
.highlight .hll { background-color: var(--base02) }
.highlight .c { color: var(--base03) } /* Comment */
.highlight .err { color: var(--base08) } /* Error */
.highlight .k { color: var(--base0e) } /* Keyword */
.highlight .l { color: var(--base09) } /* Literal */
.highlight .n { color: var(--base07) } /* Name */
.highlight .o { color: var(--base0c) } /* Operator */
.highlight .p { color: var(--base07) } /* Punctuation */
.highlight .cm { color: var(--base03) } /* Comment.Multiline */
.highlight .cp { color: var(--base03) } /* Comment.Preproc */
.highlight .c1 { color: var(--base03) } /* Comment.Single */
.highlight .cs { color: var(--base03) } /* Comment.Special */
.highlight .gd { color: var(--base08) } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gh { color: var(--base07); font-weight: bold } /* Generic.Heading */
.highlight .gi { color: var(--base0b) } /* Generic.Inserted */
.highlight .gp { color: var(--base03); font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: var(--base0c); font-weight: bold } /* Generic.Subheading */
.highlight .kc { color: var(--base0e) } /* Keyword.Constant */
.highlight .kd { color: var(--base0e) } /* Keyword.Declaration */
.highlight .kn { color: var(--base0c) } /* Keyword.Namespace */
.highlight .kp { color: var(--base0e) } /* Keyword.Pseudo */
.highlight .kr { color: var(--base0e) } /* Keyword.Reserved */
.highlight .kt { color: var(--base0a) } /* Keyword.Type */
.highlight .ld { color: var(--base0b) } /* Literal.Date */
.highlight .m { color: var(--base09) } /* Literal.Number */
.highlight .s { color: var(--base0b) } /* Literal.String */
.highlight .na { color: var(--base0d) } /* Name.Attribute */
.highlight .nb { color: var(--base07) } /* Name.Builtin */
.highlight .nc { color: var(--base0a) } /* Name.Class */
.highlight .no { color: var(--base08) } /* Name.Constant */
.highlight .nd { color: var(--base0c) } /* Name.Decorator */
.highlight .ni { color: var(--base07) } /* Name.Entity */
.highlight .ne { color: var(--base08) } /* Name.Exception */
.highlight .nf { color: var(--base0d) } /* Name.Function */
.highlight .nl { color: var(--base07) } /* Name.Label */
.highlight .nn { color: var(--base0a) } /* Name.Namespace */
.highlight .nx { color: var(--base0d) } /* Name.Other */
.highlight .py { color: var(--base07) } /* Name.Property */
.highlight .nt { color: var(--base0c) } /* Name.Tag */
.highlight .nv { color: var(--base08) } /* Name.Variable */
.highlight .ow { color: var(--base0c) } /* Operator.Word */
.highlight .w { color: var(--base07) } /* Text.Whitespace */
.highlight .mf { color: var(--base09) } /* Literal.Number.Float */
.highlight .mh { color: var(--base09) } /* Literal.Number.Hex */
.highlight .mi { color: var(--base09) } /* Literal.Number.Integer */
.highlight .mo { color: var(--base09) } /* Literal.Number.Oct */
.highlight .sb { color: var(--base0b) } /* Literal.String.Backtick */
.highlight .sc { color: var(--base07) } /* Literal.String.Char */
.highlight .sd { color: var(--base03) } /* Literal.String.Doc */
.highlight .s2 { color: var(--base0b) } /* Literal.String.Double */
.highlight .se { color: var(--base09) } /* Literal.String.Escape */
.highlight .sh { color: var(--base0b) } /* Literal.String.Heredoc */
.highlight .si { color: var(--base09) } /* Literal.String.Interpol */
.highlight .sx { color: var(--base0b) } /* Literal.String.Other */
.highlight .sr { color: var(--base0b) } /* Literal.String.Regex */
.highlight .s1 { color: var(--base0b) } /* Literal.String.Single */
.highlight .ss { color: var(--base0b) } /* Literal.String.Symbol */
.highlight .bp { color: var(--base07) } /* Name.Builtin.Pseudo */
.highlight .vc { color: var(--base08) } /* Name.Variable.Class */
.highlight .vg { color: var(--base08) } /* Name.Variable.Global */
.highlight .vi { color: var(--base08) } /* Name.Variable.Instance */
.highlight .il { color: var(--base09) } /* Literal.Number.Integer.Long */

508
public/css/style.css Normal file
View File

@ -0,0 +1,508 @@
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700);
/* Base16 Eighties Colorscheme by Chris Kempson (http://chriskempson.com) */
.base00 { color: #2d2d2d; }
.base01 { color: #393939; }
.base02 { color: #515151; }
.base03 { color: #747369; }
.base04 { color: #a09f93; }
.base05 { color: #d3d0c8; }
.base06 { color: #e8e6df; }
.base07 { color: #f2f0ec; }
.base08 { color: #f2777a; }
.base09 { color: #f99157; }
.base0a { color: #ffcc66; }
.base0b { color: #99cc99; }
.base0c { color: #66cccc; }
.base0d { color: #6699cc; }
.base0e { color: #cc99cc; }
.base0f { color: #d27b53; }
/* General Page Layout */
body {
margin: 0;
background-color: #2d2d2d;
color: #f2f0ec;
line-height: 1.5;
font-size: 100%;
font-family: 'Source Code Pro', monospace;
}
.container {
max-width: 52em;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 52em) {
.container {
width: 100%;
}
}
article.single section,
.article-list article {
background-color: #f2f0ec;
color: #2d2d2d;
padding-left: 128px;
padding-left: 8rem;
padding-right: 128px;
padding-right: 8rem;
padding-top: 16px;
padding-top: 1rem;
padding-bottom: 16px;
padding-bottom: 1rem;
}
@media (max-width: 52em) {
article.single section,
.article-list article {
padding-left: 2rem;
padding-right: 2rem;
}
}
header, footer {
background-color: #393939;
padding-top: 16px;
padding-top: 1rem;
padding-bottom: 16px;
padding-bottom: 1rem;
}
header {
margin-top: 16px;
margin-top: 1rem;
margin-bottom: 32px;
margin-bottom: 2rem;
}
@media (max-width: 52em) {
header {
margin-top: 0;
padding-left: 2rem;
padding-right: 2rem;
}
}
footer {
margin-top: 32px;
margin-top: 2rem;
margin-bottom: 16px;
margin-bottom: 1rem;
text-align: center;
font-size: 0.9em;
color: #747369;
}
@media (max-width: 52em) {
footer {
margin-top: 0;
margin-bottom: 0;
}
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
line-height: 1.25;
margin-top: 1em;
margin-bottom: .5em;
}
p {
margin-top: 0;
margin-bottom: 16px;
margin-bottom: 1rem;
}
h1 { font-size: 32px; font-size: 2rem }
h2 { font-size: 24px; font-size: 1.5rem }
h3 { font-size: 20px; font-size: 1.25rem }
h4 { font-size: 16px; font-size: 1rem }
h5 { font-size: 14px; font-size: .875rem }
h6 { font-size: 12px; font-size: .75rem }
pre, code {
font-family: inherit;
font-size: inherit;
}
/* Header Layout */
header a.path {
color: #6699cc;
}
header span.caret {
color: #f2f0ec;
}
/* Footer Layout */
footer a {
color: #747369;
text-decoration: none;
}
/* 404 Page Layout */
.page-not-found h1 {
text-align: center;
font-size: 5em;
}
.page-not-found h2 {
text-align: center;
font-size: 3em;
color: #a09f93;
margin-bottom: 64px;
margin-bottom: 4rem;
}
@media (max-width: 52em) {
.page-not-found h1 {
font-size: 3em;
}
.page-not-found h2 {
font-size: 2em;
}
}
/* Homepage Layout */
@media (max-width: 52em) {
.homepage {
margin-bottom: 2rem;
}
}
.homepage h1.site-title {
text-align: center;
font-size: 5em;
color: #66cccc;
}
@media (max-width: 52em) {
.homepage h1.site-title {
font-size: 3em;
}
}
.homepage h1.headline {
font-size: 3em;
color: #ffcc66;
}
@media (max-width: 52em) {
.homepage h1.headline {
padding-left: 2rem;
padding-right: 2rem;
}
}
.homepage .hero-logo img {
width: 100%;
}
.homepage section.categories,
.homepage section.tags {
padding-left: 32px;
padding-left: 2rem;
padding-right: 32px;
padding-right: 2rem;
}
.homepage .category,
.homepage .category a,
.homepage .tag,
.homepage .tag a {
color: #cc99cc;
}
.homepage .tag {
margin-right: 2em;
}
/* Post List Layout */
.article-list h1.list-title {
font-size: 3em;
color: #ffcc66;
}
.article-list article {
padding-top: 64px;
padding-top: 4rem;
padding-bottom: 64px;
padding-bottom: 4rem;
margin-bottom: 64px;
margin-bottom: 4rem;
}
.article-list article h2.headline,
.article-list article h2.headline a {
margin-top: 0;
color: #6699cc;
}
.article-list article .meta {
margin-bottom: 16px;
margin-bottom: 1rem;
}
.article-list article .meta .key {
color: #747369;
}
.article-list article .meta .val,
.article-list article .meta .val a {
color: #cc99cc;
}
.article-list article section.summary a { color: #d27b53; }
/* Single Post Layout */
article.single .meta {
font-size: 0.9em;
text-align: right;
}
article.single .meta .key {
color: #747369;
}
article.single .meta .val, article.single .meta .val a {
color: #cc99cc;
}
@media (max-width: 52em) {
article.single .meta {
padding-left: 2rem;
padding-right: 2rem;
}
}
article.single h1.headline {
margin-top: 0;
font-size: 3em;
color: #ffcc66;
}
@media (max-width: 52em) {
article.single h1.headline {
padding-left: 2rem;
padding-right: 2rem;
}
}
article.single section.body {
padding-top: 64px;
padding-top: 4rem;
padding-bottom: 48px;
padding-bottom: 3rem;
}
@media (max-width: 52em) {
article.single section.body {
padding-top: 2rem;
padding-bottom: 1rem;
}
}
/* Highlight Colors */
article.single section.body h1 { color: #6699cc; }
article.single section.body h2 { color: #99cc99; }
article.single section.body h3 { color: #f99157; }
article.single section.body h4 { color: #f2777a; }
article.single section.body h5 { color: #515151; }
article.single section.body h6 { color: #747369; }
article.single section.body a { color: #d27b53; }
/* Article Elements */
article.single pre {
margin-top: 0;
margin-bottom: 16px;
margin-bottom: 1rem;
overflow-x: scroll;
border-radius: 3px;
padding: 32px;
padding: 2rem;
}
article.single p code {
padding: 0.2em 0.5em;
border-radius: 3px;
background: #747369;
color: #f2f0ec;
}
article.single figure {
box-sizing: border-box;
max-width: 832px;
max-width: 52rem;
width: 832px;
width: 52rem;
margin-left: -128px;
margin-left: -8rem;
margin-right: -128px;
margin-right: -8rem;
margin-bottom: 16px;
margin-bottom: 1rem;
padding: 1em;
background-color: #393939;
}
@media (max-width: 52em) {
article.single figure {
width: 100%;
margin-left: 0;
margin-right: 0;
border-radius: 3px;
}
}
article.single figure img {
max-width: 100%;
width: 100%;
border-radius: 3px;
}
article.single figure figcaption {
margin-top: 16px;
margin-top: 1rem;
}
article.single figure figcaption h4 {
margin-top: 0;
text-align: center;
font-style: italic;
font-weight: normal;
color: #f2f0ec;
}
article.single table {
border-collapse: separate;
border-spacing: 0;
max-width: 100%;
width: 100%;
}
article.single th,
article.single td {
padding: 4px 16px;
padding: .25rem 1rem;
line-height: inherit;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #a09f93;
}
article.single tr:last-child td {
border-bottom: 0;
}
article.single th {
text-align: left;
font-weight: bold;
vertical-align: bottom;
}
article.single td { vertical-align: top }
article.single blockquote {
margin-left: 32px;
margin-left: 2rem;
margin-right: 48px;
margin-right: 3rem;
padding-left: 16px;
padding-left: 1rem;
border-left: 5px solid #66cccc;
}
article.single hr {
border: 0;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #a09f93;
}
/* Pygments template by Jan T. Sott (https://github.com/idleberg) */
pre { background: #2d2d2d; color: #f2f0ec }
.highlight .hll { background-color: #515151 }
.highlight .c { color: #747369 } /* Comment */
.highlight .err { color: #f2777a } /* Error */
.highlight .k { color: #cc99cc } /* Keyword */
.highlight .l { color: #f99157 } /* Literal */
.highlight .n { color: #f2f0ec } /* Name */
.highlight .o { color: #66cccc } /* Operator */
.highlight .p { color: #f2f0ec } /* Punctuation */
.highlight .cm { color: #747369 } /* Comment.Multiline */
.highlight .cp { color: #747369 } /* Comment.Preproc */
.highlight .c1 { color: #747369 } /* Comment.Single */
.highlight .cs { color: #747369 } /* Comment.Special */
.highlight .gd { color: #f2777a } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gh { color: #f2f0ec; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #99cc99 } /* Generic.Inserted */
.highlight .gp { color: #747369; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #66cccc; font-weight: bold } /* Generic.Subheading */
.highlight .kc { color: #cc99cc } /* Keyword.Constant */
.highlight .kd { color: #cc99cc } /* Keyword.Declaration */
.highlight .kn { color: #66cccc } /* Keyword.Namespace */
.highlight .kp { color: #cc99cc } /* Keyword.Pseudo */
.highlight .kr { color: #cc99cc } /* Keyword.Reserved */
.highlight .kt { color: #ffcc66 } /* Keyword.Type */
.highlight .ld { color: #99cc99 } /* Literal.Date */
.highlight .m { color: #f99157 } /* Literal.Number */
.highlight .s { color: #99cc99 } /* Literal.String */
.highlight .na { color: #6699cc } /* Name.Attribute */
.highlight .nb { color: #f2f0ec } /* Name.Builtin */
.highlight .nc { color: #ffcc66 } /* Name.Class */
.highlight .no { color: #f2777a } /* Name.Constant */
.highlight .nd { color: #66cccc } /* Name.Decorator */
.highlight .ni { color: #f2f0ec } /* Name.Entity */
.highlight .ne { color: #f2777a } /* Name.Exception */
.highlight .nf { color: #6699cc } /* Name.Function */
.highlight .nl { color: #f2f0ec } /* Name.Label */
.highlight .nn { color: #ffcc66 } /* Name.Namespace */
.highlight .nx { color: #6699cc } /* Name.Other */
.highlight .py { color: #f2f0ec } /* Name.Property */
.highlight .nt { color: #66cccc } /* Name.Tag */
.highlight .nv { color: #f2777a } /* Name.Variable */
.highlight .ow { color: #66cccc } /* Operator.Word */
.highlight .w { color: #f2f0ec } /* Text.Whitespace */
.highlight .mf { color: #f99157 } /* Literal.Number.Float */
.highlight .mh { color: #f99157 } /* Literal.Number.Hex */
.highlight .mi { color: #f99157 } /* Literal.Number.Integer */
.highlight .mo { color: #f99157 } /* Literal.Number.Oct */
.highlight .sb { color: #99cc99 } /* Literal.String.Backtick */
.highlight .sc { color: #f2f0ec } /* Literal.String.Char */
.highlight .sd { color: #747369 } /* Literal.String.Doc */
.highlight .s2 { color: #99cc99 } /* Literal.String.Double */
.highlight .se { color: #f99157 } /* Literal.String.Escape */
.highlight .sh { color: #99cc99 } /* Literal.String.Heredoc */
.highlight .si { color: #f99157 } /* Literal.String.Interpol */
.highlight .sx { color: #99cc99 } /* Literal.String.Other */
.highlight .sr { color: #99cc99 } /* Literal.String.Regex */
.highlight .s1 { color: #99cc99 } /* Literal.String.Single */
.highlight .ss { color: #99cc99 } /* Literal.String.Symbol */
.highlight .bp { color: #f2f0ec } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f2777a } /* Name.Variable.Class */
.highlight .vg { color: #f2777a } /* Name.Variable.Global */
.highlight .vi { color: #f2777a } /* Name.Variable.Instance */
.highlight .il { color: #f99157 } /* Literal.Number.Integer.Long */

1
public/css/style.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -0,0 +1,21 @@
<svg width="800" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Base16 Eighties</title>
<line id="base00" x1="025" y1="0" x2="025" y2="720" stroke-width="50" stroke="#2d2d2d" />
<line id="base01" x1="075" y1="0" x2="075" y2="720" stroke-width="50" stroke="#393939" />
<line id="base02" x1="125" y1="0" x2="125" y2="720" stroke-width="50" stroke="#515151" />
<line id="base03" x1="175" y1="0" x2="175" y2="720" stroke-width="50" stroke="#747369" />
<line id="base04" x1="225" y1="0" x2="225" y2="720" stroke-width="50" stroke="#a09f93" />
<line id="base05" x1="275" y1="0" x2="275" y2="720" stroke-width="50" stroke="#d3d0c8" />
<line id="base06" x1="325" y1="0" x2="325" y2="720" stroke-width="50" stroke="#e8e6df" />
<line id="base07" x1="375" y1="0" x2="375" y2="720" stroke-width="50" stroke="#f2f0ec" />
<line id="base08" x1="425" y1="0" x2="425" y2="720" stroke-width="50" stroke="#f2777a" />
<line id="base09" x1="475" y1="0" x2="475" y2="720" stroke-width="50" stroke="#f99157" />
<line id="base0A" x1="525" y1="0" x2="525" y2="720" stroke-width="50" stroke="#ffcc66" />
<line id="base0B" x1="575" y1="0" x2="575" y2="720" stroke-width="50" stroke="#99cc99" />
<line id="base0C" x1="625" y1="0" x2="625" y2="720" stroke-width="50" stroke="#66cccc" />
<line id="base0D" x1="675" y1="0" x2="675" y2="720" stroke-width="50" stroke="#6699cc" />
<line id="base0E" x1="725" y1="0" x2="725" y2="720" stroke-width="50" stroke="#cc99cc" />
<line id="base0F" x1="775" y1="0" x2="775" y2="720" stroke-width="50" stroke="#d27b53" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,206 +1,126 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/" />
<meta property="og:type" content="website" />
<title>
CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<link href="/cgspace-notes/index.xml" rel="alternate" type="application/rss+xml" title="CGSpace Notes" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url( /images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<main role="main" class="homepage">
<h1 class="site-title">
<span class="base05">[</span><span class="base08">b</span><span class="base09">a</span><span class="base0a">s</span><span class="base0b">e</span><span class="base0c">1</span><span class="base0d">6</span><span class="base05">]</span>
<span class="base05"># _</span>
</h1>
<div class="hero-logo">
<img src="/img/base16-eighties.svg">
</div>
<a href="/cgspace-notes/index.xml" class="btn-header btn-subscribe hidden-xs">
<i class="fa fa-rss" aria-hidden="true"></i>
&nbsp;Subscribe
</a>
</section>
</header>
<main class="container">
<div class="article-list">
<article>
<header>
<h2><a href="/cgspace-notes/2016-02/">February, 2016</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2016-02-05T13:18:00&#43;03:00">
Feb 5, 2016
</time>
</div>
</div>
</header>
<div>
2016-02-05 Looking at some DAGRIS data for Abenet Yabowork Lots of issues with spaces, newlines, etc causing the import to fail I noticed we have a very interesting list of countries on CGSpace: Not only are there 49,000 countries, we have some blanks (25)&hellip; Also, lots of things like &ldquo;COTE D`LVOIRE&rdquo; and &ldquo;COTE D IVOIRE&rdquo; 2016-02-06 Found a way to get items with null/empty metadata values from SQL First, find the metadata_field_id for the field you want from the metadatafieldregistry table: dspacetest=# select * from metadatafieldregistry; In this case our country field is 78 Now find all resources with type 2 (item) that have null/empty values for that field: dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value='' OR text_value IS NULL); Then you can find the handle that owns it from its resource_id: dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = '22678'; It&rsquo;s 25 items so editing in the web UI is annoying, let&rsquo;s try SQL!
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-02/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2016-01/">January, 2016</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2016-01-13T13:18:00&#43;03:00">
Jan 13, 2016
</time>
</div>
</div>
</header>
<div>
2016-01-13 Move ILRI collection 10568/12503 from 10568/27869 to 10568/27629 using the move_collections.sh script I wrote last year. I realized it is only necessary to clear the Cocoon cache after moving collections—rather than reindexing—as no metadata has changed, and therefore no search or browse indexes need to be updated. Update GitHub wiki for documentation of maintenance tasks. 2016-01-14 Update CCAFS project identifiers in input-forms.xml Run system updates and restart the server 2016-01-18 Change &ldquo;Extension material&rdquo; to &ldquo;Extension Material&rdquo; in input-forms.xml (a mistake that fell through the cracks when we fixed the others in DSpace 4 era) 2016-01-19 Work on tweaks and updates for the social sharing icons on item pages: add Delicious and Mendeley (from Academicons), make links open in new windows, and set the icon color to the theme&rsquo;s primary color (#157) Tweak date-based facets to show more values in drill-down ranges (#162) Need to remember to clear the Cocoon cache after deployment or else you don&rsquo;t see the new ranges immediately Set up recipe on IFTTT to tweet new items from the CGSpace Atom feed to my twitter account Altmetrics&rsquo; support for Handles is kinda weak, so they can&rsquo;t associate our items with DOIs until they are tweeted or blogged, etc first.
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-01/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2015-12/">December, 2015</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-12-02T13:18:00&#43;03:00">
Dec 2, 2015
</time>
</div>
</div>
</header>
<div>
2015-12-02 Replace lzop with xz in log compression cron jobs on DSpace Test—it uses less space: # cd /home/dspacetest.cgiar.org/log # ls -lh dspace.log.2015-11-18* -rw-rw-r-- 1 tomcat7 tomcat7 2.0M Nov 18 23:59 dspace.log.2015-11-18 -rw-rw-r-- 1 tomcat7 tomcat7 387K Nov 18 23:59 dspace.log.2015-11-18.lzo -rw-rw-r-- 1 tomcat7 tomcat7 169K Nov 18 23:59 dspace.log.2015-11-18.xz I had used lrzip once, but it needs more memory and is harder to use as it requires the lrztar
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2015-12/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2015-11/">November, 2015</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-11-23T17:00:57&#43;03:00">
Nov 23, 2015
</time>
</div>
</div>
</header>
<div>
2015-11-22 CGSpace went down Looks like DSpace exhausted its PostgreSQL connection pool Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 78 For now I have increased the limit from 60 to 90, run updates, and rebooted the server 2015-11-24 CGSpace went down again Getting emails from uptimeRobot and uptimeButler that it&rsquo;s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors Looks like there are still a bunch of idle PostgreSQL connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 96 For some reason the number of idle connections is very high since we upgraded to DSpace 5 2015-11-25 Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config The OAI application requests stylesheets and javascript files with the path /oai/static/css, which gets matched here: # static assets we can load from the file system directly with nginx location ~ /(themes|static|aspects/ReportingSuite) { try_files $uri @tomcat; ...
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2015-11/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
</div>
<nav class="pagination" role="navigation">
<span class="page-number">Page 1 of 1</span>
</nav>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
<div style="text-align: center;">
Add your own "<code>layouts/partials/hero.html</code>" to replace this text.
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
<h1 class="headline">Recent Posts</h1>
<div class="article-list">
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2016-02/">February, 2016</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-02-05">February 05, 2016</time></span>
</div>
<section class="summary">
2016-02-05 Looking at some DAGRIS data for Abenet Yabowork Lots of issues with spaces, newlines, etc causing the import to fail I noticed we have a very interesting list of countries on CGSpace: Not only are there 49,000 countries, we have some blanks (25)&hellip; Also, lots of things like &ldquo;COTE D`LVOIRE&rdquo; and &ldquo;COTE D IVOIRE&rdquo; 2016-02-06 Found a way to get items with null/empty metadata values from SQL First, find the metadata_field_id for the field you want from the metadatafieldregistry table: dspacetest=# select * from metadatafieldregistry; In this case our country field is 78 Now find all resources with type 2 (item) that have null/empty values for that field: dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value='' OR text_value IS NULL); Then you can find the handle that owns it from its resource_id: dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = '22678'; It&rsquo;s 25 items so editing in the web UI is annoying, let&rsquo;s try SQL! <a href="/cgspace-notes/2016-02/">Read More...</a>
</section>
</article>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2016-01/">January, 2016</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-01-13">January 13, 2016</time></span>
</div>
<section class="summary">
2016-01-13 Move ILRI collection 10568/12503 from 10568/27869 to 10568/27629 using the move_collections.sh script I wrote last year. I realized it is only necessary to clear the Cocoon cache after moving collections—rather than reindexing—as no metadata has changed, and therefore no search or browse indexes need to be updated. Update GitHub wiki for documentation of maintenance tasks. 2016-01-14 Update CCAFS project identifiers in input-forms.xml Run system updates and restart the server 2016-01-18 Change &ldquo;Extension material&rdquo; to &ldquo;Extension Material&rdquo; in input-forms.xml (a mistake that fell through the cracks when we fixed the others in DSpace 4 era) 2016-01-19 Work on tweaks and updates for the social sharing icons on item pages: add Delicious and Mendeley (from Academicons), make links open in new windows, and set the icon color to the theme&rsquo;s primary color (#157) Tweak date-based facets to show more values in drill-down ranges (#162) Need to remember to clear the Cocoon cache after deployment or else you don&rsquo;t see the new ranges immediately Set up recipe on IFTTT to tweet new items from the CGSpace Atom feed to my twitter account Altmetrics&rsquo; support for Handles is kinda weak, so they can&rsquo;t associate our items with DOIs until they are tweeted or blogged, etc first. <a href="/cgspace-notes/2016-01/">Read More...</a>
</section>
</article>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2015-12/">December, 2015</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2015-12-02">December 02, 2015</time></span>
</div>
<section class="summary">
2015-12-02 Replace lzop with xz in log compression cron jobs on DSpace Test—it uses less space: # cd /home/dspacetest.cgiar.org/log # ls -lh dspace.log.2015-11-18* -rw-rw-r-- 1 tomcat7 tomcat7 2.0M Nov 18 23:59 dspace.log.2015-11-18 -rw-rw-r-- 1 tomcat7 tomcat7 387K Nov 18 23:59 dspace.log.2015-11-18.lzo -rw-rw-r-- 1 tomcat7 tomcat7 169K Nov 18 23:59 dspace.log.2015-11-18.xz I had used lrzip once, but it needs more memory and is harder to use as it requires the lrztar <a href="/cgspace-notes/2015-12/">Read More...</a>
</section>
</article>
</div>
<h1 class="headline">Tags</h1>
<section class="tags">
<span class="tag">
<a href="/cgspace-notes/tags/notes">notes</a>
<small>(4)</small>
</span>
</section>
</main>
</div>
<footer>
<div class="container">
<span class="copyright">&copy; 2016 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
</footer>
</body>
</html>

View File

@ -70,7 +70,45 @@ DELETE 25
&lt;li&gt;Hmm, I indexed, cleared the Cocoon cache, and restarted Tomcat but the 25 &amp;ldquo;|||&amp;rdquo; countries are still there&lt;/li&gt;
&lt;li&gt;Maybe I need to do a full re-index&amp;hellip;&lt;/li&gt;
&lt;li&gt;Yep! The full re-index seems to work.&lt;/li&gt;
&lt;li&gt;Process the empty countries on CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-07:124a59adbaa8ef13e1518d003fc03981&#34;&gt;2016-02-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Working on cleaning up Abenet&amp;rsquo;s DAGRIS data with OpenRefine&lt;/li&gt;
&lt;li&gt;I discovered two really nice functions in OpenRefine: &lt;code&gt;value.trim()&lt;/code&gt; and &lt;code&gt;value.escape(&amp;quot;javascript&amp;quot;)&lt;/code&gt; which shows whitespace characters like &lt;code&gt;\r\n&lt;/code&gt;!&lt;/li&gt;
&lt;li&gt;For some reason when you import an Excel file into OpenRefine it exports dates like 1949 to 1949.0 in the CSV&lt;/li&gt;
&lt;li&gt;I re-import the resulting CSV and run a GREL on the date issued column: &lt;code&gt;value.replace(&amp;quot;\.0&amp;quot;, &amp;quot;&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I need to start running DSpace in Mac OS X instead of a Linux VM&lt;/li&gt;
&lt;li&gt;Install PostgreSQL from homebrew and configure:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ postgres -D /opt/brew/var/postgres
$ createuser --pwprompt dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After building and running a &lt;code&gt;fresh_install&lt;/code&gt; I symlinked the webapps into Tomcat&amp;rsquo;s webapps folder:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ mv /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT.orig
$ ln -sfv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT
$ ln -sfv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/rest
$ ln -sfv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/jspui
$ ln -sfv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/oai
$ ln -sfv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/solr
$ /opt/brew/Cellar/tomcat/8.0.30/bin/catalina start
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Add CATALINA_OPTS in &lt;code&gt;/opt/brew/Cellar/tomcat/8.0.30/libexec/bin/setenv.sh&lt;/code&gt;, as this script is sourced by the &lt;code&gt;catalina&lt;/code&gt; startup script&lt;/li&gt;
&lt;li&gt;For example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;CATALINA_OPTS=&amp;quot;-Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
</item>

1
public/robots.txt Normal file
View File

@ -0,0 +1 @@
User-agent: *

View File

@ -1,197 +1,101 @@
<!DOCTYPE html>
<html lang="en-us">
<head prefix="og: http://ogp.me/ns#">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
<meta property="og:title" content=" Notes &middot; CGSpace Notes" />
<meta property="og:site_name" content="CGSpace Notes" />
<meta property="og:url" content="/cgspace-notes/tags/notes/" />
<meta property="og:type" content="website" />
<title>
Notes &middot; CGSpace Notes
</title>
<link rel="stylesheet" href="/cgspace-notes/css/bootstrap.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/main.css" />
<link rel="stylesheet" href="/cgspace-notes/css/font-awesome.min.css" />
<link rel="stylesheet" href="/cgspace-notes/css/github.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400" type="text/css">
<link rel="shortcut icon" href="/cgspace-notes/images/favicon.ico" />
<link rel="apple-touch-icon" href="/cgspace-notes/images/apple-touch-icon.png" />
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Alan Orth">
<meta name="generator" content="Hugo 0.16-DEV" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="CGSpace Notes">
<title>Notes - CGSpace Notes</title>
</head>
<body>
<header class="global-header" style="background-image:url( /images/bg.jpg )">
<section class="header-text">
<h1><a href="/cgspace-notes/">CGSpace Notes</a></h1>
<div class="sns-links hidden-print">
<header>
<div class="container">
<a class="path" href="/cgspace-notes/">[CGSpace Notes]</a>
<span class="caret"># _</span>
</div>
</header>
<div class="container">
<main role="main" class="article-list">
<h1 class="list-title">Notes</h1>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2016-02/">February, 2016</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-02-05">February 05, 2016</time></span>
</div>
<section class="summary">
2016-02-05 Looking at some DAGRIS data for Abenet Yabowork Lots of issues with spaces, newlines, etc causing the import to fail I noticed we have a very interesting list of countries on CGSpace: Not only are there 49,000 countries, we have some blanks (25)&hellip; Also, lots of things like &ldquo;COTE D`LVOIRE&rdquo; and &ldquo;COTE D IVOIRE&rdquo; 2016-02-06 Found a way to get items with null/empty metadata values from SQL First, find the metadata_field_id for the field you want from the metadatafieldregistry table: dspacetest=# select * from metadatafieldregistry; In this case our country field is 78 Now find all resources with type 2 (item) that have null/empty values for that field: dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value='' OR text_value IS NULL); Then you can find the handle that owns it from its resource_id: dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = '22678'; It&rsquo;s 25 items so editing in the web UI is annoying, let&rsquo;s try SQL! <a href="/cgspace-notes/2016-02/">Read More...</a>
</section>
</article>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2016-01/">January, 2016</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2016-01-13">January 13, 2016</time></span>
</div>
<section class="summary">
2016-01-13 Move ILRI collection 10568/12503 from 10568/27869 to 10568/27629 using the move_collections.sh script I wrote last year. I realized it is only necessary to clear the Cocoon cache after moving collections—rather than reindexing—as no metadata has changed, and therefore no search or browse indexes need to be updated. Update GitHub wiki for documentation of maintenance tasks. 2016-01-14 Update CCAFS project identifiers in input-forms.xml Run system updates and restart the server 2016-01-18 Change &ldquo;Extension material&rdquo; to &ldquo;Extension Material&rdquo; in input-forms.xml (a mistake that fell through the cracks when we fixed the others in DSpace 4 era) 2016-01-19 Work on tweaks and updates for the social sharing icons on item pages: add Delicious and Mendeley (from Academicons), make links open in new windows, and set the icon color to the theme&rsquo;s primary color (#157) Tweak date-based facets to show more values in drill-down ranges (#162) Need to remember to clear the Cocoon cache after deployment or else you don&rsquo;t see the new ranges immediately Set up recipe on IFTTT to tweet new items from the CGSpace Atom feed to my twitter account Altmetrics&rsquo; support for Handles is kinda weak, so they can&rsquo;t associate our items with DOIs until they are tweeted or blogged, etc first. <a href="/cgspace-notes/2016-01/">Read More...</a>
</section>
</article>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2015-12/">December, 2015</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2015-12-02">December 02, 2015</time></span>
</div>
<section class="summary">
2015-12-02 Replace lzop with xz in log compression cron jobs on DSpace Test—it uses less space: # cd /home/dspacetest.cgiar.org/log # ls -lh dspace.log.2015-11-18* -rw-rw-r-- 1 tomcat7 tomcat7 2.0M Nov 18 23:59 dspace.log.2015-11-18 -rw-rw-r-- 1 tomcat7 tomcat7 387K Nov 18 23:59 dspace.log.2015-11-18.lzo -rw-rw-r-- 1 tomcat7 tomcat7 169K Nov 18 23:59 dspace.log.2015-11-18.xz I had used lrzip once, but it needs more memory and is harder to use as it requires the lrztar <a href="/cgspace-notes/2015-12/">Read More...</a>
</section>
</article>
<article class="list-item" itemscope itemtype="http://schema.org/Blog">
<h2 class="headline" itemprop="headline"><a href="/cgspace-notes/2015-11/">November, 2015</a></h2>
<div class="meta">
<span class="key">published on</span>
<span class="val"><time itemprop="datePublished" datetime="2015-11-23">November 23, 2015</time></span>
</div>
<section class="summary">
2015-11-22 CGSpace went down Looks like DSpace exhausted its PostgreSQL connection pool Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 78 For now I have increased the limit from 60 to 90, run updates, and rebooted the server 2015-11-24 CGSpace went down again Getting emails from uptimeRobot and uptimeButler that it&rsquo;s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors Looks like there are still a bunch of idle PostgreSQL connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 96 For some reason the number of idle connections is very high since we upgraded to DSpace 5 2015-11-25 Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config The OAI application requests stylesheets and javascript files with the path /oai/static/css, which gets matched here: # static assets we can load from the file system directly with nginx location ~ /(themes|static|aspects/ReportingSuite) { try_files $uri @tomcat; ... <a href="/cgspace-notes/2015-11/">Read More...</a>
</section>
</article>
</main>
</div>
<a href="/cgspace-notes/" class="btn-header btn-back hidden-xs">
<i class="fa fa-angle-left" aria-hidden="true"></i>
&nbsp;Home
</a>
<a href="/cgspace-notes/tags/notes/index.xml" class="btn-header btn-subscribe hidden-xs">
<i class="fa fa-rss" aria-hidden="true"></i>
&nbsp;Subscribe
</a>
</section>
</header>
<main class="container">
<section class="article-list">
<h1>Notes</h1>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2016-02/">February, 2016</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2016-02-05T13:18:00&#43;03:00">
Feb 5, 2016
</time>
</div>
</div>
</header>
<div>
2016-02-05 Looking at some DAGRIS data for Abenet Yabowork Lots of issues with spaces, newlines, etc causing the import to fail I noticed we have a very interesting list of countries on CGSpace: Not only are there 49,000 countries, we have some blanks (25)&hellip; Also, lots of things like &ldquo;COTE D`LVOIRE&rdquo; and &ldquo;COTE D IVOIRE&rdquo; 2016-02-06 Found a way to get items with null/empty metadata values from SQL First, find the metadata_field_id for the field you want from the metadatafieldregistry table: dspacetest=# select * from metadatafieldregistry; In this case our country field is 78 Now find all resources with type 2 (item) that have null/empty values for that field: dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value='' OR text_value IS NULL); Then you can find the handle that owns it from its resource_id: dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = '22678'; It&rsquo;s 25 items so editing in the web UI is annoying, let&rsquo;s try SQL!
<footer>
<div class="container">
<span class="copyright">&copy; 2016 CGSpace Notes - <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></span>
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-02/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
</footer>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2016-01/">January, 2016</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2016-01-13T13:18:00&#43;03:00">
Jan 13, 2016
</time>
</div>
</div>
</header>
<div>
2016-01-13 Move ILRI collection 10568/12503 from 10568/27869 to 10568/27629 using the move_collections.sh script I wrote last year. I realized it is only necessary to clear the Cocoon cache after moving collections—rather than reindexing—as no metadata has changed, and therefore no search or browse indexes need to be updated. Update GitHub wiki for documentation of maintenance tasks. 2016-01-14 Update CCAFS project identifiers in input-forms.xml Run system updates and restart the server 2016-01-18 Change &ldquo;Extension material&rdquo; to &ldquo;Extension Material&rdquo; in input-forms.xml (a mistake that fell through the cracks when we fixed the others in DSpace 4 era) 2016-01-19 Work on tweaks and updates for the social sharing icons on item pages: add Delicious and Mendeley (from Academicons), make links open in new windows, and set the icon color to the theme&rsquo;s primary color (#157) Tweak date-based facets to show more values in drill-down ranges (#162) Need to remember to clear the Cocoon cache after deployment or else you don&rsquo;t see the new ranges immediately Set up recipe on IFTTT to tweet new items from the CGSpace Atom feed to my twitter account Altmetrics&rsquo; support for Handles is kinda weak, so they can&rsquo;t associate our items with DOIs until they are tweeted or blogged, etc first.
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-01/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2015-12/">December, 2015</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-12-02T13:18:00&#43;03:00">
Dec 2, 2015
</time>
</div>
</div>
</header>
<div>
2015-12-02 Replace lzop with xz in log compression cron jobs on DSpace Test—it uses less space: # cd /home/dspacetest.cgiar.org/log # ls -lh dspace.log.2015-11-18* -rw-rw-r-- 1 tomcat7 tomcat7 2.0M Nov 18 23:59 dspace.log.2015-11-18 -rw-rw-r-- 1 tomcat7 tomcat7 387K Nov 18 23:59 dspace.log.2015-11-18.lzo -rw-rw-r-- 1 tomcat7 tomcat7 169K Nov 18 23:59 dspace.log.2015-11-18.xz I had used lrzip once, but it needs more memory and is harder to use as it requires the lrztar
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2015-12/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
<hr/>
<article>
<header>
<h2><a href="/cgspace-notes/2015-11/">November, 2015</a></h2>
<div class="post-meta clearfix">
<div class="post-date pull-left">
Posted on
<time datetime="2015-11-23T17:00:57&#43;03:00">
Nov 23, 2015
</time>
</div>
</div>
</header>
<div>
2015-11-22 CGSpace went down Looks like DSpace exhausted its PostgreSQL connection pool Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 78 For now I have increased the limit from 60 to 90, run updates, and rebooted the server 2015-11-24 CGSpace went down again Getting emails from uptimeRobot and uptimeButler that it&rsquo;s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors Looks like there are still a bunch of idle PostgreSQL connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 96 For some reason the number of idle connections is very high since we upgraded to DSpace 5 2015-11-25 Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config The OAI application requests stylesheets and javascript files with the path /oai/static/css, which gets matched here: # static assets we can load from the file system directly with nginx location ~ /(themes|static|aspects/ReportingSuite) { try_files $uri @tomcat; ...
</div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2015-11/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article>
</section>
</main>
<footer class="container global-footer">
<div class="copyright-note pull-left">
</div>
<div class="sns-links hidden-print">
</div>
</footer>
<script src="/cgspace-notes/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

View File

@ -70,7 +70,45 @@ DELETE 25
&lt;li&gt;Hmm, I indexed, cleared the Cocoon cache, and restarted Tomcat but the 25 &amp;ldquo;|||&amp;rdquo; countries are still there&lt;/li&gt;
&lt;li&gt;Maybe I need to do a full re-index&amp;hellip;&lt;/li&gt;
&lt;li&gt;Yep! The full re-index seems to work.&lt;/li&gt;
&lt;li&gt;Process the empty countries on CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-07:124a59adbaa8ef13e1518d003fc03981&#34;&gt;2016-02-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Working on cleaning up Abenet&amp;rsquo;s DAGRIS data with OpenRefine&lt;/li&gt;
&lt;li&gt;I discovered two really nice functions in OpenRefine: &lt;code&gt;value.trim()&lt;/code&gt; and &lt;code&gt;value.escape(&amp;quot;javascript&amp;quot;)&lt;/code&gt; which shows whitespace characters like &lt;code&gt;\r\n&lt;/code&gt;!&lt;/li&gt;
&lt;li&gt;For some reason when you import an Excel file into OpenRefine it exports dates like 1949 to 1949.0 in the CSV&lt;/li&gt;
&lt;li&gt;I re-import the resulting CSV and run a GREL on the date issued column: &lt;code&gt;value.replace(&amp;quot;\.0&amp;quot;, &amp;quot;&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I need to start running DSpace in Mac OS X instead of a Linux VM&lt;/li&gt;
&lt;li&gt;Install PostgreSQL from homebrew and configure:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ postgres -D /opt/brew/var/postgres
$ createuser --pwprompt dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After building and running a &lt;code&gt;fresh_install&lt;/code&gt; I symlinked the webapps into Tomcat&amp;rsquo;s webapps folder:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ mv /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT.orig
$ ln -sfv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT
$ ln -sfv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/rest
$ ln -sfv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/jspui
$ ln -sfv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/oai
$ ln -sfv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/solr
$ /opt/brew/Cellar/tomcat/8.0.30/bin/catalina start
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Add CATALINA_OPTS in &lt;code&gt;/opt/brew/Cellar/tomcat/8.0.30/libexec/bin/setenv.sh&lt;/code&gt;, as this script is sourced by the &lt;code&gt;catalina&lt;/code&gt; startup script&lt;/li&gt;
&lt;li&gt;For example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;CATALINA_OPTS=&amp;quot;-Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
</item>