Quantcast

Maximum PC

It is currently Sat Aug 30, 2014 4:58 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Any way to...
PostPosted: Tue Mar 02, 2010 1:39 pm 
Team Member Top 250
Team Member Top 250

Joined: Sat Dec 30, 2006 1:16 pm
Posts: 116
I need a way to do an automated search of my 15k+ audio tags, be it mp3 or flac and make a text file based on what was found. Is anything available to do this? or do I need to spend countless hours at a text editor and do it myself?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2010 2:11 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
Not sure how to do this myself (or what you want to accomplish exactly), but it sounds like you want a script.

You can use the ">" or ">>" meta-characters to write to a file.

What exactly are you searching for?

Edit: Moved to PP as this is probably going to turn more towards a scripting/programming topic.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2010 2:15 pm 
Team Member Top 250
Team Member Top 250

Joined: Sat Dec 30, 2006 1:16 pm
Posts: 116
I'm trying to make a list of what's on my pc for music. Instead of typing out 15k+ items manually, I would like something to do it automatically.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2010 2:57 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
Moved to Multimedia Madhouse .. unless you're planning to write an app to do this, this is where your question belongs. :) Easier to find an existing app than to write on yourself.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2010 3:55 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
Jipstyle wrote:
Moved to Multimedia Madhouse .. unless you're planning to write an app to do this, this is where your question belongs. :) Easier to find an existing app than to write on yourself.


When I moved it from WP, was a toss-up from MM and PP.

Figured since he was looking for something uncommon like this that a custom script was the way to go.

My bad.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2010 2:24 am 
Team Member Top 100
Team Member Top 100

Joined: Sun Feb 12, 2006 2:52 pm
Posts: 1994
Location: Cryptogram City!
A bat file will do this, very simply.

Open a console (DOS) terminal window

Type copy con Get_MPG_files.bat<hit enter>
dir *.mpg /O:n >mympgFiles.txt <hit enter>
notepad mympgFiles.txt<enter>
<hit Ctrl-z><enter>

console will report "1 file copied".

You now have a bat file that will execute this command, in this directory.

You can right click on the file in Windows explorer, and give it a shortcut & icon, and keep it on your desktop.

Every time you type Get_MPG_files<enter>, a new list of your mpg files in that directory, will be made, and the file displayed in notepad, in sorted order, by the name of the file. (this can be changed, of course).

It can be expanded to search other directories, and other file types, no problem.

Bat files are powerful things. Don't give them any instructions to do anything that might involve your system files!


Top
  Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2010 9:03 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24222
Location: Granite Heaven
hackman2007 wrote:
Jipstyle wrote:
Moved to Multimedia Madhouse .. unless you're planning to write an app to do this, this is where your question belongs. :) Easier to find an existing app than to write on yourself.


When I moved it from WP, was a toss-up from MM and PP.

Figured since he was looking for something uncommon like this that a custom script was the way to go.

My bad.


Huh. Ooops.

I'll move it back then. Now there'll be a shadow topic in both forums .. probably get the most responses that way. :)


Top
  Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2010 11:34 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Adak wrote:
A bat file will do this, very simply.

Open a console (DOS) terminal window

Type copy con Get_MPG_files.bat<hit enter>
dir *.mpg /O:n >mympgFiles.txt <hit enter>
notepad mympgFiles.txt<enter>
<hit Ctrl-z><enter>

He said "audio tags" Adak, not mpg files. ;)

Actually, renaming the files (if necessary) is going to be the easiest way to capture most of the tag info. Check out mp3 tag editor in the book Practical Common Lisp if you really want to come up with a programmatic solution.

The easy way...

1) Use an mp3 tag program to update all of the tag info and then change the filenames to include all of the information that you want to capture (eg artist - album - song.mp3).

2) Use a script like the one Adak suggested to capture the information. I have all of my audio files in the "My Music" folder on my laptop, but let's assume that you have them scattered across the hard disk.

