
There used to be a log of Hackage uploads available at [1], but "it's just not here" anymore. Has that content moved to a different URL? Or is there some new way to get that information? I'd like to know the upload dates of every package. I could definitely screenscrape fro the date on the package listing pages, but I was hoping for something a bit more elegant. [1] http://hackage.haskell.org/packages/archive/log

On Fri, Apr 11, 2014 at 9:02 AM, Michael Snoyman
There used to be a log of Hackage uploads available at [1], but "it's just not here" anymore. Has that content moved to a different URL? Or is there some new way to get that information? I'd like to know the upload dates of every package. I could definitely screenscrape fro the date on the package listing pages, but I was hoping for something a bit more elegant.
Just in case anyone else needs something like this, I ended up hacking together a quick screen scraper, though it would be nice if this was available via an API: {-# LANGUAGE OverloadedStrings #-} import Text.XML.Cursor import Text.HTML.DOM (sinkDoc) import Network.HTTP.Client.Conduit import Data.Conduit import Control.Monad.IO.Class import qualified Data.Text as T import Data.Time import System.Locale main = withManager $ do withResponse ("http://hackage.haskell.org/package/conduit-1.1.0") $ \res -> do doc <- responseBody res $$ sinkDoc let uploadDate = fromDocument doc $// element "th" >=> hasContent "Upload date" >=> followingSibling &/ content liftIO $ print (parseTime defaultTimeLocale "%c" $ T.unpack $ T.concat uploadDate :: Maybe UTCTime) hasContent t c = if T.concat (c $// content) == t then [c] else []

On Fri, 2014-04-11 at 14:32 +0300, Michael Snoyman wrote:
On Fri, Apr 11, 2014 at 9:02 AM, Michael Snoyman
wrote: There used to be a log of Hackage uploads available at [1], but "it's just not here" anymore. Has that content moved to a different URL? Or is there some new way to get that information? I'd like to know the upload dates of every package. I could definitely screenscrape fro the date on the package listing pages, but I was hoping for something a bit more elegant.
Just in case anyone else needs something like this, I ended up hacking together a quick screen scraper, though it would be nice if this was available via an API:
... withResponse ("http://hackage.haskell.org/package/conduit-1.1.0") $ ...
It is available directly at: http://hackage.haskell.org/package/conduit-1.1.0/upload-time and you may also be interested in http://hackage.haskell.org/package/conduit-1.1.0/uploader How would you know this exists? The whole API is automatically (if not brilliantly) documented: http://hackage.haskell.org/api (which itself is mentioned on the front page) The goal has always been that all the info be publicly available in human and machine readable formats (at least JSON). There are certainly things missing, but we'll accept patches that exposes more stuff. Duncan

On Fri, Apr 11, 2014 at 4:01 PM, Duncan Coutts wrote: On Fri, Apr 11, 2014 at 9:02 AM, Michael Snoyman There used to be a log of Hackage uploads available at [1], but "it's
just
not here" anymore. Has that content moved to a different URL? Or is some new way to get that information? I'd like to know the upload
dates of
every package. I could definitely screenscrape fro the date on the On Fri, 2014-04-11 at 14:32 +0300, Michael Snoyman wrote:
there
package listing pages, but I was hoping for something a bit more elegant. Just in case anyone else needs something like this, I ended up hacking
together a quick screen scraper, though it would be nice if this was
available via an API: ...
withResponse ("http://hackage.haskell.org/package/conduit-1.1.0") $
... It is available directly at: http://hackage.haskell.org/package/conduit-1.1.0/upload-time
and you may also be interested in
http://hackage.haskell.org/package/conduit-1.1.0/uploader How would you know this exists? The whole API is automatically (if not
brilliantly) documented: http://hackage.haskell.org/api
(which itself is mentioned on the front page) The goal has always been that all the info be publicly available in
human and machine readable formats (at least JSON). There are certainly
things missing, but we'll accept patches that exposes more stuff. Duncan Thanks, I looked through that page, but somehow missed the upload-time call.
It would still be convenient to have the entire upload history in a single
page available, but this will provide what I need for now. Thank you!
Michael

On Fri, 2014-04-11 at 16:59 +0300, Michael Snoyman wrote:
On Fri, Apr 11, 2014 at 4:01 PM, Duncan Coutts
wrote:
It is available directly at:
http://hackage.haskell.org/package/conduit-1.1.0/upload-time and you may also be interested in http://hackage.haskell.org/package/conduit-1.1.0/uploader
How would you know this exists? The whole API is automatically (if not brilliantly) documented:
http://hackage.haskell.org/api (which itself is mentioned on the front page)
The goal has always been that all the info be publicly available in human and machine readable formats (at least JSON). There are certainly things missing, but we'll accept patches that exposes more stuff.
Duncan
Thanks, I looked through that page, but somehow missed the upload-time call.
It's currently grouped by feature. I had intended to also have a merged view with the resources from all features which would be helpful at times like these. (Turned out to be slightly more tricky than I'd expected so I didn't implement it.)
It would still be convenient to have the entire upload history in a single page available, but this will provide what I need for now. Thank you!
Patches gratefully accepted! :-) Duncan
participants (2)
-
Duncan Coutts
-
Michael Snoyman