Linux Software Blog http://linuxsoftwareblog.com A blog dedicated on bringing Linux tutorials and how-to's to the masses...Sun, 13 Jan 2013 12:59:58 +0000en-UShourly1http://wordpress.org/?v=3.5The linuxsoftwareblog.com domain is up for sale http://linuxsoftwareblog.com/?p=971 http://linuxsoftwareblog.com/?p=971#commentsSun, 13 Jan 2013 12:59:58 +0000Robhttp://linuxsoftwareblog.com/?p=971The time has come to sell this domain.

Over the last 3 years, the website has attracted just over 155,800 page views, from across the globe (thanks Google Analytics).

If you’re interested in acquiring the domain:

www.linuxsoftwareblog.com

Please contact me directly: robstewart57 [then an at sign] gmail [then a dot] com

It’s been fun!


Rob

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=9711
Generate Bibtex file for Authors on DBLP http://linuxsoftwareblog.com/?p=957 http://linuxsoftwareblog.com/?p=957#commentsWed, 15 Aug 2012 10:48:37 +0000Robhttp://linuxsoftwareblog.com/?p=957Ever wanted a full DBLP database file containing all publication information for a given author (presumably yourself)? DBLP is a computer science bibliography database. Journals tracked on this site include VLDB, the IEEE Transactions, the ACM Transactions, and conference data.

I’ve put together a dblp2bibtex utility, written in Haskell, that enables authors to download all publication data from DBLP, for a given author. It’s open source on GitHub. Usage:


dblp2bibtex [OPTIONS]
A Haskell utility to generate bibtex files for an author identified with a DBLP URI

Common flags:
-g --generatebibtex=Author URI Get bibtex file for given URI
-s --search=Author name Search for URI by name (e.g. "Joe Bloggs")
-l --listpapers=Author URI List papers for an author URI
-o --outfile=Bibtex filename (default 'export.bib')
-x --xref Include cross reference entries
-h --help Display help message
-v --version Print version information

For an example of use, and instructions on how to download and install, see this README on the GitHub page. Any problems, feedaback.. or pull requests ;-) then get in touch!

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=9570
Generate web reports for GPS track files http://linuxsoftwareblog.com/?p=937 http://linuxsoftwareblog.com/?p=937#commentsMon, 26 Dec 2011 22:24:25 +0000Robhttp://linuxsoftwareblog.com/?p=937I’ve updated my hobby project over the Christmas holidays. It combines my enjoyment for cycling in and around Scotland, with my addiction to Haskell programming. The source code is on Git Hub, here

Screenshot of the software in action

The main changes from the previous release include:

  •  Generating Open Street Map images with the GPS track overlays is now much quicker
  • Added runtime flags to generate tar archives for the generated web content
  • Bug fixes

To install and use the software, you first of all need the haskell-platform, and then cairo, GraphcsMagick and gtk2hs-buildtools. For example, on Fedora Linux:

$# yum install haskell-platform GraphicsMagick cairo gtk2hs-buildtools

Then…

$ cabal update
$ cabal install gps2htmlReport
$ gps2HtmlReport --help
 gps2HtmlReport [OPTIONS]
 A Haskell utility to generate HTML page reports of GPS Tracks
 and Track overlays on OpenStreetMap tiles
 Common flags:
 -i --imageonly Generates only an image of the track overlay on an OpenStreetMap layer
 -a --archive Produce tar archive for web and image files
 --hashnames Create reports in hashed directory names
 -h --help Display help message
 -v --version Print version information
 -V --Verbose Loud verbosity
 -q --quiet Quiet verbosity
]]>
http://linuxsoftwareblog.com/?feed=rss2&p=9370
Calling all Bloggers: Semantic Text Annotation with RDFa http://linuxsoftwareblog.com/?p=878 http://linuxsoftwareblog.com/?p=878#commentsFri, 09 Dec 2011 04:06:52 +0000Robhttp://linuxsoftwareblog.com/?p=878

Connected web of semantic content

The semantic web is not the “future”, it is the now. Semantic web technologies have matured in recent years, at the rapid rate in which enriched web content has emerged on the linked open data cloud. Take a look, http://richard.cyganiak.de/2007/10/lod/imagemap.html ! Whatever language you choose to adopt, you can be sure that they’ll be a feature rich semantic web library to match. I can vouch for RDF4H [1] for Haskell and Jena [2] for Java.

Why the need for embedded semantics?

