<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: eprints]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?eprints</link>
<description></description>
<pubDate>Sun, 17 Nov 2013 12:12:12 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[eprints]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?eprints</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#documents_with_departments_and_security_settings">Dobrica Pavlinušić's random unstructured stuff (Documents with departments and security settings)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Documents with departments and security settings} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#update_access_to_staffonly">Dobrica Pavlinušić's random unstructured stuff (Update access to staffonly)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Update access to staffonly} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#repository">Dobrica Pavlinušić's random unstructured stuff (Repository)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Repository} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#backup">Dobrica Pavlinušić's random unstructured stuff (backup)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] backup} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#restore">Dobrica Pavlinušić's random unstructured stuff (restore)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] restore} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#importing_from_other_data_source">Dobrica Pavlinušić's random unstructured stuff (importing from other data source)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] importing from other data source} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hash_in_export_filters_with_multilang_fields">Dobrica Pavlinušić's random unstructured stuff (HASH in export filters with multilang fields)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] HASH in export filters with multilang fields} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#rest_api">Dobrica Pavlinušić's random unstructured stuff (REST API)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] REST API} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fix_search_with_accented_characters_using_backport_from_git">Dobrica Pavlinušić's random unstructured stuff (Fix search with accented characters using backport from git)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Fix search with accented characters using backport from git} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="documents_with_departments_and_security_settings">Documents with departments and security settings</h1>
<pre>
select
 archive.eprintid,department,security
from archive,document
where document.eprintid = archive.eprintid and department like '%informacijske%';
</pre>
<br /><h1 id="update_access_to_staffonly">Update access to <tt>staffonly</tt></h1>
<pre>
begin;
update document set security='staffonly' where eprintid in ( select eprintid from archive where department like '%informacijske%' );
commit;
</pre>
<br /><h1 id="repository">Repository</h1>
<h2 id="backup">backup</h2>
<pre>
# prefix all commands with: sudo -u eprints /usr/share/eprints3/bin/
export ffzg archive XMLFiles &gt; /tmp/ffzg.xmlfile
export ffzg subject XML &gt; /tmp/submject.xml
export ffzg user XML &gt; /tmp/user.xml
</pre>
<br /><h2 id="restore">restore</h2>
<p>
<a target="_blank" title="(external link)" href="http://wiki.eprints.org/w/API:bin/import">http://wiki.eprints.org/w/API:bin/import</a></p>
<pre>
epadmin erase_data ffzg

import_subjects --verbose --force --xml ffzg /tmp/submject.xml
import --verbose --migration ffzg user XML /tmp/user.xml
import --verbose --migration ffzg eprint XML /tmp/ffzg.xmlfile

generate_static ffzg
generate_views ffzg
</pre>
<br /><h2 id="importing_from_other_data_source">importing from other data source</h2>
<p>
When generating xml file for import documented at <a target="_blank" title="(external link)" href="http://wiki.eprints.org/w/XML_Export_Format">http://wiki.eprints.org/w/XML_Export_Format</a> from some other dataset using <tt>--update</tt> is useful to re-run import</p>
<pre>
sudo -u eprints /usr/share/eprints3/bin/import --verbose --migration --enable-file-imports --update grf eprint XML xml
</pre>
<br /><p>
File can be specified in &lt;url&gt; tag using <a target="_blank" title="(external link)" href="file:///path/on/the/disk/file.pdf">file:///path/on/the/disk/file.pdf</a> but you need --unable-file-imports for this to work!</p>
<h1 id="hash_in_export_filters_with_multilang_fields">HASH in export filters with multilang fields</h1>
<ul>
<li>bug report: <a target="_blank" title="(external link)" href="http://www.eprints.org/tech.php/16066.html">http://www.eprints.org/tech.php/16066.html</a></li>
<li>eprints meta patch: <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/eprints-plugin-export-simple-multilang.diff?action=attachments_download;page_name=eprints;id=20120306104458-0-9998">eprints-plugin-export-simple-multilang.diff</a><!-- wiki: {file: eprints-=plugin-=export-=simple-=multilang.diff} --></span></li>
</ul>
<p>
Even better solution which should work across updates is described at: <a target="_blank" title="(external link)" href="http://www.eprints.org/tech.php/16125.html">http://www.eprints.org/tech.php/16125.html</a> and our local changes are in <span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/eprints-SimpleMultilang.zip?action=attachments_download;page_name=eprints;id=20121017141400-0-16843">eprints-SimpleMultilang.zip</a><!-- wiki: {file: eprints-=SimpleMultilang.zip} --></span></p>
<h1 id="rest_api">REST API</h1>
<p>
<a target="_blank" title="(external link)" href="http://www.eprints.org/tech.php/17435.html">http://www.eprints.org/tech.php/17435.html</a></p>
<p>
There is an experimental REST interface that lives at /rest/. You will<br />
need to give your user the 'rest' role (e.g. in cfg.d/user_roles.pl):</p>
<p>
$c-&gt;{user_roles}-&gt;{admin} = <a href="https://saturn.ffzg.hr/rot13/index.cgi?qw%7B%20%26nbsp%3B%26nbsp%3Brest%20%26nbsp%3B%26nbsp%3Bgeneral%20%26nbsp%3B%26nbsp%3B...%20%7D" title="[click to create page]" class="incipient">qw{ &nbsp;&nbsp;rest &nbsp;&nbsp;general &nbsp;&nbsp;... }</a>;</p>
<p>
(reload Apache to apply the change)</p>
<p>
This is driven by EPrints/Apache/REST.pm. One mention of it here:<br />
<a target="_blank" title="(external link)" href="http://wiki.eprints.org/w/New_Features_in_EPrints_3.2#REST">http://wiki.eprints.org/w/New_Features_in_EPrints_3.2#REST</a></p>
<p>
Otherwise, I'm working on support CRUD/REST for EPrints URIs:</p>
<p>
<a target="_blank" title="(external link)" href="http://wiki.eprints.org/w/API:EPrints/Apache/CRUD">http://wiki.eprints.org/w/API:EPrints/Apache/CRUD</a></p>
<p>
CRUD is missing the ability to update records - what is normally &quot;POST&quot; to an existing URI.</p>
<h1 id="fix_search_with_accented_characters_using_backport_from_git">Fix search with accented characters using backport from git</h1>
<span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/eprints-fix-search.diff?action=attachments_download;page_name=eprints;id=20131117121149-0-26594">eprints-fix-search.diff</a><!-- wiki: {file: eprints-=fix-=search.diff} --></span><br /></div>
<hr/><div>Attachments: eprints-fix-search.diff, eprints-plugin-export-simple-multilang.diff, eprints-SimpleMultilang.zip</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?eprints</guid>
<pubDate>Sun, 17 Nov 2013 12:12:12 -0000</pubDate>
</item>
</channel>
</rss>