Friday, September 30, 2011

Feature of the Week: Discussed Posts

"My God, It's full of Stars!" is what you're supposed to say when entering a big black monolith and it's also what you'll probably think when checking out this week's new BibSonomy feature.
Before the summer break we introduced the new review and discussion feature. Now, we have added a page to BibSonomy that gives an overview over all those resources that have been reviewed or commented. You can reach it at www.bibsonomy.org/discussed or just by clicking the new "discussed posts" link in the menu.
The page lists all the recently discussed bookmarks and publications. To make the overview as concise and discussion-focused as possible, the posts are displayed in a reduced form including the title, the description and of cause the average star rating. The stars also function as link to the resource's discussion page, where you can add your own comments or review.
If you are looking for a contribution by someone in particular, there is a user specific version of the "discussed"-page. E. g. www.bibsonomy.org/discussed/user/hotho has bookmarks and publications discussed by user hotho. Find a link to these pages in the sidebar of the regular user pages e. g. www.bibsonomy.org/user/hotho.


You'll reach your personal discussed page in the myBibSonomy menu under the item myDiscussedPosts.

We hope, the new feature will make it easier for you to engage in discussion of the current hot topics of science!
Let us know your opinion and make sure the discussed-page is always "full of stars"!

Stephan

Thursday, September 22, 2011

Release 2.0.18

The Summer break is officially over and thus we have just released BibSonomy 2.0.18.
At our Maven repository you'll find the publicly available libraries.
As announced earlier by Robert, the name handling has been changed to always storing names as "last name, first name".
Further, this release introduces:
  • an autocomplete for the inbox systemTag "send",
  • an autocomplete for the detailed information fields during publication posting,
  • an easy means to normalize your BibTeX keys,
  • another supported filetype for the document upload: .tex,
  • and scraping-support for publication posting from INSPIRE β and Taylor & Francis Online.

As always, we'll go into detail in our "Feature of the Week" blog post series.

Happy tagging!
Stephan

Monday, September 12, 2011

Feature of the week: access your posts in Emacs (with RefTeX)

This week's feature of the week is something for our more experienced users but I guess that applies to many Emacs users anyway. ;-)

