1
0
mirror of https://github.com/balkian/balkian.github.com.git synced 2024-12-26 02:08:13 +00:00
balkian.github.com/zotero.html

273 lines
16 KiB
HTML
Raw Normal View History

2015-01-22 22:05:35 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
2015-12-08 14:19:11 +00:00
<title>balkian.com - Zotero
</title>
2015-01-22 22:05:35 +00:00
<meta name="viewport" content="width=device-width">
<!-- syntax highlighting CSS -->
2015-01-22 23:22:30 +00:00
<link rel="stylesheet" href="/theme/css/solarized.css">
2015-01-22 22:05:35 +00:00
<!--<link href="/css/bootstrap.css" rel="stylesheet">-->
<link rel="stylesheet" href="/theme/font-awesome/css/font-awesome.min.css">
<!--<link rel="stylesheet" href="/css/bootstrap-responsive.min.css">-->
<!-- Custom CSS -->
<link rel="stylesheet" media="only screen" href="/theme/css/main.css">
<link rel="stylesheet" media="only screen and (min-width: 0px) and (max-width: 599px)" href="/theme/css/main-xs.css">
<link rel="stylesheet" media="only screen and (min-width: 600px) and (max-width: 1199px)" href="/theme/css/main-medium.css">
<link rel="stylesheet" media="only screen and (min-width: 1200px)" href="/theme/css/main-desktop.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300|Comfortaa' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="container" class="container">
<header id="header">
<div id="navbar" class="navbar navbar-inverse navbar-static-bottom">
<div class="container">
<div class="navbar-header">
<ul class="nav navbar-nav">
<li class="active" >
2015-12-08 16:13:36 +00:00
<a href="/"><i class="fa fa-home fa-large"></i></a>
2015-12-07 22:12:27 +00:00
</li>
<li >
<a href="/pages/projects.html">Projects</a>
</li>
2015-12-07 20:57:42 +00:00
<li>
2015-12-08 00:06:02 +00:00
<a href="//jfernando.es" target="_blank">CV</a>
2015-12-07 20:57:42 +00:00
</li>
2015-01-22 22:05:35 +00:00
</ul>
2015-12-07 22:12:27 +00:00
</div>
2015-01-22 22:05:35 +00:00
</div>
</div>
</header>
<div id="contentwrapper">
<div id="sidebar" >
<div id="badge" class="flip-container" ontouchstart="this.classList.toggle('hover');">
<div class="flipper sticky">
<div class="front">
<!-- front content -->
<img id="avatar" width=100% src="/theme/img/me.png">
</div>
<div class="back">
<!-- back content -->
2015-12-07 20:57:42 +00:00
<img id="picture" width=100% src="/theme/img/me-bat.png">
2015-01-22 22:05:35 +00:00
</div>
</div>
</div>
2015-12-08 12:42:59 +00:00
<div id="about" style="clear:both;">
<!-- <h1 class="title">Interests</h1> -->
<div class="icons">
2015-12-08 16:13:36 +00:00
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa-stack-2x" ></i><i class="fa fa-stack-1x fa-linux"></i></span><span class="explanation">Linux lover</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-android"></i></span><span class="explanation">Android dev</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-github-alt"></i> </span><span class="explanation">GitHub user</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-stack-exchange"></i> </span><span class="explanation">StackExchange fan</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-music"></i> </span><span class="explanation">Music lover</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-film"></i> </span><span class="explanation">Movie fan</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-comments"></i> </span><span class="explanation">Always on IM</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-laptop"></i> </span><span class="explanation">Always on a PC</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-pencil"></i> </span><span class="explanation">Occassional writter</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-moon-o"></i> </span><span class="explanation">Night owl</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-terminal"></i></span> <span class="explanation">CLI user</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-flag"></i></span> <span class="explanation">Linguist wannabe</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-code"></i> </span> <span class="explanation">Love to code</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-book"></i></span> <span class="explanation">Keen reader</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-quote-right"></i></span> <span class="explanation">Quotes on demand</span></span>
2015-12-08 12:42:59 +00:00
</div>
</div>
2015-01-22 22:05:35 +00:00
<div class="entries">
2015-12-08 12:42:59 +00:00
<h2 class="title">Latest entries</h2>
2015-01-22 22:05:35 +00:00
<dl>
2015-03-11 01:55:29 +00:00
<dt><a href="/sharing-dotfiles.html">Sharing dotfiles</a></dt>
<a class="tag" href="/tag/github.html"><dd class="label label-default">github</dd></a>
<a class="tag" href="/tag/git.html"><dd class="label label-default">git</dd></a>
<a class="tag" href="/tag/dotfiles.html"><dd class="label label-default">dotfiles</dd></a>
2015-01-22 22:28:51 +00:00
<dt><a href="/zotero.html">Zotero</a></dt>
2015-01-22 22:05:35 +00:00
<a class="tag" href="/tag/zotero.html"><dd class="label label-default">zotero</dd></a>
<a class="tag" href="/tag/webdav.html"><dd class="label label-default">webdav</dd></a>
<a class="tag" href="/tag/nginx.html"><dd class="label label-default">nginx</dd></a>
<a class="tag" href="/tag/apache.html"><dd class="label label-default">apache</dd></a>
2015-01-22 22:28:51 +00:00
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
2015-01-22 22:05:35 +00:00
<a class="tag" href="/tag/python.html"><dd class="label label-default">python</dd></a>
<a class="tag" href="/tag/apache.html"><dd class="label label-default">apache</dd></a>
<a class="tag" href="/tag/proxy.html"><dd class="label label-default">proxy</dd></a>
<a class="tag" href="/tag/gunicorn.html"><dd class="label label-default">gunicorn</dd></a>
<a class="tag" href="/tag/uwsgi.html"><dd class="label label-default">uwsgi</dd></a>
2015-12-08 15:40:50 +00:00
<dt><a href="/publishing-on-pypi.html">Publishing on PyPi</a></dt>
2015-01-22 22:51:14 +00:00
<a class="tag" href="/tag/github.html"><dd class="label label-default">github</dd></a>
<a class="tag" href="/tag/python.html"><dd class="label label-default">python</dd></a>
<a class="tag" href="/tag/pypi.html"><dd class="label label-default">pypi</dd></a>
<dt><a href="/updating-eurolovemap.html">Updating EuroLoveMap</a></dt>
<a class="tag" href="/tag/javascript.html"><dd class="label label-default">javascript</dd></a>
<a class="tag" href="/tag/python.html"><dd class="label label-default">python</dd></a>
<a class="tag" href="/tag/heroku.html"><dd class="label label-default">heroku</dd></a>
2015-01-22 22:05:35 +00:00
</dl>
</div>
2015-12-08 12:42:59 +00:00
<!--Sidebar content-->
2015-01-22 22:05:35 +00:00
</div>
<div id="content">
<!--Body content-->
<div class="postnav">
2015-12-08 16:13:36 +00:00
<span class="previouspost"><i class="fa fa-chevron-left"></i> <a href="proxies-with-apache-and-python.html">Proxies with Apache and python</a></span>
<span class='nextpost'><a href="/sharing-dotfiles.html">Sharing dotfiles</a> <i class="fa fa-chevron-right"></i></span>
2015-01-22 22:05:35 +00:00
</div>
<div class="posthead">
<h2 class="title">Zotero</h2>
<span class="meta date">2014-12-09</span>
<a class="tag" href="/tag/zotero.html"><span class="label label-default">zotero</span></a>
<a class="tag" href="/tag/webdav.html"><span class="label label-default">webdav</span></a>
<a class="tag" href="/tag/nginx.html"><span class="label label-default">nginx</span></a>
<a class="tag" href="/tag/apache.html"><span class="label label-default">apache</span></a>
</div>
<div class="post">
<p><a class="reference external" href="https://www.zotero.org/">Zotero</a> is an Open Source tool that lets
you organise your bibliography, syncing it with the cloud. Unlike other
alternatives such as <a class="reference external" href="http://www.mendeley.com">Mendeley</a>, Zotero can
upload the attachments and data to a private cloud via WebDav.</p>
<p>If you use nginx as your web server, know that even though it provides
partial support for webdav, Zotero needs more than that. Hence, you will
need another webdav server, and optionally let nginx proxy to it. This
short post provides the basics to get that set-up working under
Debian/Ubuntu.</p>
<div class="section" id="setting-up-apache">
<h2>Setting up Apache</h2>
<p>First we need to install Apache:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>sudo apt-get install apache2
</pre></div>
</td></tr></table><p>Change the head of &quot;/etc/apache2/sites-enabled/000-default&quot; to:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;VirtualHost</span> <span class="s">*:880</span><span class="nt">&gt;</span>
</pre></div>
</td></tr></table><p>Then, create a file /etc/apache2/sites-available/webdav:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="nb">Alias</span> <span class="sx">/dav</span> <span class="sx">/home/webdav/dav</span>
<span class="nt">&lt;Location</span> <span class="s">/dav</span><span class="nt">&gt;</span>
<span class="nb">Dav</span> <span class="k">on</span>
<span class="nb">Order</span> Allow,Deny
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">Dav</span> <span class="k">On</span>
<span class="nb">Options</span> +Indexes
<span class="nb">AuthType</span> Basic
<span class="nb">AuthName</span> DAV
<span class="nb">AuthBasicProvider</span> file
<span class="nb">AuthUserFile</span> <span class="sx">/home/webdav/.htpasswd</span>
<span class="nb">Require</span> valid-user
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</td></tr></table><p>Ideally, you want your webdav folders to be private, adding
authentication to them. So you need to create the webdav and zotero
users and add the passwords to an htpasswd file. Even though you could
use a single user, since you will be configuring several clients with
your credentials I encourage you to create the zotero user as well. This
way you can always change the password for zotero without affecting any
other application using webdav.</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre>sudo adduser webdav
sudo htpasswd -c /home/webdav/.htpasswd webdav
sudo htpasswd /home/webdav/.htpasswd zotero
sudo mkdir -p /home/webdav/dav/zotero
</pre></div>
</td></tr></table><p>Enable the site and restart apache:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre>sudo a2enmod webdav
sudo a2enmod dav_fs
sudo a2ensite webdav
sudo service apache2 restart
</pre></div>
</td></tr></table><p>At this point everything should be working at
<a class="reference external" href="http:/">http:/</a>/&lt;your_host&gt;:880/dav/zotero</p>
</div>
<div class="section" id="setting-up-nginx">
<h2>Setting up NGINX</h2>
<p>After the Apache side is working, we can use nginx as a proxy to get
cleaner URIs. In your desired site/location, add this:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">location</span> <span class="s">/dav</span> <span class="p">{</span>
<span class="kn">client_max_body_size</span> <span class="s">20M</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$host</span><span class="p">;</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:880</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</td></tr></table><p>Now just reload nginx:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>sudo service nginx force-reload
</pre></div>
</td></tr></table></div>
<div class="section" id="extras">
<h2>Extras</h2>
<ul class="simple">
<li><a class="reference external" href="http://zoteroreader.com/">Zotero Reader</a> - HTML5 client</li>
<li><a class="reference external" href="https://github.com/ajlyon/zandy">Zandy</a> - Android Open Source
client</li>
</ul>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<footer role="contentinfo">
<div class="contact">
<p>
J. Fernando Sánchez Rada | balkian
</p>
</div>
<ul id="social">
2015-12-08 16:13:36 +00:00
<li><a href="http://github.com/balkian"><i class="fa fa-github"></i></a></li>
<li><a href="http://bitbucket.com/balkian"><i class="fa fa-bitbucket"></i></a></li>
<li><a href="http://twitter.com/balkian"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://plus.google.com/u/0/111897020957944410316"><i class="fa fa-google-plus"></i></a></li>
<li><a href="http://linkedin.com/in/jfsanchezrada"><i class="fa fa-linkedin"></i></a></li>
<li><a href="http://facebook.com/balkian"><i class="fa fa-facebook"></i></a></li>
2015-01-22 22:05:35 +00:00
</ul>
<p>
Creative Commons A-SA-NC
</p>
</footer>
</div>
<script src="/theme/js/jquery-2.0.2.min.js"></script>
2015-12-08 13:57:44 +00:00
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.sinpapel.es/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwik.sinpapel.es/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
2015-01-22 22:05:35 +00:00
<!--<script src="/js/bootstrap.min.js"></script>-->
</body>
</html>