Firstly, to understand embedded RDFa, one should appreciate the value in semantics on the web. Why have many organizations (including the BBC [3] and the British Library [4]) invested a lot of time semantizing existing web content and data? Simply put, from the very beginning of the World Wide Web, it has been a connected network of human readable documents, largely made up of documents written in the markup language – HTML. We’ve been able to learn from one another, distribute information to wide audiences, and read weather reports for our respective regions of the world.

The problem

Web 1.0 and Web 2.0 are both broadly defined as a connected network of human readable resources. Given two blog posts on two separate webpages, how do I discover whether they discuss similar or identical concepts? I have to read them and check! Isn’t this all a bit cumbersome?! How do people make discoveries on the web… Search for text in one’s favourite search engine? When I’m enthralled by an entertaining blog post, how do I find other posts that touch on similar issues, or by the same author, or posted within the last month etc…

The Solution? RDF + Ontology Reuse!


The fundamental building block, RDF [5] is one of the simplest data models there is, and there are some important principles built into the Semantic Web that are crucial to its success. This includes a paramount rule that resources on the web should be referenced using a unique resource identifier (URI), wherever possible. This is a mechanism to disambiguate terms on the web, meaning that we can unequivocally state that two separate web pages are referring to the same concept, place, person, or date in time. This is a machine readable representation of web content, and the powers of reasoning over a collection of documents containing disambiguous terms is obvious, albeit simple and probably not powerful enough to warrant attention and convergence to the Semantic Web.

But crucially, the RDF model allows resources to be described using ontological vocabularies. Some popular examples include DBPedia [6] (structured content derived from wikipedia.org) and FOAF [7] to describe people, and the links between them. These ontologies define concepts hierarchically, and the properties between them. So for instance, I might one day blog about my favourite sport, tennis, using my semantic web-aware blogging engine. Underneath my blog post, I have an unambiguous machine readable annotation of this term, which implicitly holds more information about “tennis” than I have mentioned in the blog post. For example, what does DBPedia tell us about tennis? http://dbpedia.org/page/Tennis . As you can see, there is a substantial amount of structured data about this resource: the equipment includes a tennis ball and a tennis racquet; it is not a contact sport; a list of tennis associations etc… The list is very extensive.

So, now we have my blog post about my favourite sport, human readable for my avid followers, and hidden beneath that – a machine readable document holding much more information for the concepts I have written about. This information even includes a broader classification for tennis: racquet sports. You can crawl up or down the resource hierachy in DBPedia in this way.. for instance the next level up is sports, above that is hobbies, leisure, recreation, games, entertainment, and excercise. The potential for machine based semantic web reasoning now appears a lot more exciting.

Wow, I’m convinced! I want my blog content semantized!

Good decision! If you’re using WordPress, I can recommend rdface [8] – “It supports different views for semantic content authoring and uses existing Semantic Web APIs to facilitate the annotation and editing of RDFa contents.”. In essence, it allows you to select one or a number of external APIs including DBPedia Spotlight, Open Calais, and Alchemy to inspect the text of your blog post, to search for associated URIs on the cloud of Linked Open data, and to add them to the underlying HTML of your page, using RDFa [9], which is a mechanism to embed URIs into HTML documents.

I’ve been playing with rdface for the last few days, and it’s a lot of fun! I’ve even run it on this blog post, and so if you inspect the source for this page, you should see ‹span› tags scattered around, containing URIs. Remember – this is the language that’s really only useful for machines to reason on the content, but it’s reassuring to see it there!

I’ll see you in Web 3.0.. just get those blog posts annotated first!

1 – https://github.com/amccausl/RDF4H
2 – http://jena.sourceforge.net
3 – http://www.bbc.co.uk/ontologies/programmes/2009-09-07.shtml
4 – http://openbiblio.net/2010/11/17/jisc-openbibliography-british-library-data-release
5 – http://en.wikipedia.org/wiki/Resource_Description_Framework
6 – http://dbpedia.org
7 – http://www.foaf-project.org
8 – http://wordpress.org/extend/plugins/rdface
9 – http://en.wikipedia.org/wiki/RDFa

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=8782
RDF graphs to sparql update requests http://linuxsoftwareblog.com/?p=843 http://linuxsoftwareblog.com/?p=843#commentsMon, 24 Oct 2011 10:59:16 +0000Robhttp://linuxsoftwareblog.com/?p=843I’ve recently encountered a need transform named graphs expressed in RDF, into sparql update requests… with the ultimate goal of autonomously pushing named graphs into rdf stores via a sparql endpoint.

