Jump to content

cd catalog


acuss
 Share

Recommended Posts

What you guys use for indexing files on CDs?

I've tried some apps, but they dont satisfy me.

- MediaLibrary 0.4.2 (java) seems ok but it loads too long when the collection getting bigger (more than 15 sec with 113 cd indexed on pentium4 2.4+ 1 gb ram+mdk91)

- GWhere always crash (segmentation fault) when index the second cd, so i have to restart it.

 

I've also tried some webbased (with php) apps, and also disappointing, loads too long when open an indexed cd with thousands files on it.

 

thx

Link to comment
Share on other sites

I use

$ cd /mnt/cdrom
$ find . -noleaf -xdev -type f -printf '%TY/%Tm/%Td-%TH:%TM:%TS %10s %p\n' | sort -k 3 >/local/share/CDs/cd##.find

where ## is the CD number (all my CDs are numbered from 01 to ...)

 

Of course, you can put this in a script. You can even make a script that goes to /mnt/cdrom, executes the above command, find the next number, put the listing in the appropriate file, and then display a window with the number so that you can write it on the CD :-) Here we go. It's not all that hard

#!/bin/bash
# parameter $1 is the CD location, usually /mnt/cdrom
# parameter $2 is the location for your listing files (/local/share/CDs in my example)

[ -d "$2" ] || exit

lastNumber=$(cd "$2" && /bin/ls cd??.find | sort | tail -n 1 | sed 's|^cd\(..\).*$|\1|')
nextNumber=$(( ${lastNumber:-0} + 1 ))
if [ $nextNumber -lt 10 ]; then nextNumber="0${nextNumber}"; fi

cd "$1"
$ find . -noleaf -xdev -type f -printf '%TY/%Tm/%Td-%TH:%TM:%TS %10s %p\n' | sort -k 3 >"${2}/cd${nextNumber}.find"

xmessage "$1 has been listed to file ${2}/cd${nextNumber}.find"

 

Yves.

Edited by theYinYeti
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...