The nikepub package

[Tags: lgpl, program]

Simple commandline program that given a Nike+ user id will fetch the most recent Nike+ run and publish it to any blog and/or Twitter account. Assumes the Nike+ user profile is public. Supports customizable templates for the blog entry title, body and Twitter status update. Any blogging system with XML-RPC support for metaWeblog.newPost (like WordPress or MovableType) is supported.


[Skip to ReadMe]

Properties

Versions1.0, 1.1, 1.1.1, 1.1.2
Change logNone available
Dependenciesbase (>=4.1.0.0 && <5), containers (>=0.2.0.1), filepath (>=1.1.0.2), GoogleChart (>=0.2), haskell98, haxr (>=3000.2.1), hs-twitter (>=0.2.8), HStringTemplate (>=0.5.1.2), HTTP (>=4000.0.6), hxt (>=8.3.0), json (>=0.4.3), network (>=2.2.1), old-locale (>=1.0.0.1), old-time (>=1.0.0.2), regex-compat (>=0.71.0.1), regex-posix (>=0.72.0.3), syb (>=0.1.0.1), time (>=1.1.2.4) [details]
LicenseLGPL
AuthorUwe Hoffmann
Maintaineruwe@codemanic.com
CategoryWeb
Home pagehttp://www.codemanic.com/uwe
Executablesnikepub
UploadedWed Jul 8 06:22:24 UTC 2009 by UweHoffmann
DistributionsNixOS:1.1.2
Downloads554 total (33 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
All reported builds failed as of 2015-05-20 [all 2 reports]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for nikepub-1.1.2

nikepub

INTRODUCTION

nikepub is a simple commandline program that given a Nike+ user id will fetch the
most recent Nike+ run and publish it to any blog and/or Twitter account.
Assumes the Nike+ user profile is public. Supports customizable templates
for the blog entry title, body and Twitter status update. Any blogging
system with XML-RPC support for metaWeblog.newPost (like WordPress or MovableType)
is supported.

A description of the implementation can be found in this series of blog posts:

http://www.codemanic.com/uwe/2009/05/publishing-nike-runs-part-1-numeric-lists.html
http://www.codemanic.com/uwe/2009/06/publishing-nike-runs-part-2-google-charts.html
http://www.codemanic.com/uwe/2009/06/publishing-nike-runs-part-3-handling-xml.html
http://www.codemanic.com/uwe/2009/06/publishing-nike-runs-part-4-string-templates.html
http://www.codemanic.com/uwe/2009/06/publishing-nike-runs-part-5-blogging-and-twitter.html

INSTALLATION

nikepub comes as a cabal package so doing 

$ runhaskell Setup configure --prefix=$HOME --user
$ runhaskell Setup build
$ runhaskell Setup install

in the untarred package directory will install nikepub in $HOME/bin.

USAGE

Example command line flags (fill in values where you see <value description>s):

nikepub
 --id=<your nike+ id> \
 --templates=<path to a templates dir> \
 --mtUrl=<url to your blog xml-rpc> \
 --mtUser=<your blog username> \ 
 --mtPassword=<path to a file containing your blog api password> \ 
 --message=<any additional message you want in blog entry> \ 
 --twitterUser=<your twitter username> \
 --twitterPassword=<path to a file containing your twitter password>

The distribution package contains an example template directory. It can be used directly or customized.
The example template files have all the supported $fields$ in them. All three files must be present in
a template directory. You might want to copy the template directory into a more convenient place.
Templates can contain special comments with JSON strings configuring the desired chart size 
(more configuration properties to follow in later versions).

Your Nike+ profile is assumed to be public. nikepub doesn't work with non-public profiles (if you publish
your runs with nikepub you might as well have your profile public). Your Nike+ id is an integer. The simplest way
to find it out is to share a run or your profile in the Flash UI on the Nike+ website by choosing to grab
the link to the run you want to share in the Share menu.
The pasteboard now has a URL with your Nike+ user id in the URL params.

The --message flag on the nikepub commandline lets you append an arbitrary message to the body of the generated
blog entry.

If the --draft flag is present then the blog entry is not published but sent as a draft to the blogging system.

The flag --airport allows for the specification of an airport code. It is used to fetch the weather conditions
during the run. nikepub must be executed within 90 minutes of the run start time for it to fetch the weather.

BUGS, SUGGESTIONS, COMMENTS

Please send to uwe@codemanic.com