The Jena APIs provide excellent support for describing and transforming RDF graphs, though it doesn’t support named graphs, or sparql requests out of the box. So for this, I needed to combine the expressivity of the NG4J APIs and the Fuseki APIs.

Below, is compilable code that:

  • Uses Jena models and NG4J named graphs
  • Transforms a named graph into a sparql update request
  • Runs the sparql update request against a fuseki sparql endpoint, running locally

API versions used: Jena 2.6.4, ng4j 0.9.3, fuseki 0.2.0

/*
 * Author: Rob Stewart
 */
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.Statement;
import com.hp.hpl.jena.sparql.modify.request.QuadDataAcc;
import com.hp.hpl.jena.sparql.modify.request.UpdateDataInsert;
import com.hp.hpl.jena.update.Update;
import com.hp.hpl.jena.update.UpdateRequest;
import de.fuberlin.wiwiss.ng4j.NamedGraph;
import de.fuberlin.wiwiss.ng4j.NamedGraphSet;
import de.fuberlin.wiwiss.ng4j.Quad;
import de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetImpl;
import java.util.Iterator;
import org.openjena.fuseki.http.UpdateRemote;

public class RdfToSparqlUpdate {

 public RdfToSparqlUpdate() {

  /*
   * First, create the Jena model,
   * for user "PeterSmith"
   */
  Model model = ModelFactory.createDefaultModel();
  String foafNS = "http://xmlns.com/foaf/0.1/";
  model.setNsPrefix("foaf", foafNS);
  Resource user = 
     model.createResource("http://example.com/users/PeterSmith");
  Property givenNameProp = model.createProperty(foafNS, "givenName");
  Property familyNameProp = model.createProperty(foafNS, "familyName");

  /*
   * Next, create the NamedGraph using
   * ng4j classes, into the named graph
   * "http://example.com/people/PeterSmith"
   */
  NamedGraphSet graphset = new NamedGraphSetImpl();
  NamedGraph graph = 
     graphset.createGraph("http://example.com/people/PeterSmith");

  // Add the triples about Peter Smith
  // into the named graph
  Statement s;
  s = model.createStatement(user, givenNameProp, "Peter");
  graph.add(s.asTriple());
  s = model.createStatement(user, familyNameProp, "Smith");
  graph.add(s.asTriple());

  /*
   * Let's prepare the named graph
   * to become a sparql update request
   */
  QuadDataAcc data = new QuadDataAcc();
  Iterator iter = 
      graphset.findQuads(Node.ANY, Node.ANY, Node.ANY, Node.ANY);
  com.hp.hpl.jena.sparql.core.Quad quad = null;
  Quad next = null;
  while (iter.hasNext()) {
    next = iter.next();
    quad =
     new com.hp.hpl.jena.sparql.core.Quad(next.getGraphName(), next.getTriple());
    data.addQuad(quad);
  }

  // Create an Update, with the quads extracted
  // from the named graph
  Update updateData = new UpdateDataInsert(data);

  // Create the sparql update request,
  // and add prefixes
  UpdateRequest req = new UpdateRequest();
  req.setPrefix("foaf", foafNS);
  req.add(updateData);

  // Finally, execute the sparql update
  // against the sparql endpoint
  new UpdateRemote().execute(req, "http://localhost:3030/dataset/update");
  graphset.close();
 }

 public static void main(String[] args){
    new RdfToSparqlUpdate();
 }
}
]]>
http://linuxsoftwareblog.com/?feed=rss2&p=8431
GPS to HTML Report with Haskell http://linuxsoftwareblog.com/?p=819 http://linuxsoftwareblog.com/?p=819#commentsWed, 10 Aug 2011 15:00:21 +0000Robhttp://linuxsoftwareblog.com/?p=819 I’ve combined my new found hobby – cycling; my favourite gizmo – my Android phone; and my favourite programming language – Haskell, to implement the project: Gps2HtmlReport.

The program takes exported GPS tracks (gpx files), and generates a HTML report providing information such as:

  • Journey distance & time, and when the journey took place
  • Two diagrams charting elevation, accumulated distance and average speed over time
  • An OpenStreetMap diagram illustrating the journey

Here’s an example HTML report, generated by the program:
http://www.macs.hw.ac.uk/~rs46/gps2htmlreport/3/

I have released the source code on GitHub, should you want to use program (please do!).
https://github.com/robstewart57/Gps2HtmlReport

I would greatly appreciate feedback, and bug reports if you find them. To use the program, all you need is:

  • A GPS tracking device. Most Smart Phone markets will have Apps to do the job. I certainly recommend the open source  OSMTracker App. It appears to play nicely with this Haskell program.
  • The Glasgow Haskell Compiler platform
  • A few additional system packages, `GraphicsMagick’ and `cairo’

