1

Topic: Uploading lots of files to Karaoke Anywhere

Great software.  From the instructions it appears you should be able to upload multiple files on a Mac by finding "KaraokeAnywhere" via Bonjour.  I was unable to find this in Finder.  The alternative is to use your web browser to upload.  I had a hundred CDGs to upload and this was time consuming, so I wrote a script to upload all files in a directory.

I'm sharing this script here.  You need to be familiar with the Terminal application to use it.

1. Go to the directory with your CDG files in it.
2. Create a file called "upload.sh" and give it execute permissions. 
3. Copy the following into the file.  Change the 10.0.1.7:10190 IP address with the one KaraokeAnywhere tells you to use.
4. Execute with ./upload.sh

--everything past this line goes into upload.sh--
#!/bin/bash

files="*.zip"
for f in $files
do 
    curl -s -F "mp3_file=@$f" http://10.0.1.7:10190/upload-file
done

2

Re: Uploading lots of files to Karaoke Anywhere

Awesome work!

3

Re: Uploading lots of files to Karaoke Anywhere

Hey I got this error when I executed the shell file.

./upload.sh
./upload.sh: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf290: command not found
./upload.sh: line 2: syntax error near unexpected token `}'
./upload.sh: line 2: `{\fonttbl\f0\froman\fcharset0 Times-Roman;\f1\fnil\fcharset0 LucidaGrande;}'

4

Re: Uploading lots of files to Karaoke Anywhere

This officially works. When he meant do it in Terminal, it literally means do it in Terminal. For all your Mac users out there follow this instruction. I'll improvise on his code:

1> Go to Spotlight and search for Terminal. It should be the first thing that pops up.
2> Open the folder that contains your CDG+MP3 Zip files
3> With Terminal opened already, type cd and press space once.
4> Drag the folder containing the files into Terminal and press Enter. It should be something like this:
$Anonymous: cd /users/Anonymous/...blah blah blah..
5> Type: sudo touch upload.sh (this creates the file)
6> Now go into the folder containing the files it should have the upload.sh file.
7> Open up upload.sh in TextEditor by right clicking it and select TextEditor.
8> Paste the following into the TextEditor (replace the 1.1.1.1 with the numbers given to you in the app, [Transfer] section):

#!/bin/bash

files="*.zip"
for f in $files
do
    curl -s -F "mp3_file=@$f" http://1.1.1.1:10190/upload-file
done

9>Save it when you are done.
10> Back inside Terminal type: chmod 755 upload.sh (this gives it execution permission)
11> Finally type: ./upload.sh
And just sit back and let it do its thing inside terminal. Inside the app you can see it starts "Importing..." once it's done it should stop :]

I am not an expert but this is what I did. If you have a problem you should Google it. Or ask here anyway. I have 1000+ files so this really helped me like the app better :]

Last edited by thiencao (09/01/2010 01:05 PM)