FasdUAS 1.101.10 k l   flac2aac 0.1 (2004-08-12) l  +% Jason Kaufman   l  '! http://thebadlands.org/flac2aac/  l )# "Yes it sucks, but so does iTunes" l l ]W Adapted from Jonathan Nathan's Make MP3 Audio Book - http://homepage.mac.com/jonn8/as/ p 0 output_dir p 0 shell_path i I .aevtoappnull**** kb  !" !r#$ #m% %)#export PATH=:/usr/local/bin:$PATH;  $o 0 shell_path"&' &r() (m* *~/Music/ )o 0 output_dir'+, +r-. -I/ .sysoexecTEXTTEXT /b01 0b 23 2b 45 4o 0 shell_path 5m 6 6 echo  3o 0 output_dir 1m 7 7 | sed -e "s%~%${HOME}%" .o 0 output_dir,89 8r*:; :n&<= <1$&  bhit =l$> >I$?@ .sysodlogaskrTEXT ?mA ANHWould you like to process a directory full of FLACs or select one FLACs?@BC  btns BJDDEF EmG G FolderFH HmI I FileCJK  dflt JmKL  disp Lm  ;o 0 the_button9M MZ+bNOP N=+2QR Qo+. 0 the_button Rm.1S S File OI5JT .aevtodocnullalis TJ5FUUV Vl5DW Wc5DXY Xl5@Z ZI5@[ .sysostdfalisnull[\  prmp \m9<] ]& Select a FLAC to convert to AAC: Ym@C  alis PIMb^ .aevtodocnullalis ^JM^__` `cM\ab alMXc cIMXd .sysostflalisnullde  prmp emQTf f'!Select a directory full of FLACs: bmX[  alisgh glhij iikl kIm .aevtodocnullalis mo 0 the_files lYCnop nk>qqrs rrtu tcvw vnxy x4z  cobj zo 0i yo 0 the_files wm  TEXT uo 0the_files{ {Z>|}~ |D o 0the_file m : }n# I# 0process_folder o 0the_file f ~Z&> >&/ n&- I'- 0 check_file o'( 0the_file m() flac f&' m-.  boovfals n2: I3: 0make_aac c36 o34 0the_file m45  alis f23 0i om pI .corecnte******** o 0 the_filesj l i I 0process_folder o 0 the_folder k( r n I 0 get_file_list o 0 the_folder m flac f o 0 the_flacs Y ( n# I# 0make_aac c n 4  cobj o 0i o 0 the_flacs m  alis f 0i m  I .corecnte******** o 0 the_flacs l i  I 0 check_file o 0the_file o 0file_extension Z l D o 0the_file o 0file_extension L o 0the_file L m  boovfals l~~ i I}| }0 get_file_list o{ {0 the_folderz oy y0file_extensionz| k] r Jxx ow w 0 the_files O r  n  2 v v cobj 4 u u cfol o t t0 the_folder os s 0 file_list mnull߀ Finder.app۠07 `()( MACSalisfUntitledtH+ Finder.app2T. CoreServices~ /Untitled:System:Library:CoreServices:Finder.app Finder.appUntitled&System/Library/CoreServices/Finder.app/ XZr Z#Uq D#( l#&p c#& o#$o o 0new_file m$%n n TEXTp m&' : n+3 I,3ml m0process_folderk c,/ o,-j j 0new_file m-.i i TEXTkl f+,q k6U r6A l6?h n6? I7?gf g0 check_file l7:e c7: o78d d 0new_file m89c c TEXTeb o:;a a0file_extensionbf f67h o` ` 0the_file_ ZBU ^] >BE   oBC\ \ 0the_file  mCD[ [ boovfals  rHQ   bHO oHIZ Z 0 the_files JINY cIL oIJX X 0new_file mJKW W TEXTY  oV V 0 the_files^]_ r 0new_file oU U 0 file_listT L[] o[\S S 0 the_filesT lRR # End Make MP3 Audio Book code lQPQP i ION O 0make_aac M  oL L 0a_flacMN k!!"# "r $% $n&' &1K K strq 'n() (1J J psxp )l*I *c+, +oH H 0a_flac ,mG G alisI %oF F0shellified_flac#-. -l EDED./0 /I C1B C 0 flac2aiff12A 2o @ @0shellified_flacAB034 3l?>?>456 5r78 7m9 9: 8n:; :1= = txdl ;1< < ascr6<= <r)>? >I';@: ;.sysoexecTEXTTEXT @b#AB Ab!CD CbEF Eo9 90 shell_path FmG G echo  Dl H8 Hn IJ I4 7K 7 citm Km66 JlL5 LcMN Mo4 4 0a_flac Nm3 3 TEXT58 Bm!"O O | sed -e 's%flac$%aiff%': ?o2 2 0the_name=PQ Pr*4RS R4*21T 1 psxf Tl,1U0 Uc,1VW Vl,/X/ Xb,/YZ Yo,-. .0 output_dir Zo-.- - 0the_name/ Wm/0, , TEXT0 So+ + 0the_aiffQ[\ [l55*)*)\]^ ]r5E_` _I5C(a' (0 strip_equalsab& bI6?%c$ %.sysoexecTEXTTEXT cb6;de db69fg fo67# #0 shell_path gm78h h%metaflac --show-vc-field=ALBUM  eo9:" "0shellified_flac$&' `o! !0 track_album^ij irFXkl kIFV m 0 strip_equalsmn nIGRo .sysoexecTEXTTEXT obGNpq pbGLrs roGH 0 shell_path smHKt t& metaflac --show-vc-field=ARTIST  qoLM 0shellified_flac lo 0 track_artistjuv urYkwx wIYiy 0 strip_equalsyz zIZe{ .sysoexecTEXTTEXT {bZa|} |bZ_~ ~oZ[ 0 shell_path m[^ '!metaflac --show-vc-field=COMMENT  }o_` 0shellified_flac xo 0 track_commentv rl~ Il| 0 strip_equals Imx  .sysoexecTEXTTEXT bmt bmr omn 0 shell_path mnq %metaflac --show-vc-field=TITLE  ors 0shellified_flac  o 0 track_name r c I 0 strip_equals I .sysoexecTEXTTEXT b b o 0 shell_path m +%metaflac --show-vc-field=TRACKNUMBER  o 0shellified_flac m  long o 0 track_number l set track_vol_adj to (strip_equals(do shell script shell_path & "metaflac --show-vc-field=REPLAYGAIN_TRACK_GAIN " & shellified_flac & " | cut -d' ' -f1") as integer) l ! if track_vol_adj = "" then l  set track_vol_adj to 0 l  end if l 93set track_vol_adj to (track_vol_adj as integer) * 2 r c I 0 strip_equals I .sysoexecTEXTTEXT b b b o 0 shell_path m $metaflac --show-vc-field=DATE  o 0shellified_flac m %| cut -d'-' -f1 | cut -d'.' -f1 m  long o 0 track_year l l a[ From Doug's AppleScripts for iTunes - http://www.malcolmadams.com/itunes/itinfo/info02.php O k I .miscactvnullnull r 4  cPly m  Library o 0 the_playlist r 1  pEnc o 0preferred_encoder r l n 1  pnam 2  cEnc o 0available_encoders X; Z6 = n 1  pFmt 4  cEnc o 0anencanEnc m  AAC k r  4  cEnc o 0anencanEnc 1  pEnc S k6 I+ .sysodlogaskrTEXT m -'Cannot continue. Error setting encoder.  btns J m  Cancel  dflt m !  disp m$% R,6 .ascrerr ********  errn m03 0anencanEnc o 0available_encoders r<E I<C .hookConvcTrk@obj c<? o<= 0the_aiff m=>  alis o 0the_aac rFN lFL nFL   4GL  cobj  mJK  oFG 0the_aac o 0 the_track   OO kS rSZ oST 0 track_album 1TY  pAlb r[b o[\ 0 track_artist 1\a  pArt rcj ocd 0 track_comment 1di  pCmt rkr okl 0 track_year  1lq  pYr !" !rsz#$ #ost 0 track_name $1ty  pnam"%& %l{{' ':4 set volume adjustment to (track_vol_adj as integer)&() (r{*+ *o{| 0 track_number +1|  pTrN), ,l oOP 0 the_track -. -l/ /" re-instate original encoder.0 0r12 1o 0preferred_encoder 21  pEnc m33null* iTunes.app۠07`()( hookalis@UntitledtH+* iTunes.app9~ט Applications* Untitled:Applications:iTunes.app iTunes.appUntitledApplications/iTunes.app/45 4I6 .sysoexecTEXTTEXT 6b78 7b9: 9o 0 shell_path :m; ; rm  8n<= <1  strq =n>? >1  psxp ?o 0the_aiff5@ @lA A)# End Doug's AppleScripts for iTunesBC BlCDE DlF FRL Adapted from Scott Brown's xACT - http://groups.yahoo.com/group/xACT-users/EGH GiIJ IIK 0 flac2aiffKL Lo 0a_flac Jk0MMNO NrPQ PmR R/ QnST S1  txdl T1  ascrOUV UrWX Wl Y Yn Z[ Z4 \  citm \m  [l ] ]c ^_ ^o 0a_flac _m  TEXT Xo 0the_nameV`a `rbc bmd d. cnef e1  txdl f1  ascragh grij ibkl klm mnno n4p  citm pm oo 0the_name lmq q .aiff jo 0the_namehrs rlstu tI-v .sysoexecTEXTTEXT vb)wx wb'yz yb%{| {b#}~ }b! o 0 shell_path m  %flac -s -d --force-aiff-format  ~o!" 0a_flac |m#$   -o  zo%& 0 output_dir xo'( 0the_nameu L.0 o./ 0the_nameH l i I 0 strip_equals o~ ~0name_value_pair k  r m = n 1} } txdl 1| | ascr{ L  l z l y n  4 x x citm m ww ov v0name_value_pairyz{u ltt  End xACT codeu ssrqponmlk r.aevtoappnull**** q.aevtodocnullalis p0process_folder o0 check_file n0 get_file_list m 0make_aac l 0 flac2aiff k0 strip_equalsjihg j.aevtoappnull****ih%f*e67dAcGIba`_^]S\][ZYfX f0 shell_path e0 output_dir d.sysoexecTEXTTEXT c btns b dflt a disp` _.sysodlogaskrTEXT ^ bhit ]0 the_button \ prmp [.sysostdfalisnull Z alis Y.aevtodocnullalis X.sysostflalisnullgcEOEO%%%j EOlvlk ,E`O_a*aal a&kvj Y*aal a&kvj WlVUT W.aevtodocnullalis V 0 the_filesUSRQ S 0 the_files R0i Q 0the_file PONMLKJ P.corecnte******** O cobj N TEXT M0process_folder L0 check_file K alis J 0make_aacTDBkj kh/&EO )k+Y)l+f )&k+Yh[OYIHGF I0process_folderHEED D0 the_folderGCBA C0 the_folder B 0 the_flacs A0i@?>=< @0 get_file_list ?.corecnte******** > cobj = alis < 0make_aacF))l+EOkj kh)/&k+[OY;:98 ;0 check_file:7765 6 0the_file 50file_extension943 4 0the_file 30file_extension8Yf210/ 20 get_file_list1..-, -0 the_folder ,0file_extension0+*)('& +0 the_folder *0file_extension ) 0 the_files ( 0 file_list ' 0new_file & 0the_file %$#"!  % cfol $ cobj # kocl ".corecnte******** ! TEXT 0process_folder 0 check_file/^jvEO */-EUOF[l kh& )&k+Y!)&l+EOf&kv%EYh[OYO  0make_aac  0a_flac  0a_flac 0shellified_flac  0the_name  0the_aiff 0 track_album 0 track_artist 0 track_comment 0 track_name 0 track_number 0 track_year 0 the_playlist 0preferred_encoder 0available_encoders 0anencanEnc 0the_aac 0 the_track49GOht3;  alis  psxp  strq  0 flac2aiff  ascr  txdl 0 shell_path  TEXT  citm .sysoexecTEXTTEXT  psxf 0 output_dir 0 strip_equals  long .miscactvnullnull  cPly  pEnc  cEnc  pnam  kocl  cobj .corecnte********  pFmt  btns  dflt  disp .sysodlogaskrTEXT  errn .hookConvcTrk@obj  pAlb  pArt  pCmt  pYr  pTrN&,,EO*k+O,FO%&i/%%j EO*΢%&/EO*%%j k+EO*a%%j k+EO*a%%j k+EO*a%%j k+EO*a%%j k+a&EO*a%%a%j k+a&EOa*j O*aa/EO*a,EO*a-a,EO^[aa l !kh *a/a",a#*a/*a,FOY&a$a%a&kva'ka(ja) *O)a+a,lh[OYO&j -EOa k/EO3*a.,FO*a/,FO*a0,FO*a1,FO*a,FO*a2,FOPUO*a,FUOa3%,,%j OPJ 0 flac2aiff 0a_flac 0a_flac 0the_name Rdq  ascr  txdl  TEXT  citm 0 shell_path 0 output_dir .sysoexecTEXTTEXT1,FO&i/EO,FOk/%EO%%%%%j O 0 strip_equals 0name_value_pair 0name_value_pair  ascr  txdl  citm ,FOi/Eascr ޭ