For Fedora at least, you simply need to run:

$# yum install GraphicsMagick cairo

Have fun tracking !!

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=8195
Ubuntu 11.04 Wifi for HP Pavilion [SOLVED] http://linuxsoftwareblog.com/?p=816 http://linuxsoftwareblog.com/?p=816#commentsTue, 05 Jul 2011 09:33:29 +0000Robhttp://linuxsoftwareblog.com/?p=816For the HP Pavilion tx2500 model, you can get your wifi working by simply:
$ sudo apt-get install bcmwl-kernel-source

Then reboot !

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=8162
Fedora 15: Back in the game! http://linuxsoftwareblog.com/?p=805 http://linuxsoftwareblog.com/?p=805#commentsThu, 14 Apr 2011 00:28:07 +0000Robhttp://linuxsoftwareblog.com/?p=805I have previously blogged about the future direction of the Fedora project here

But what is all of this skepticism around Gnome 3? Yesterday, I pushed through into Rawhide, so I could get my hands on the first major release of Gnome in many years. And may I just say:

Congratulations to everyone involved in the Gnome project !!!

Gnome 3 feels very sleek, unobtrusive, extremely solid, and intuitive. There may be (deliberate) functional omisions through its design mandate, but give it time – a few things feel more natural after a few hours of using the environment. Such as the lack of a maximize button… For a start, I’ve been a KDE user for the last 3 years, and I’ve always used the ‘drag-to-edge’  function for doing this. And this behavior just feels `right’.

Well done designers, coders, testers, contributors… The fact Gnome 3 will be the default DE for Fedora 15 really does put the Fedora Project back in the game!

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=8058
Gnome 3.0 backlash http://linuxsoftwareblog.com/?p=789 http://linuxsoftwareblog.com/?p=789#commentsTue, 08 Mar 2011 14:13:36 +0000Robhttp://linuxsoftwareblog.com/?p=789

Yikes !!

I read Planet Fedora each day, and the disgruntled voice of early Gnome 3.0 adopters is getting louder by the day. The feelings are epitomized by this graphic (source here):

I dabble between fluxbox and KDE 4.5 on my main PC, depending on my intention to be productive against my desire to have some eye candy. But… can I say that I *love* the state the the KDE Desktop Environment is now in, at 4.5! It is super stable, kwin is now more efficient than ever, and the DE really does feel polished and carefully considered in every corner of its design.

How did the KDE project achieve this? I remember back when KDE 4.0 was released. The backlash from the faithful KDE community was a lot louder than the Gnome 3.0 complaints. This link shows the state of the DE when it was released. Sure, version 4.0 was feature incomplete, but KDE 4.5 wouldn’t be so brilliant if it wasn’t for the fundamental rewrite in the KDE4 libraries. It is people like Aaron Seigo, of the KDE team, who had a vision. and wasn’t deterred during the KDE 4.0 transition, and can now see the fruits of his labour present throughout the KDE DE. Check out his blog.

So, KDE 4.0 was ultimately good for the KDE project. Why can’t Gnome 3.0 be great for the Gnome project? And for those people who are disappointed that their distro of choice is planning to move to Gnome 3.0, there is an answer. It was the approach that was taken by many KDE 3.5.* fans. And that is – stick with your current distro version release. Take Fedora – Fedora 14 came with Gnome 2.32 by default. A lot of Fedora users want new software as soon as it lands, to test, explore, and provide early feedback upstream. Failing that, when Fedora 15 is released with Gnome 3.0, don’t upgrade. It’s quite simple. What about your favourite software packages? Many of them will be packaged for Fedora 14. This page makes is clear that Fedora 14 will actively maintained until 1 month after Fedora 16 is released. By then, Gnome 3.* may have some of the features you’d have missed in 3.0.

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=78910
Definitive Guide to LinkedData Visualizations http://linuxsoftwareblog.com/?p=785 http://linuxsoftwareblog.com/?p=785#commentsThu, 24 Feb 2011 15:14:31 +0000Robhttp://linuxsoftwareblog.com/?p=785

Aba-Sah Dadzie and Matthew Rowe have put together a comprehensive review of many of the LinkedOpenData and RDF visualization tools freely available. Find Matt on Twitter: Matt Rowe

Take a look at the abstract, and the download link is on this page:

Approaches to Visualising Linked Data: A Survery

]]>
http://linuxsoftwareblog.com/?feed=rss2&p=7851