<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=1063541&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1063541</link>
		<description><![CDATA[Les sujets les plus récents dans [script] extraire les nouveaux fichiers d'une arborescence (zotero).]]></description>
		<lastBuildDate>Thu, 11 Oct 2012 15:31:04 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11086461#p11086461</link>
			<description><![CDATA[<p>c&#039;était pas dit dans la chanson que tu voulais pouvoir valider avant le lancer....</p>]]></description>
			<author><![CDATA[dummy@example.com (Maisondouf)]]></author>
			<pubDate>Thu, 11 Oct 2012 15:31:04 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11086461#p11086461</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11077711#p11077711</link>
			<description><![CDATA[<p>Je viens de penser qu&#039;il faut initialiser le fichier de référence la première fois avec :</p><div class="codebox"><pre><code>touch -t date_désirée_au_format_YYYYMMDDhhmm ref</code></pre></div><p>à lancer dans le dossier d&#039;exécution du script.</p>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Wed, 10 Oct 2012 19:10:51 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11077711#p11077711</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11076971#p11076971</link>
			<description><![CDATA[<p><img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>merci nesthib!</p>]]></description>
			<author><![CDATA[dummy@example.com (cracolinux)]]></author>
			<pubDate>Wed, 10 Oct 2012 17:55:32 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11076971#p11076971</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11074161#p11074161</link>
			<description><![CDATA[<p>Non, grsync ne correspond pas à mon besoin.<br />Premièrement grsync est graphique (quand j&#039;ai besoin de faire de la sauvegarder j&#039;utilise <a href="http://doc./rsync">rsync</a>), ensuite je peux prévisualiser simplement puis lancer l&#039;action avec mon script, enfin je peux ajouter les extensions que je désire, il suffit de modifier le -name en -regex et d&#039;utiliser les différents types de fichier (pdf|autre).</p>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Wed, 10 Oct 2012 14:06:24 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11074161#p11074161</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11071801#p11071801</link>
			<description><![CDATA[<p>Pal mal, mais regardes du coté de &#039;grsync&#039;, il fait ça très bien... et pour toutes sortes de fichiers.</p>]]></description>
			<author><![CDATA[dummy@example.com (Maisondouf)]]></author>
			<pubDate>Wed, 10 Oct 2012 09:55:24 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11071801#p11071801</guid>
		</item>
		<item>
			<title><![CDATA[[script] extraire les nouveaux fichiers d'une arborescence (zotero)]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11069891#p11069891</link>
			<description><![CDATA[<p>Voici un petit script créé à l&#039;origine pour <a href="http://zotero.org">zotero</a> mais qui peut être adapté à bien d&#039;autres utilisations.<br />Le script recherche les nouveaux fichiers pdf (depuis la dernière extraction) dans ZOTERO_FOLDER et effectue un lien en dur dans PDF_FOLDER (possibilité de déplacer ou copier en remplaçant ln par mv/cp). La date de dernière synchronisation est sauvegardée par le fichier « ref ».</p><div class="codebox"><pre class="vscroll"><code>#! /bin/bash

# define working directories
ZOTERO_FOLDER=&quot;/source&quot;
PDF_FOLDER=&quot;/destination&quot;
FILE_TYPE=&#039;*.pdf&#039;

cd ${ZOTERO_FOLDER}

# print last synchro date
echo &quot;dernière synchronisation : &quot;$(ls -l ref | awk &#039;{print $6&quot; &quot;$7}&#039;)

# listing mode, only show new files
if [[ ! &quot;${1}&quot; == &quot;-do&quot; ]]
then
    find ./ -name ${FILE_TYPE} -newer ref
    exit
fi

# find files newer than last synchronisation and send to the PDF_FOLDER
while read file
do
    ln &quot;${file}&quot; &quot;${PDF_FOLDER}&quot; &amp;&amp; echo &quot;synchro : ${file}&quot; || echo &quot;/!\ erreur : ${file}&quot;
done &lt; &lt;(find ./ -name ${FILE_TYPE} -newer ref)

# update reference file for next synchro
touch -t $(date +&#039;%Y%m%d%H%M&#039;) ref</code></pre></div><p>pour voir les nouveaux fichiers :</p><div class="codebox"><pre><code>./le_script.sh</code></pre></div><p>pour effectuer la synchronisation :</p><div class="codebox"><pre><code>./le_script.sh -do</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (nesthib)]]></author>
			<pubDate>Wed, 10 Oct 2012 06:11:05 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11069891#p11069891</guid>
		</item>
	</channel>
</rss>