For all of you that write their LaTeX files using GNU Emacs I present a small script that simplifies its interaction with BibSonomy.
First, if you don't know and use RefTeX yet, I highly recommend that you give it a try, it's really awesome! I won't go into detail how to activate it, typically something like
; load reftex                                                                                                
(require 'reftex)
; turn reftex on                                                                                             
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
in your Emacs configuration file ~/.emacs should be sufficient.
Adding citations to your LaTeX file with RefTeX is as easy as typing C-c [. Then you can search for appropriate entries using a regular expression.

What I want to show you in this feature of the week is how you can add a script to RefTeX such that each time RefTeX is initialized your BibTeX references are downloaded from BibSonomy. For this to work you must follow the following steps:

  1. Find out which posts you want to use from BibSonomy.
  2. Add an appropriate \bibliography{} command to your LaTeX file.
  3. Write a small shell script.
  4. Tell RefTeX about the script.
  5. Try it!

Find out which posts you want to use from BibSonomy


Let us assume that I am writing a paper about formal concept analysis (fca). So I want to reference publications from my list of fca-related publications that I can get at http://www.bibsonomy.org/user/jaeschke/fca. Since I want all publications in BibTeX format, the file I finally want to have is http://www.bibsonomy.org/bib/user/jaeschke/fca?items=1000. Notice the modifications in bold print.

Add an appropriate \bibliography{} command to your LaTeX file


Since the script presented later is rather simple, this is related to the posts I want to download, i.e., to the tag fca:
\bibliographystyle{plain}
\bibliography{fca}
That means the BibTeX file will be named after the tag(s) used to query BibSonomy.

Write a small shell script


Of course, we have done this for you. :-) Nevertheless, you should adopt it to your needs, in particular change the variable BASEURL (e.g., insert your BibSonomy username):
#!/bin/sh

FILE=$1
RESULTFILE=`pwd`/$FILE.bib
BASEURL=http://www.bibsonomy.org/bib/user/jaeschke
PARAMS="?items=1000"
QUERYURL=$BASEURL/$FILE$PARAMS

# the file is downloaded on each call of the script - 
# typically on the first call of reftex-citation
wget -q -O - $QUERYURL > $RESULTFILE

# the result for RefTeX: the path to the downloaded file
echo $RESULTFILE
The script gets as input from RefTeX the string from the \bibliography{} command (if you have several files specified, the script is called for each file). Then, it downloads your posts from BibSonomy using the input as tag of the user jaeschke. The downloaded file is put into the current directory (named after the tag(s)) and its name is returned to standard output (this is what RefTeX expects).

Place the script at some convenient location, let's say /usr/local/bin/find_file_from_bibsonomy.sh.

Of course, the script can and should be adopted to your needs. If you have suggestions for improvements, just let us know!

Tell RefTeX about the script


Add the following lines to your ~/.emacs file:
; connect RefTeX with BibSonomy                                                                        
(setq reftex-use-external-file-finders "yes")
           
(setq reftex-external-file-finders 
   (cons '("bib" . "/usr/local/bin/find_file_from_bibsonomy.sh %f") 
      reftex-external-file-finders)
   )

Try it!


Well, just open the LaTeX file and press C-c [ on your keyboard (for non-Emacs users: Pressing the Ctrl-Key together with "c" and then releasing both keys and pressing "["). Then search for some author name or keyword (e.g., "fca")

and be surprised about the results

You can choose any of the matching posts and the corresponding \cite{} command is automatically added to your document. And the best thing is: all the posts are coming from BibSonomy!

Further reading


Improvements


The script above always tries to download the entries from BibSonomy - even if you already have one with that name. Here is an updated version that acts only if the requested file name starts with a configurable prefix, in this case bibsonomy_.
#!/bin/sh                                                                           

# All files with publications from BibSonomy should have
# this prefix - to not overwrite other files.
PREFIX="bibsonomy_"
# query                               
BASEURL="http://www.bibsonomy.org/bib/user/jaeschke"
PARAMS="?items=1000"

# the first parameter is the file name from the \bibliography{}
# command                                  
FILE=$1

# check for prefix
if [ $(echo $FILE | grep "^$PREFIX") ]; then
    # prefix found -> work on

    # remove prefix for tag query
    TAG=$(echo $FILE | sed "s/^$PREFIX//")
    # build path for result file and query URL
    RESULTFILE=`pwd`/$FILE.bib
    QUERYURL=$BASEURL/$TAG$PARAMS

    # the file is downloaded on each call of the script - typically on
    # the first call of reftex-citation
    wget -q -O - $QUERYURL > $RESULTFILE

    # the result for RefTeX: the path to the downloaded file
    echo $RESULTFILE

else
    # just return the file name in case the file is in the current
    # directory                                
    echo $FILE.bib
fi
That means that in the example above we must change in our LaTeX document \bibliography{fca} to \bibliography{bibsonomy_fca}. That's it!

Further improvements will be added to this section.

(Classic) Feature of the Week: Attaching documents to publication posts

One of the most prominent advantages of BibSonomy is that it facilitates the collaborative management of metadata - e.g. author, year or title - of publication posts. While this is very useful within several phases of doing research or knowledge work, possessing the "data" which the metadata is about is crucial as well. In other words: Finding a highly interesting BibTeX entry is worth much more when one is able to locate the corresponding document (e.g. PDF) as well.

As some of you may already know, BibSonomy allows to attach documents to publication posts to keep all relevant information (i.e. metadata and data) in a single place. In order to upload a document to one of your posts within your collection, visit its details page - there you find an option to "Add further documents":
Once you click on "add", you can select a local file (with a suitable file extension) for upload:
When you're done, all existing private documents are displayed. Please note that you can upload further documents as well:
For an easy access to your documents, we display a tiny document symbol next to the publication title (see below); in addition, you can visit the "myDocuments" page, which lists only those publications from your collection which have a document attached:
Because copyright is of course an issue when talking about publication documents, all your documents are private, i.e. accessible only to yourself. An exception are groups: When the group administrator enables this feature, then all the other group members are able to see and download your documents as well.

In any case we hope that this feature makes your publication management life another bit easier and smoother - as usual, we are happy about any kind of feedback and suggestions!

Happy tagging, Dominik

Thursday, September 1, 2011

(Classic) Feature of the week: Posting Publications as snippet

Hello everyone,

this week we learn how to post a publication using a snippet. This is a very comfortable way to post a publication. Just click on post publication and choose the tab snippet.

We can paste one or multiple snippets into the BibTeX/EndNote snippet* box. The visibility of our post is controlled with the viewable for field.

Basically, that is all we have to do. But our snippet importer offers some additional goodies. We can choose to edit before import or to overwrite an existing one.

The best part is the tag capability of BibSonomy. Many snippets already have keyword or tag field as in the following example:

We can use these tags for our import. Since there is no standard for tags and their delimeters, we have to tell BibSonomy our format. Therefore, we have to select the type of tag delimiter from the corresponding drop down menu. We can choose between:

  • ' ' (whitespace),
  • , (somma), and
  • ; (semicolon).
We have to set a sign if we do not use whitespaces as tag telimiter. A '_' is used otherwise. To specifiy our own one, just klick into the text field and remove the underscore and replace it with our own sign.

After we click on the post button appears the next dialog:

It is just a confirmation dialog to be sure that our tags get imported correctly. If everything is fine, we can click on the update button to finish the import.

That is it for this week. Stay tuned and happy tagging!

Jürgen

Popular Posts