From 9705b3e85fcabe694e5c7bcb4f4995be437e6eed Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 22 May 2017 23:23:16 +0300 Subject: [PATCH] Add notes for 2017-05-22 --- content/post/2017-05.md | 43 ++++++++++++++++++++++++ public/2015-11/index.html | 2 +- public/2015-12/index.html | 2 +- public/2016-01/index.html | 2 +- public/2016-02/index.html | 2 +- public/2016-03/index.html | 2 +- public/2016-04/index.html | 2 +- public/2016-05/index.html | 2 +- public/2016-06/index.html | 2 +- public/2016-07/index.html | 2 +- public/2016-08/index.html | 2 +- public/2016-09/index.html | 2 +- public/2016-10/index.html | 2 +- public/2016-11/index.html | 2 +- public/2016-12/index.html | 2 +- public/2017-01/index.html | 2 +- public/2017-02/index.html | 2 +- public/2017-03/index.html | 2 +- public/2017-04/index.html | 2 +- public/2017-05/index.html | 52 +++++++++++++++++++++++++++-- public/index.html | 2 +- public/page/2/index.html | 2 +- public/post/index.html | 2 +- public/post/page/2/index.html | 2 +- public/tags/notes/index.html | 2 +- public/tags/notes/page/2/index.html | 2 +- 26 files changed, 117 insertions(+), 26 deletions(-) diff --git a/content/post/2017-05.md b/content/post/2017-05.md index 123b8f768..2ec781e6a 100644 --- a/content/post/2017-05.md +++ b/content/post/2017-05.md @@ -194,3 +194,46 @@ dspace=# select setval('handle_seq',86873); ``` - After that I can create collections just fine, though I'm not sure if it has other side effects + +## 2017-05-21 + +- Start creating a basic theme for the CGIAR System Organization's community on CGSpace +- Using colors from the [CGIAR Branding guidelines (2014)](http://library.cgiar.org/handle/10947/2699) +- Make a GitHub issue to track this work: [#324](https://github.com/ilri/DSpace/issues/324) + +## 2017-05-22 + +- Do some cleanups of community and collection names in CGIAR System Management Office community on DSpace Test, as well as move some items as Peter requested +- Peter wanted a list of authors in here, so I generated a list of collections using the "View Source" on each community and this hacky awk: + +``` +$ grep 10947/ /tmp/collections | grep -v cocoon | awk -F/ '{print $3"/"$4}' | awk -F\" '{print $1}' | vim - +``` + +- Then I joined them together and ran this old SQL query from the dspace-tech mailing list which gives you authors for items in those collections: + +``` +dspace=# select distinct text_value +from metadatavalue +where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = 'contributor' and qualifier = 'author') +AND resource_type_id = 2 +AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in ('10947/2', '10947/3', '10947/1 +0', '10947/4', '10947/5', '10947/6', '10947/7', '10947/8', '10947/9', '10947/11', '10947/25', '10947/12', '10947/26', '10947/27', '10947/28', '10947/29', '109 +47/30', '10947/13', '10947/14', '10947/15', '10947/16', '10947/31', '10947/32', '10947/33', '10947/34', '10947/35', '10947/36', '10947/37', '10947/17', '10947 +/18', '10947/38', '10947/19', '10947/39', '10947/40', '10947/41', '10947/42', '10947/43', '10947/2512', '10947/44', '10947/20', '10947/21', '10947/45', '10947 +/46', '10947/47', '10947/48', '10947/49', '10947/22', '10947/23', '10947/24', '10947/50', '10947/51', '10947/2518', '10947/2776', '10947/2790', '10947/2521', +'10947/2522', '10947/2782', '10947/2525', '10947/2836', '10947/2524', '10947/2878', '10947/2520', '10947/2523', '10947/2786', '10947/2631', '10947/2589', '109 +47/2519', '10947/2708', '10947/2526', '10947/2871', '10947/2527', '10947/4467', '10947/3457', '10947/2528', '10947/2529', '10947/2533', '10947/2530', '10947/2 +531', '10947/2532', '10947/2538', '10947/2534', '10947/2540', '10947/2900', '10947/2539', '10947/2784', '10947/2536', '10947/2805', '10947/2541', '10947/2535' +, '10947/2537', '10568/93761'))); +``` + +- To get a CSV (with counts) from that: + +``` +dspace=# \copy (select distinct text_value, count(*) +from metadatavalue +where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = 'contributor' and qualifier = 'author') +AND resource_type_id = 2 +AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in ('10947/2', '10947/3', '10947/10', '10947/4', '10947/5', '10947/6', '10947/7', '10947/8', '10947/9', '10947/11', '10947/25', '10947/12', '10947/26', '10947/27', '10947/28', '10947/29', '10947/30', '10947/13', '10947/14', '10947/15', '10947/16', '10947/31', '10947/32', '10947/33', '10947/34', '10947/35', '10947/36', '10947/37', '10947/17', '10947/18', '10947/38', '10947/19', '10947/39', '10947/40', '10947/41', '10947/42', '10947/43', '10947/2512', '10947/44', '10947/20', '10947/21', '10947/45', '10947/46', '10947/47', '10947/48', '10947/49', '10947/22', '10947/23', '10947/24', '10947/50', '10947/51', '10947/2518', '10947/2776', '10947/2790', '10947/2521', '10947/2522', '10947/2782', '10947/2525', '10947/2836', '10947/2524', '10947/2878', '10947/2520', '10947/2523', '10947/2786', '10947/2631', '10947/2589', '10947/2519', '10947/2708', '10947/2526', '10947/2871', '10947/2527', '10947/4467', '10947/3457', '10947/2528', '10947/2529', '10947/2533', '10947/2530', '10947/2531', '10947/2532', '10947/2538', '10947/2534', '10947/2540', '10947/2900', '10947/2539', '10947/2784', '10947/2536', '10947/2805', '10947/2541', '10947/2535', '10947/2537', '10568/93761'))) group by text_value order by count desc) to /tmp/cgiar-librar-authors.csv with csv; +``` diff --git a/public/2015-11/index.html b/public/2015-11/index.html index df11fd020..f9d099e36 100644 --- a/public/2015-11/index.html +++ b/public/2015-11/index.html @@ -59,7 +59,7 @@ $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspac "/> - + diff --git a/public/2015-12/index.html b/public/2015-12/index.html index 4b2bd06a2..5440d12d8 100644 --- a/public/2015-12/index.html +++ b/public/2015-12/index.html @@ -61,7 +61,7 @@ Replace lzop with xz in log compression cron jobs on DSpace Test—it uses less "/> - + diff --git a/public/2016-01/index.html b/public/2016-01/index.html index 7e9406ee7..7589f2a6a 100644 --- a/public/2016-01/index.html +++ b/public/2016-01/index.html @@ -51,7 +51,7 @@ Update GitHub wiki for documentation of maintenance tasks. "/> - + diff --git a/public/2016-02/index.html b/public/2016-02/index.html index 38521df86..58f3305b4 100644 --- a/public/2016-02/index.html +++ b/public/2016-02/index.html @@ -65,7 +65,7 @@ Also, lots of things like “COTE D`LVOIRE” and “COTE D IVOIRE&r "/> - + diff --git a/public/2016-03/index.html b/public/2016-03/index.html index bfe07fa78..1d8f73d45 100644 --- a/public/2016-03/index.html +++ b/public/2016-03/index.html @@ -51,7 +51,7 @@ Reinstall my local (Mac OS X) DSpace stack with Tomcat 7, PostgreSQL 9.3, and Ja "/> - + diff --git a/public/2016-04/index.html b/public/2016-04/index.html index 3d152afbf..dbe8af7b6 100644 --- a/public/2016-04/index.html +++ b/public/2016-04/index.html @@ -55,7 +55,7 @@ Also, I noticed the checker log has some errors we should pay attention to: "/> - + diff --git a/public/2016-05/index.html b/public/2016-05/index.html index 154f08f30..98883949d 100644 --- a/public/2016-05/index.html +++ b/public/2016-05/index.html @@ -59,7 +59,7 @@ There are 3,000 IPs accessing the REST API in a 24-hour period! "/> - + diff --git a/public/2016-06/index.html b/public/2016-06/index.html index 361e2c5a3..1d23d7f25 100644 --- a/public/2016-06/index.html +++ b/public/2016-06/index.html @@ -57,7 +57,7 @@ Working on second phase of metadata migration, looks like this will work for mov "/> - + diff --git a/public/2016-07/index.html b/public/2016-07/index.html index 4d058f85a..b6b9b1f5c 100644 --- a/public/2016-07/index.html +++ b/public/2016-07/index.html @@ -73,7 +73,7 @@ In this case the select query was showing 95 results before the update "/> - + diff --git a/public/2016-08/index.html b/public/2016-08/index.html index 775518ef0..4f5c57f69 100644 --- a/public/2016-08/index.html +++ b/public/2016-08/index.html @@ -67,7 +67,7 @@ $ git rebase -i dspace-5.5 "/> - + diff --git a/public/2016-09/index.html b/public/2016-09/index.html index a88508d66..e1d7a25ed 100644 --- a/public/2016-09/index.html +++ b/public/2016-09/index.html @@ -59,7 +59,7 @@ $ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b "dc=cgiarad,dc=or "/> - + diff --git a/public/2016-10/index.html b/public/2016-10/index.html index 189f73008..6bbe5c163 100644 --- a/public/2016-10/index.html +++ b/public/2016-10/index.html @@ -67,7 +67,7 @@ I exported a random item’s metadata as CSV, deleted all columns except id "/> - + diff --git a/public/2016-11/index.html b/public/2016-11/index.html index 8dcdbb22a..db58e62e1 100644 --- a/public/2016-11/index.html +++ b/public/2016-11/index.html @@ -51,7 +51,7 @@ Add dc.type to the output options for Atmire’s Listings and Reports module "/> - + diff --git a/public/2016-12/index.html b/public/2016-12/index.html index 7e4677a8d..d6aad9912 100644 --- a/public/2016-12/index.html +++ b/public/2016-12/index.html @@ -75,7 +75,7 @@ Another worrying error from dspace.log is: "/> - + diff --git a/public/2017-01/index.html b/public/2017-01/index.html index 9bcf98052..4ba3a2254 100644 --- a/public/2017-01/index.html +++ b/public/2017-01/index.html @@ -51,7 +51,7 @@ I asked on the dspace-tech mailing list because it seems to be broken, and actua "/> - + diff --git a/public/2017-02/index.html b/public/2017-02/index.html index 699ec970b..4b3f4f622 100644 --- a/public/2017-02/index.html +++ b/public/2017-02/index.html @@ -79,7 +79,7 @@ Looks like we’ll be using cg.identifier.ccafsprojectpii as the field name "/> - + diff --git a/public/2017-03/index.html b/public/2017-03/index.html index 480ad17fe..9bb04daac 100644 --- a/public/2017-03/index.html +++ b/public/2017-03/index.html @@ -83,7 +83,7 @@ $ identify ~/Desktop/alc_contrastes_desafios.jpg "/> - + diff --git a/public/2017-04/index.html b/public/2017-04/index.html index 6a4f00611..c70d7bf3f 100644 --- a/public/2017-04/index.html +++ b/public/2017-04/index.html @@ -69,7 +69,7 @@ $ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Th "/> - + diff --git a/public/2017-05/index.html b/public/2017-05/index.html index 4c755d23d..a07370198 100644 --- a/public/2017-05/index.html +++ b/public/2017-05/index.html @@ -35,7 +35,7 @@ - + @@ -45,7 +45,7 @@ "@type": "BlogPosting", "headline": "May, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-05/", - "wordCount": "1479", + "wordCount": "1903", "datePublished": "2017-05-01T16:21:52+02:00", "dateModified": "2017-05-19T20:49:22+03:00", "author": { @@ -349,6 +349,54 @@ $ for item in /home/aorth/10947-1/ITEM@10947-*; do [dspace]/bin/dspace packager
  • After that I can create collections just fine, though I’m not sure if it has other side effects
  • +

    2017-05-21

    + + + +

    2017-05-22

    + + + +
    $ grep 10947/ /tmp/collections | grep -v cocoon | awk -F/ '{print $3"/"$4}' | awk -F\" '{print $1}' | vim -
    +
    + + + +
    dspace=# select distinct text_value
    +from metadatavalue
    +where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = 'contributor' and qualifier = 'author')
    +AND resource_type_id = 2
    +AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in ('10947/2', '10947/3', '10947/1
    +0', '10947/4', '10947/5', '10947/6', '10947/7', '10947/8', '10947/9', '10947/11', '10947/25', '10947/12', '10947/26', '10947/27', '10947/28', '10947/29', '109
    +47/30', '10947/13', '10947/14', '10947/15', '10947/16', '10947/31', '10947/32', '10947/33', '10947/34', '10947/35', '10947/36', '10947/37', '10947/17', '10947
    +/18', '10947/38', '10947/19', '10947/39', '10947/40', '10947/41', '10947/42', '10947/43', '10947/2512', '10947/44', '10947/20', '10947/21', '10947/45', '10947
    +/46', '10947/47', '10947/48', '10947/49', '10947/22', '10947/23', '10947/24', '10947/50', '10947/51', '10947/2518', '10947/2776', '10947/2790', '10947/2521',
    +'10947/2522', '10947/2782', '10947/2525', '10947/2836', '10947/2524', '10947/2878', '10947/2520', '10947/2523', '10947/2786', '10947/2631', '10947/2589', '109
    +47/2519', '10947/2708', '10947/2526', '10947/2871', '10947/2527', '10947/4467', '10947/3457', '10947/2528', '10947/2529', '10947/2533', '10947/2530', '10947/2
    +531', '10947/2532', '10947/2538', '10947/2534', '10947/2540', '10947/2900', '10947/2539', '10947/2784', '10947/2536', '10947/2805', '10947/2541', '10947/2535'
    +, '10947/2537', '10568/93761')));
    +
    + + + +
    dspace=# \copy (select distinct text_value, count(*)
    +from metadatavalue
    +where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = 'contributor' and qualifier = 'author')
    +AND resource_type_id = 2
    +AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in ('10947/2', '10947/3', '10947/10', '10947/4', '10947/5', '10947/6', '10947/7', '10947/8', '10947/9', '10947/11', '10947/25', '10947/12', '10947/26', '10947/27', '10947/28', '10947/29', '10947/30', '10947/13', '10947/14', '10947/15', '10947/16', '10947/31', '10947/32', '10947/33', '10947/34', '10947/35', '10947/36', '10947/37', '10947/17', '10947/18', '10947/38', '10947/19', '10947/39', '10947/40', '10947/41', '10947/42', '10947/43', '10947/2512', '10947/44', '10947/20', '10947/21', '10947/45', '10947/46', '10947/47', '10947/48', '10947/49', '10947/22', '10947/23', '10947/24', '10947/50', '10947/51', '10947/2518', '10947/2776', '10947/2790', '10947/2521', '10947/2522', '10947/2782', '10947/2525', '10947/2836', '10947/2524', '10947/2878', '10947/2520', '10947/2523', '10947/2786', '10947/2631', '10947/2589', '10947/2519', '10947/2708', '10947/2526', '10947/2871', '10947/2527', '10947/4467', '10947/3457', '10947/2528', '10947/2529', '10947/2533', '10947/2530', '10947/2531', '10947/2532', '10947/2538', '10947/2534', '10947/2540', '10947/2900', '10947/2539', '10947/2784', '10947/2536', '10947/2805', '10947/2541', '10947/2535', '10947/2537', '10568/93761'))) group by text_value order by count desc) to /tmp/cgiar-librar-authors.csv with csv;
    +
    + diff --git a/public/index.html b/public/index.html index 58ffe5594..6f0ef9eb7 100644 --- a/public/index.html +++ b/public/index.html @@ -23,7 +23,7 @@ - + diff --git a/public/page/2/index.html b/public/page/2/index.html index 4b8c25890..3475b0c77 100644 --- a/public/page/2/index.html +++ b/public/page/2/index.html @@ -23,7 +23,7 @@ - + diff --git a/public/post/index.html b/public/post/index.html index 13eb2fcd8..450874f5f 100644 --- a/public/post/index.html +++ b/public/post/index.html @@ -23,7 +23,7 @@ - + diff --git a/public/post/page/2/index.html b/public/post/page/2/index.html index 868d49d80..eaa36d3aa 100644 --- a/public/post/page/2/index.html +++ b/public/post/page/2/index.html @@ -23,7 +23,7 @@ - + diff --git a/public/tags/notes/index.html b/public/tags/notes/index.html index 2cc6535de..632e81e69 100644 --- a/public/tags/notes/index.html +++ b/public/tags/notes/index.html @@ -23,7 +23,7 @@ - + diff --git a/public/tags/notes/page/2/index.html b/public/tags/notes/page/2/index.html index e4018a9c9..a6fc38264 100644 --- a/public/tags/notes/page/2/index.html +++ b/public/tags/notes/page/2/index.html @@ -23,7 +23,7 @@ - +