AutoHotkey Community

It is currently May 27th, 2012, 5:24 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: February 7th, 2011, 3:59 am 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Im looking for the best way to create a searchable database of music I have on my home PC. I would like this database to be searchable on a website that I can share with friends.

Anyone seen an app or script that can do this?

_________________
Zak M.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 5:45 am 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
Would your database only contain the names of the MP3 files (or whatever format files) or include other fields?

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 5:47 am 
flyingDman wrote:
Would your database only contain the names of the MP3 files (or whatever format files) or include other fields?


Just need folders and file names, just .mp3 files.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 6:20 am 
Offline

Joined: September 15th, 2006, 10:25 am
Posts: 567
approx how many files are there? if small, a flat-file database will do..

_________________
If i've seen further it is by standing on the shoulders of giants

my site | ~shajul | WYSIWYG BBCode Editor


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 6:23 am 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
The first part of this project is to locate the mp3's on you system and display them in a listview. I have all my MP3's (5000 or so) in a the music folder. The following gets all my files in about 2 seconds:
Code:
Gui, Add, ListView, x10 y+4 h550 w480 -Hdr altsubmit vlocdir -multi gopenfile, file name
Gui, Show,x0 y0 w500 h600, MP3db
GuiControl, -Redraw, locdir
Loop, C:\Users\flyingDman\Music\*.mp3,,1
   LV_Add("", A_LoopFilename)
GuiControl, +Redraw, locdir
return

openfile:
;play the Mp3
return

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 6:41 am 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
Then, we add a search box:

Code:
Gui, Add, ListView, x10 y+4 h550 w480 -Hdr altsubmit vlocdir -multi gopenfile   , file name
Gui, Add, Text,    x10 y+5                                          , search
Gui, Add, Edit,    x+5 yp-2 h18 w160 -tabstop vsearchvar gPopdir            ,
Gui, Add, button,    x+5 yp+2 gnofilter                                 , clear
Gui, Show,         x0    y0 w500 h600                                 , MP3db


Popdir:
gui, submit, nohide
LV_Delete()
GuiControl, -Redraw, locdir
Loop, C:\Users\flyingDman\Music\*.mp3,,1
   {
   IfInString, A_LoopFilename, %searchvar%
   LV_Add("", A_LoopFilename)
   }
GuiControl, +Redraw, locdir
return

openfile:
;play the Mp3
return

nofilter:
guicontrol,,searchvar,
return

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 7:00 am 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
Nice but this only works local. Im looking for a way to make a webpage that my friends can see what music I have.

_________________
Zak M.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 7:10 am 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
That's the next step! Do you have a webhost?

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 2:46 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Possibly related: Zoho [external link]

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 2:56 pm 
Offline

Joined: May 19th, 2006, 4:56 am
Posts: 166
flyingDman wrote:
That's the next step! Do you have a webhost?


yep

_________________
Zak M.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 7th, 2011, 3:17 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Completely unrelated, I wouldn't bother with the above, but rather make it so they can play/download directly as well from your home network:
http://www.autohotkey.com/forum/viewtop ... 537#322537

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 8th, 2011, 7:39 am 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
It is obvious that there are better ways to share your list of MP3's. I worked with Collectorz in the past and found that their database was quite slick. But that's not the OP's request...
Here is the minimalist final (?) product. It finds all your MP3's on your system, shows them in a listview, creates a HTLM file, and uploads it to a website:
Code:
counter = 0
Gui, Add, ListView, x10 y+4 h550 w480 -Hdr altsubmit vlocdir -multi gopenfile   , file name
Gui, Add, Text,    x10 y+5                                          , search
Gui, Add, Edit,    x+5 yp-2 h18 w160 -tabstop vsearchvar gPopdir            ,
Gui, Add, button,    x+5 yp+2 gnofilter                                 , clear
Gui, Add, button,    x+5 yp+0 gcreateHTML                              , html
Gui, Add, button,    x+5 yp+0 gupload                                 , upload
Gui, Show,         x0    y0 w500 h600                                 , MP3db

Popdir:
gui, submit, nohide
LV_Delete()
GuiControl, -Redraw, locdir
Loop, C:\Users\flyingDman\Music\*.mp3,,1
   {
   IfInString, A_LoopFilename, %searchvar%
   LV_Add("", A_LoopFilename)
   ++counter
   }
GuiControl, +Redraw, locdir
return

openfile:
;play the Mp3
return

nofilter:
guicontrol,,searchvar,
return

createHTML:
traytip,creating HTML,please wait, 3, 1
i = 1
filedelete %A_ScriptDir%\MP3collection.htm
FileAppend,
   (Ltrim
   <html><head><title>MP3Collection</title>
   <style type="text/css" media=screen>
   <!--
      body,td,H1 {font-family: "segoe ui";text-align: left;font-size: 11pt}
   // -->
   </style>
   </head>
   <body><center><h1>MP3 Collection</h1></center>
   <table align=center border=1 width=70`%>
   ), %A_ScriptDir%\MP3collection.htm
Gui, ListView, locdir
loop , %counter%
   {
   LV_GetText(prn1, a_index , 1)
   fileappend, `r`n<tr><td>%prn1%</td></tr>, %A_ScriptDir%\MP3collection.htm
   }
fileappend, `r`n</font></table></body></html>, %A_ScriptDir%\MP3collection.htm
traytip,Success,creating HTML complete!, 3, 1
sleep, 2000
;run, %A_ScriptDir%\MP3collection.htm
traytip
return

upload:
server := "server.com", ID := "yourID", PW := "yourPW"
traytip,uploading, please wait, 3, 1
rmtfl = MP3collection.htm
lclfl = %A_ScriptFullPath%
hConnect:=FTP_Open(server, 21, id, pw)
FTP_PutFile(hConnect, lclfl, rmtfl)
FTP_CloseSocket(hConnect)
FTP_Close()
traytip, Success!,uploading complete, 3, 1
sleep, 2000
traytip
return


requires FTP.ahk standard lib

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], HotkeyStick, rbrtryn, XstatyK, Yahoo [Bot] and 84 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group