Are you using Akubra?
Here's a script I wrote to match a PID and datastream to an Akubra
storage location.
#=======================================================================#
# getDatastreamPath.sh <fedora object pid>
# Get the path where Akubra has stored a datastream
# Scott Prater
# October 2010
#=======================================================================#
#=======================================================================#
# Configuration
#=======================================================================#
# Object root directory, as defined in akubra-llstore.xml
dsroot='/path/to/datastreams/root'
# The awk print string matches the directory pattern defined in
akubra-llstore.xml (ours is #/##/##)
awkcmd='{ print substr($0,1,1) "/" substr($0,2,2) "/" substr($0,4,2); }'
#=======================================================================#
# Main
#=======================================================================#
if [ "X$1" == "X" ]
then
echo "Usage: $0 <fedora_object_pid-datastream>" 1>&2
exit 1
fi
pid="$1"
path=`echo -n "info:fedora/$pid" | md5sum | awk "$awkcmd"`
fmtpid=`echo -n "info:fedora/$pid" | sed 's/:/%3A/g' | sed 's#/#%2F#g'`
ls -l "$dsroot/$path/$fmtpid"
-- Scott
On 10/09/2013 02:03 PM, Yott, Patrick wrote:
> Fedora Folk:
>
> I'm trying to determine how I can interpret the storage location of
> files stored within my datastreamStore. My end game is to have Wowza
> (which sits atop the same storage mount as our Fedora instance) "reach"
> into the storage to play a video asset that is managed by Fedora. The
> mechanism would be to have fedora create a URL as a dissemination that
> would provide a wowza link to the asset itself.
>
> The datastream record contains an internal reference that begins with
> the PID, like this:
>
> <foxml:contentLocation TYPE="INTERNAL_ID"
> REF="neu:16+THUMBNAIL+THUMBNAIL.0"/>
>
>
> but there are higher level directories (named with 2 character patterns)
> within the datastreamStore directory that must be traversed before I can
> actually locate this asset.
>
> I poked around the mySQL tables, but I don't find any that provide this
> sort of information.
>
> I'm more than confident that I'm missing something obvious here, so any
> pointers / kicks to the head would be greatly appreciated.
>
> thanks,
>
> Patrick
>
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
--
Scott Prater
Shared Development Group
General Library System
University of Wisconsin - Madison
[email protected]
5-5415
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users