<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Abbreviated Journal Names with Mendeley - Replace Long Journal Names Automatically</title>
	<atom:link href="http://www.vollkornpapier.de/computer-elektronik/abbreviated-journal-names-with-mendeley.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vollkornpapier.de/computer-elektronik/abbreviated-journal-names-with-mendeley.html</link>
	<description>Collection of things that might be worth sharing...</description>
	<pubDate>Wed, 08 Feb 2012 13:54:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Rhodri Cusack</title>
		<link>http://www.vollkornpapier.de/computer-elektronik/abbreviated-journal-names-with-mendeley.html#comment-54855</link>
		<dc:creator>Rhodri Cusack</dc:creator>
		<pubDate>Fri, 06 Jan 2012 18:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.vollkornpapier.de/?p=73#comment-54855</guid>
		<description>The quotes in the comment above have been escaped. A better version is here:
http://www.cusacklab.org/?page_id=559</description>
		<content:encoded><![CDATA[<p>The quotes in the comment above have been escaped. A better version is here:<br />
<a href="http://www.cusacklab.org/?page_id=559" rel="nofollow">http://www.cusacklab.org/?page_id=559</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhodri Cusack</title>
		<link>http://www.vollkornpapier.de/computer-elektronik/abbreviated-journal-names-with-mendeley.html#comment-54852</link>
		<dc:creator>Rhodri Cusack</dc:creator>
		<pubDate>Fri, 06 Jan 2012 17:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.vollkornpapier.de/?p=73#comment-54852</guid>
		<description>Thanks for the script, it is very useful! 

On a Mac I had a couple of problems: the quotes have been changed in the HTML to opening and closing quotes, which are different characters that bash doesn\'t recognize. Second, I needed to add \&#34;\&#34; around \&#34;$db\&#34; due to the spaces in the filename on a Mac. The final version that did the job is:


#!/bin/bash
db=\&#34;/Users/rcusack/Library/Application Support/Mendeley Desktop/rhodricusack@gmail.com@www.mendeley.com.sqlite\&#34; # set the db-file here. The location depends on the OS you use.
limit=\&#34;WHERE confirmed=\'true\' AND type=\'JournalArticle\'\&#34;
sqlite3 \&#34;$db\&#34; \&#34;SELECT id FROM Documents $limit\&#34; &#62; temp_ids.txt
cat temp_ids.txt &#124; while read line
do
long=$(sqlite3 \&#34;$db\&#34; \&#34;SELECT publication FROM Documents WHERE id=$line\&#34;)
echo \&#34;long = $long\&#34;
echo \&#34;The id is $line\&#34;
line_pubm=$(grep -i -n -m 1 \&#34;$long\&#34; J_Medline.txt &#124; cut -f1 -d:)
echo \&#34;linenumber in pubm= $line_pubm\&#34;
abbr_linen=$(( $line_pubm + 1 ))
short=$(sed -n ${abbr_linen}p J_Medline.txt &#124; sed \'s/MedAbbr: //\' &#124; tr -cd \'[:alnum:]\')
echo “short= $short”
LEN=$(echo ${#short})
echo $LEN
if [ \&#34;$short\&#34; ]; then
echo $short
echo $line
sqlite3 \&#34;$db\&#34; \&#34;UPDATE Documents SET publication=\'${short}\' WHERE id=${line}\&#34;
# sqlite3 $db
# make a security update of your sqlite-file and replace the echo from above with sqlite3 $db
else
echo \&#34;no or short shortname (&#60;3 chars) - not changed\&#34;
fi
done</description>
		<content:encoded><![CDATA[<p>Thanks for the script, it is very useful! </p>
<p>On a Mac I had a couple of problems: the quotes have been changed in the HTML to opening and closing quotes, which are different characters that bash doesn\&#8217;t recognize. Second, I needed to add \&quot;\&quot; around \&quot;$db\&quot; due to the spaces in the filename on a Mac. The final version that did the job is:</p>
<p>#!/bin/bash<br />
db=\&quot;/Users/rcusack/Library/Application Support/Mendeley Desktop/rhodricusack@gmail.com@www.mendeley.com.sqlite\&quot; # set the db-file here. The location depends on the OS you use.<br />
limit=\&quot;WHERE confirmed=\&#8217;true\&#8217; AND type=\&#8217;JournalArticle\&#8217;\&quot;<br />
sqlite3 \&quot;$db\&quot; \&quot;SELECT id FROM Documents $limit\&quot; &gt; temp_ids.txt<br />
cat temp_ids.txt | while read line<br />
do<br />
long=$(sqlite3 \&quot;$db\&quot; \&quot;SELECT publication FROM Documents WHERE id=$line\&quot;)<br />
echo \&quot;long = $long\&quot;<br />
echo \&quot;The id is $line\&quot;<br />
line_pubm=$(grep -i -n -m 1 \&quot;$long\&quot; J_Medline.txt | cut -f1 -d:)<br />
echo \&quot;linenumber in pubm= $line_pubm\&quot;<br />
abbr_linen=$(( $line_pubm + 1 ))<br />
short=$(sed -n ${abbr_linen}p J_Medline.txt | sed \&#8217;s/MedAbbr: //\&#8217; | tr -cd \&#8217;[:alnum:]\&#8217;)<br />
echo “short= $short”<br />
LEN=$(echo ${#short})<br />
echo $LEN<br />
if [ \&quot;$short\&quot; ]; then<br />
echo $short<br />
echo $line<br />
sqlite3 \&quot;$db\&quot; \&quot;UPDATE Documents SET publication=\&#8217;${short}\&#8217; WHERE id=${line}\&quot;<br />
# sqlite3 $db<br />
# make a security update of your sqlite-file and replace the echo from above with sqlite3 $db<br />
else<br />
echo \&quot;no or short shortname (&lt;3 chars) - not changed\&quot;<br />
fi<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.vollkornpapier.de/computer-elektronik/abbreviated-journal-names-with-mendeley.html#comment-8733</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sun, 18 Apr 2010 23:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.vollkornpapier.de/?p=73#comment-8733</guid>
		<description>Running this script in my ubuntu 9.10, i constantly get:

MendeleyScript.sh: 2: Ltd./Mendeley: not found

However, when I paste the location from your description, i pop right into the Mendeley folder.  What am I doing wrong?</description>
		<content:encoded><![CDATA[<p>Running this script in my ubuntu 9.10, i constantly get:</p>
<p>MendeleyScript.sh: 2: Ltd./Mendeley: not found</p>
<p>However, when I paste the location from your description, i pop right into the Mendeley folder.  What am I doing wrong?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

