11. Dezember 2009
I created a small bash script that replaces the full journal names with the abbreviated ones (MEDLINE-standard).
You need to download the list of journals from pubmed and place it within the same folder of the script.
Additionally you need sqlite3 (sudo apt-get install sqlite3) under Ubuntu Linux. On Windows systems you need to install cygwin or something similar first i think… but it easier to make the conversion on a linux box on the campus.
Then you should adjust the path to your database file according to your operating system:
- Windows XP: C:\Documents and Settings\<Your Name>\Local Settings\Application Data\Mendeley Ltd\Mendeley Desktop\
- Windows Vista / Windows 7: %LOCALAPPDATA%\Mendeley Ltd.\Mendeley Desktop\
- Mac OS X: /Users/<Your username>/Library/Application Support/Mendeley Desktop/
- Linux: ~/.local/share/data/Mendeley Ltd./Mendeley Desktop/
After you have done so, I recommend running the script once in echo only mode. If the result looks okay, change the last echo to sqlite3 $db.
Please feel free to leave comments…
Good look 
#!/bin/bash
db=test.sqlite # set the db-file here. The location depends on the OS you use.
limit="WHERE confirmed='true' AND type='JournalArticle'"
sqlite3 $db "SELECT id FROM Documents $limit" > temp_ids.txt
cat temp_ids.txt | while read line
do
long=$(sqlite3 $db "SELECT publication FROM Documents WHERE id=$line")
echo "long = $long"
#echo "The id is $line"
line_pubm=$(grep -i -n -m 1 "$long" J_Medline.txt | cut -f1 -d:)
#echo "linenumber in pubm= $line_pubm"
abbr_linen=$(( $line_pubm + 1 ))
short=$(sed -n ${abbr_linen}p J_Medline.txt | sed 's/MedAbbr: //' | tr -cd '[:alnum:]‘)
echo “short= $short”
LEN=$(echo ${#short})
echo $LEN
if [ "$short" ]; then
echo “UPDATE Documents SET publication=’$short’ WHERE id=$line”
# sqlite3 $db
# make a security update of your sqlite-file and replace the echo from above with sqlite3 $db
else
echo “no or short shortname (<3 chars) - not changed”
fi
done
Schlagworte: abbrev, abbreviate, citation, mendeley, sqlite, styles, ubuntu, zotero
Veröffentlicht in Computer & Elektronik | Keine Kommentare »
22. Februar 2009
Here are the Scripts for the lastfm player implementation on the fonera2.0 I use right now.
Even the fonosfera dev-blog took notice from my project… now its up to me to make it run without much hacking.
Diesen Beitrag weiterlesen »
Schlagworte: bash, bashfm, bluetooth, fonera, lastfm
Veröffentlicht in Computer & Elektronik | Keine Kommentare »
10. Februar 2009
Sehr praktisch wenn man alle Vorlesungen oder so auf einmal kopieren möchte…
Der folgende Befehl lädt automatisch alle verlinkten PDF Dateien einer Internetseite in das aktuelle Verzeichnis.
wget -r -l1 -nd –no-parent -A.pdf www.uni-sonstewo.de/fach/vorlesung/liste.html
wenn man das .pdf durch .pps oder .zip ersetzt werden einfach alle Powerpoint-Präsentationen oder Zip-Archive heruntergeladen.
Man benötigt nur wget, welches bei Linux automatisch installiert ist (also auch im RZ) oder für Windows hier zu finden ist: Download
Für Firefox gibt es auch ein praktisches Addon, welches für diese Aufgabe geschaffen ist.
In Opera geht es noch einfacher:
- F4 drücken (Seitenpanel anzeigen)
- sich alle Links anzeigen lassen
- “pdf” ins Suchfeld eingeben
- Alle PDFs auf einmal runterladen
Schlagworte: download, einfach, linux, pdf, pdfs, script, tool, windows
Veröffentlicht in Computer & Elektronik | Keine Kommentare »
1. Februar 2009
Howto use Fonera 2.0 as a Last.fm Webradio station
Idea
When I start my computer in order to listen to lastfm internet radio I’m always tempted to do whatever on the computerr instead of concentrating on my non-computer tasks…
Thus i got to think about a device that might replace a conventional computer as music player…
When i heared about the new fonera with USB 2.0 and openwrt as operating system and last but not least the price of about 50 € including shipping i got the idea to use the tiny device as a cellphone controlled music player.
Diesen Beitrag weiterlesen »
Schlagworte: audio, bluetooth, embedded, fon, fon-ng, fonera, fonera2, hardware, lan, lastfm, linux, standalone, usb, webradio, wlan
Veröffentlicht in Computer & Elektronik | 7 Kommentare »
9. Dezember 2008
Two days after my fonera arrived, i already messed up the init.d section and had to reflash with RedBoot, as there is currently no .fon image available to flash via the webinterface.
After hours of testing with gnome-console (where the ctrl-c does not work) I got crazy but thanks to the irc-channel I became finally able to unbrick the tiny device…
The procedure:
- install tftpd and putty: sudo apt-get install tftpd-hpa tftp-hpa putty
- copy the image to /var/lib/tftpboot and rename it to i.e. alfred.image
- start the tftp server: sudo /etc/init.d/openbsd-inetd start
- test your tftpd: tftp localhost -c get /alfred.image
the image should now be loaded to the current directory
- get into redboot:
sudo su
ifconfig eth0 192.168.1.254;while true; do fping -t 100 192.168.1.1 && break; done;putty telnet://192.168.1.1:9000
- you should end up in a telnet session and see the boot promt RedBoot>
- type:
fis del image -> confirm with y
load -r -b %{FREEMEMLO} openwrt-fonera2.imag
fis create image -> wait about 20min, drink some tea
reset -> wait about 3 min -> unplug and replug the fonera
Be happy…
Any comments are welcome…
Schlagworte: fon-ng, fonera, fonera2, network, putty, redboot, ubuntu, unbrick, usb
Veröffentlicht in Computer & Elektronik | Keine Kommentare »