I would use the /s and /b switches with dir and redirect the output to a file that I would probably dump import into Google spreadsheets and do any sorting/filtering there.

The /s switch causes dir to traverse all of the subdirectories (ie you do less work) and the /b option prints the output in a denser format. Change to the root directory and type in...

dir /s /b *.mp3 *.wma (list out all of the file types that you want in the output).


Top
  Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2010 5:08 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
You and that Lisp of yours... I swear...


Top
  Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2010 12:42 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
You and that Lisp of yours... I swear...

Haha... =)

You should check out Practical Common Lisp -- there is a free version online. It contains some pretty cool projects, plus you'll develop a deeper appreciation for some of the evolutionary changes in programming languages.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Mar 07, 2010 3:15 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Gadget wrote:
CrashTECH wrote:
You and that Lisp of yours... I swear...

Haha... =)

You should check out Practical Common Lisp -- there is a free version online. It contains some pretty cool projects, plus you'll develop a deeper appreciation for some of the evolutionary changes in programming languages.
I used Lisp in my AI class, and I'd rather not revisit those dark times... lol


Top
  Profile  
 
 Post subject:
PostPosted: Sun Mar 07, 2010 9:43 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
Gadget wrote:
CrashTECH wrote:
You and that Lisp of yours... I swear...

Haha... =)

You should check out Practical Common Lisp -- there is a free version online. It contains some pretty cool projects, plus you'll develop a deeper appreciation for some of the evolutionary changes in programming languages.
I used Lisp in my AI class, and I'd rather not revisit those dark times... lol

That's actually one of the biggest stumbling blocks to Lisp advocacy. Lisp shouldn't be synonymous with AI -- It should be synonymous with a language that is well equipped for solving difficult problems.

Unless things have changed, Berkeley has their undergrads spend one class learning C, one class learning Java and one class learning Lisp. In the C course, they learn concepts largely related to C, OOP during the Java class, and language abstraction during the Lisp course. To really appreciate a language, you need to spend at least a month using it (unless it happens to be a toy language like Logo). The problem is that everyone seems to get a half-arse one week introduction to Lisp during their AI class (my AI teacher was a horrible Lisp instructor), when they should really be learning AI. No one ever develops an appreciation for the power and expressiveness of Lisp. I wish SICP was required viewing for all US households with a computer system!

For example... how many lines of code would it take to write a C# interpretor in C#? Here is a functional, albeit barebones, Lisp interpretor written in Lisp.

Code:
CL-USER> (dotimes (i 3)    ;I just had it loop three times bc I'm working in my Lisp environment at the moment... easier to delete.  =)
      (princ "> ")
      (format t "~a~%" (eval (read))))
> (+ 1 2 3 4)
10
> (setf arr (make-array '(4 4)))
#2A((NIL NIL NIL NIL) (NIL NIL NIL NIL) (NIL NIL NIL NIL) (NIL NIL NIL NIL))
> (remove-if-not #'evenp '(1 2 3 4 5 6))
(2 4 6)
NIL
CL-USER>


How easy is it to add new language features to either C# or Java? For example, let's say that you've fallen in love with Perl's until loop. Could you add it to C#? Not really... unless you are willing to do the dirty work of creating your own parser and compiler, right? In lisp, this is fairly trivial...

Code:
;;until loop -- taken from the CL wikipedia article, but I think it may
;;also appear in On Lisp
(defmacro until (test &body body)
  `(do ()
    (,test)
    ,@body))

;example usage...
(until (learns 'CrashTech 'Lisp)
       (print "hello?!"))


Just kidding about that last example... =)


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 08, 2010 5:07 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I am not saying Lisp is bad. I am saying it is painful for me. lol. There is a difference :)

The AI class was terribly painful and it made me hate working with Lisp because the projects were asinine and the prof was kind of a jerk.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot 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:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group