Java library for reading and writing web shortcut files
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
standalone_tests
.gitignore
LICENSE
LICENSE_for_jutf7.txt
LICENSE_for_plist
README.md
pom.xml

README.md

WebShortcutUtil (Java library)

Summary

Allows you to read and write web/internet shortcuts created in Windows, Linux, and Apple. Specifically, these are files with the following extensions: .url, .website, .desktop, .webloc. This library is part of the Web Shortcut Utility Suite.

This library has been tested on Android and appears to be completely compatible.

Websites

Maven Repository: http://mvnrepository.com/artifact/com.abcodeworks/webshortcututil
JavaDocs: http://abcodeworks.github.io/WebShortcutUtil-Java/javadoc/latest/
Source Code: https://github.com/abcodeworks/WebShortcutUtil-Java/

Maven Repository

The library is published to the Maven repository. Use the following dependency:

<dependency>
    <groupId>com.abcodeworks</groupId>
    <artifactId>webshortcututil</artifactId>
    <version>1.0.1</version>
</dependency>

Building

  • To compile:
    mvn compile

  • To run unit tests (note that some file names contain unicode characters, so it may not work
    on all operating systems - I tested successfully on Ubuntu 12.04):
    mvn test
    Detailed error information is in: target/site/surefire-reports

  • To run unit tests in a debugger:
    mvn -Dmaven.surefire.debug test
    See http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html

  • to generate test coverage reports:
    mvn cobertura:cobertura
    xdg-open target/site/cobertura/index.html

  • To generate javadocs:
    mvn javadoc:javadoc
    xdg-open target/site/apidocs/index.html

  • To package:
    mvn package
    The jar file is in the target/ folder

  • To deploy to the Maven repository:
    Follow this guide: http://central.sonatype.org/pages/ossrh-guide.html To stage: mvn clean deploy You will be prompted for the GPG Passphrase To release: mvn nexus-staging:release

    Need local settings.xml in ~.m2/ folder:
    ossrh xxx yyy

    Need GPG key set up:
    For backuping up/restoring keys: https://help.ubuntu.com/community/GnuPrivacyGuardHowto

Future Ideas

Some ideas for enhanced functionality:

  • Improve ability to read an unknown shortcut from an input stream.
  • For ".desktop" files, add logic to extract the names embedded in a shortcut (including all localized versions of the name). Similar logic could also be written for ".website" files.
  • Explore unicode functionality for ".webloc" files. Will a Mac open a URL that has unicode characters?
  • Add an ASCII conversion option to the filename creation routines (i.e. to remove unicode characters).

Libraries and Licenses

This project is released under the Apache License 2.0.

This project includes the following libraries:

All licenses can be found in the root folder.

References