<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter questions tagged with scripting</title>
      <link>http://ask.metafilter.com/tags/scripting</link>
      <description>Questions tagged with 'scripting' at Ask MetaFilter.</description>
	  <pubDate>Wed, 25 Nov 2009 08:04:23 -0800</pubDate> <lastBuildDate>Wed, 25 Nov 2009 08:04:23 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>How to merge data fields into a plain text file?</title>
	<link>http://ask.metafilter.com/139055/How%2Dto%2Dmerge%2Ddata%2Dfields%2Dinto%2Da%2Dplain%2Dtext%2Dfile</link>	
	<description>Is there some way to do a &quot;mail merge&quot; type operation on plain text, xml or html files without using a word processor? I&apos;ve been working on our company wiki and I want to bulk create a bunch of pages by merging certain field data from spreadsheets, csv files or other datasources into the template text files that I&apos;ve created.  The output should be XML or plain text.&lt;br&gt;
&lt;br&gt;
I have a separate task where I have a simple html template that I&apos;d like to populate with data pulled from a csv. The output needs to be standard, simple HTML (no funny MS Word markup)&lt;br&gt;
&lt;br&gt;
I have access to MS Office, Open Office and Abiword but everything I&apos;ve tried so far seems to &quot;pollute&quot; my files with word processor type formatting. (I am running KDE on Ubuntu 9.10, but I also have Win XP running as a virtual machine under Virtualbox - I have access to any version of the MS Office software, and obviously anything open source).&lt;br&gt;
&lt;br&gt;
I&apos;m sure there&apos;s some open source tool designed to merge text files. I&apos;m not opposed to using a command line interface although I probably would prefer a GUI. My Google-fu is failing me on this one.&lt;br&gt;
&lt;br&gt;
Any tips on how I should achieve this, or pointers to the tools I should be looking at?&lt;br&gt;
&lt;br&gt;
thanks!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.139055</guid>
	<pubDate>Wed, 25 Nov 2009 08:04:23 -0800</pubDate>
	<category>files</category>
	<category>html</category>
	<category>mailmerge</category>
	<category>merge</category>
	<category>opensource</category>
	<category>script</category>
	<category>scripting</category>
	<category>text</category>
	<category>xml</category>
	<dc:creator>geekgirl397</dc:creator>
	</item>
	<item>
	<title>MS Outlook: scheduling VBA scripts?</title>
	<link>http://ask.metafilter.com/137776/MS%2DOutlook%2Dscheduling%2DVBA%2Dscripts</link>	
	<description>Using Outlook 2007 on windows XP, how do I run a (VBA) script either daily, or on opening the application? In excel, I&apos;d use something like an Auto_Open() sub, but I can&apos;t seem to find an analog for Outlook. Can I just refer to the script to a recurring appointment somehow?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.137776</guid>
	<pubDate>Tue, 10 Nov 2009 15:45:38 -0800</pubDate>
	<category>outlook</category>
	<category>resolved</category>
	<category>schedule</category>
	<category>scripting</category>
	<category>VBA</category>
	<dc:creator>pompomtom</dc:creator>
	</item>
	<item>
	<title>PowerShell: recursive processing of all files and folders without OutOfMemory exception?</title>
	<link>http://ask.metafilter.com/134940/PowerShell%2Drecursive%2Dprocessing%2Dof%2Dall%2Dfiles%2Dand%2Dfolders%2Dwithout%2DOutOfMemory%2Dexception</link>	
	<description>I need to use a PowerShell script to scan through a large amount of files and folders for certain security permissions. The issue is that it seems that the &quot;Get-ChildItem&quot; function insists on shoving the whole folder and file structure in memory. Since the drive has over a million files in over 30,000 folders, the script runs for 30 minutes, then throws out a System.OutofMemoryException without doing anything else. The script is as follows:&lt;br&gt;
&lt;br&gt;
&lt;blockquote&gt;$files = Get-ChildItem c:\&lt;br&gt;
&lt;br&gt;
foreach $file in $files {&lt;br&gt;
  &apos;Do something here&lt;br&gt;
}&lt;/blockquote&gt;&lt;br&gt;
&lt;br&gt;
The obvious problem is the first statement. The obvious question remains: how do I walk through a drive recursively without running out of memory? Something of a Get-ChildItem that would execute code on the target without needing to first put the whole structure in memory?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.134940</guid>
	<pubDate>Thu, 08 Oct 2009 08:26:22 -0800</pubDate>
	<category>outofmemory</category>
	<category>powershell</category>
	<category>scripting</category>
	<dc:creator>splice</dc:creator>
	</item>
	<item>
	<title>DAW scripting</title>
	<link>http://ask.metafilter.com/133186/DAW%2Dscripting</link>	
	<description>What tools and/or DAW software do I need to automate DAW actions through scripts? Digital music recording and production is very new to me, but I have some programming experience. It occurs to me that being able to write scripts to automate DAW actions (setting EQ, effects, mix levels etc) would be fun and useful. The ideal DAW would allow running of scripts just as easily as triggering other DAW events using automation tracks, or even the generation of automation tracks via scripts.&lt;br&gt;
&lt;br&gt;
Are there any DAWs that support this out of the box? What languages and tools do I need to know/have?&lt;br&gt;
&lt;br&gt;
For reference, I have the following software at the moment: REAPER, RiffWorks, GarageBand on OS X; Ardour and LMMS on Linux, though I find working with audio on Linux too trying to bother most of the time.&lt;br&gt;
&lt;br&gt;
Apologies if this is an RTFM question; if this is the case, some pointers to FMs would be perfect.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.133186</guid>
	<pubDate>Thu, 17 Sep 2009 23:22:01 -0800</pubDate>
	<category>daw</category>
	<category>digitalaudio</category>
	<category>music</category>
	<category>programming</category>
	<category>recording</category>
	<category>scripting</category>
	<dc:creator>vanar sena</dc:creator>
	</item>
	<item>
	<title>ExcelFilter: Between Day 1 and Day 90, I had how many of which?</title>
	<link>http://ask.metafilter.com/131762/ExcelFilter%2DBetween%2DDay%2D1%2Dand%2DDay%2D90%2DI%2Dhad%2Dhow%2Dmany%2Dof%2Dwhich</link>	
	<description>How can I count certain things in a range of cells in Excel that fall between two dates? I&apos;ve got an Excel workbook that keeps track of every thing I produce at my job. (What the things are is irrelevant.) The date it&apos;s created in in Column A. In Column F there are criteria to determine which type of thing is is (two specific ones). I would like to count the number of each that fall between two dates, i.e. between, say 9/01/2009 and 11/30/2009.&lt;br&gt;
&lt;br&gt;
For the life of me, I can&apos;t figger it out.&lt;br&gt;
&lt;br&gt;
I&apos;ve tried wrapping my head around dynamic ranges, but all I can see for doing that is OFFSET(), which would be great if all the date ranges had the same amount of rows, but they don&apos;t. Besides, I add new rows to this thing regularly, as each new thingie is generated. So, having, say, the last 30 of these counted does not help.&lt;br&gt;
&lt;br&gt;
Google searching has given me info about how to count for the last &lt;em&gt;x&lt;/em&gt; of a certain range, where &lt;em&gt;x&lt;/em&gt; is days, weeks, months, etc. Doesn&apos;t help.&lt;br&gt;
&lt;br&gt;
Oh, and I *really* would not like to have to go into VBA scripting for this.&lt;br&gt;
&lt;br&gt;
So, uh, help?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.131762</guid>
	<pubDate>Wed, 02 Sep 2009 07:09:05 -0800</pubDate>
	<category>count</category>
	<category>criteria</category>
	<category>date</category>
	<category>excel</category>
	<category>forumla</category>
	<category>microsoft</category>
	<category>range</category>
	<category>scripting</category>
	<category>wtf</category>
	<category>youwouldthinkthiswouldbeeasy</category>
	<dc:creator>SansPoint</dc:creator>
	</item>
	<item>
	<title>Please help me make many documents much shorter. </title>
	<link>http://ask.metafilter.com/128733/Please%2Dhelp%2Dme%2Dmake%2Dmany%2Ddocuments%2Dmuch%2Dshorter</link>	
	<description>How can I access the &quot;AutoSummary&quot; feature of Microsoft Word progammatically to summarize many documents at once? Alternatively, what other programs are there that will summarize documents that can be accessed programmatically? If this isn&apos;t the right place to ask, where is? I am working on an academic research project. I have several collections of plain text documents written in English. For each I would like to produce a number of increasingly smaller summaries of each of the documents using the &quot;AutoSummarize&quot; feature of Microsoft Word or some other program with similar functionality. I would like each summary saved with a file name indicative of the base file name and the size of the summary. How would you suggest I go about this?&lt;br&gt;
&lt;br&gt;
In essence, here is my desired algorithm:&lt;br&gt;
&lt;br&gt;
// Get all files to work over&lt;br&gt;
Foreach file (read all files in directory)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Get all the summary sizes as a percent of original size&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Foreach summary_size_percent(95 90 85 ... 25 20) &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Do the summarization and save the file&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Autosummarize file to summary_size_percent and &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;save as file_summary_percent.txt&lt;br&gt;
&lt;br&gt;
I have access to any common operating system and multiple versions of Word (Windows and Mac) and Pages for the Mac as well, though it seems less able to specify an exact percent for the summary feature. I have some money I can use to buy almost any other document summarization software, or if there is freeware I can give that a swing too. I can buy and install scripting software if needed. &lt;br&gt;
&lt;br&gt;
If there turn out to be multiple ways to do this, so much the better, especially if they produce different summaries. I am mostly a Unix programmer, so I am pretty familiar with Perl and Java and C on a Unix console, but I haven&apos;t done any Windows or Mac scripting.&lt;br&gt;
&lt;br&gt;
If you know of a better place to ask this, where would it be?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.128733</guid>
	<pubDate>Wed, 29 Jul 2009 11:43:05 -0800</pubDate>
	<category>autosummarize</category>
	<category>programming</category>
	<category>resolved</category>
	<category>scripting</category>
	<category>word</category>
	<dc:creator>procrastination</dc:creator>
	</item>
	<item>
	<title>Help in rendering Gmail &apos;Last Accounty Activity&apos; useless.</title>
	<link>http://ask.metafilter.com/127193/Help%2Din%2Drendering%2DGmail%2DLast%2DAccounty%2DActivity%2Duseless</link>	
	<description>Automatically login / logout of Gmail at a specified interval As you know, gmail lists the latest activity at the bottom of the page, and shows the last few ip&apos;s and the times they logged in by clicking details. &lt;br&gt;
&lt;br&gt;
I need to &apos;fool&apos; this log, by automating logging in, and logging out at a specified interval. Some ideas would be through a firefox extension, applescript, a mouse clicking recording program, etc, but I haven&apos;t found any such solution.&lt;br&gt;
&lt;br&gt;
Without going into details, I need to render the gmail activity log useless.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.127193</guid>
	<pubDate>Sat, 11 Jul 2009 21:19:08 -0800</pubDate>
	<category>automation</category>
	<category>firefox</category>
	<category>gmail</category>
	<category>programming</category>
	<category>scripting</category>
	<category>web</category>
	<dc:creator>passtehbrainz</dc:creator>
	</item>
	<item>
	<title>Doing Stuff Repeatedly</title>
	<link>http://ask.metafilter.com/126957/Doing%2DStuff%2DRepeatedly</link>	
	<description>I need to write a script of some sort to grab content from a series of web pages.  How should I go about it? Here&apos;s the deal: I have a textbook that is available in electronic form online.  The problem is that each page is a JPEG that is served up individually by a PHP script.  I click on a link, it takes me to another web page with the embedded image on it.  I want to download all of the pages and run OCR on it so I can search the book, do copy/paste for notes, etc.&lt;br&gt;
&lt;br&gt;
I can sit there and do this manually but there&apos;s 600 pages or so and I want to use this as an opportunity to learn a new skill.&lt;br&gt;
&lt;br&gt;
I have tried web spiders (HTTRack) and they did not work.  The PHP script serves up each file with the exact same filename.  The image embedded on the page also does not have a *.jpg extension, but some random PHP stuff.&lt;br&gt;
&lt;br&gt;
I have tried to use Selenium-IDE but apparently it can&apos;t (a) do anything incrementally without the aid of another scripting language, and (b) is unable to actually download content.&lt;br&gt;
&lt;br&gt;
I tried FlashGot&apos;s gallery feature but I think the PHP script interferes with the referrer or something because I only end up downloading the placeholder that warns against hotlinking.&lt;br&gt;
&lt;br&gt;
So it seems I need some way of actually walking Firefox through the steps.&lt;br&gt;
&lt;br&gt;
Here&apos;s the pseudocode of what I&apos;m trying to do:&lt;br&gt;
&lt;br&gt;
- Go to URL http://www.blah.edu/students/stuff.php?eh=123&lt;br&gt;
- Go to URL http://www.blah.edu/students/view.php?pg=f&amp;amp;id=456&lt;br&gt;
- Save http://www.blah.edu/students/showpage.php?pg=f&amp;amp;id=456 (this is actually an image) with filename page456.jpg.&lt;br&gt;
- Go back to step 2, increment the id number to 457 and repeat.&lt;br&gt;
&lt;br&gt;
What scripting language would best facilitate this?  I&apos;m on Linux but can use Windows if I must.&lt;br&gt;
&lt;br&gt;
Thanks</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.126957</guid>
	<pubDate>Thu, 09 Jul 2009 09:40:02 -0800</pubDate>
	<category>scripting</category>
	<dc:creator>Ziggy Zaga</dc:creator>
	</item>
	<item>
	<title>Which  forums do the best web programmers hang out at?</title>
	<link>http://ask.metafilter.com/125912/Which%2Dforums%2Ddo%2Dthe%2Dbest%2Dweb%2Dprogrammers%2Dhang%2Dout%2Dat</link>	
	<description>Which  forums do the best web programmers hang out at? Long story short:  I&apos;ve got a web site that already does over 1 million pageviews per month.  I&apos;ve got a great idea to take it to the next level, but I&apos;m looking for someone who can handle the coding and technical aspects in exchange for an equity stake. &lt;br&gt;
&lt;br&gt;
I&apos;m wanting to bring aboard a great programmer who doesn&apos;t necessarily need the work but will be motivated by the equity.  &lt;br&gt;
&lt;br&gt;
Which forums would you recommend I post on to find this person? &lt;br&gt;
&lt;br&gt;
Also, if there&apos;s anyone interested here, let me know.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.125912</guid>
	<pubDate>Fri, 26 Jun 2009 16:15:45 -0800</pubDate>
	<category>ajax</category>
	<category>coding</category>
	<category>development</category>
	<category>mysql</category>
	<category>on</category>
	<category>php</category>
	<category>programming</category>
	<category>rails</category>
	<category>ruby</category>
	<category>scripting</category>
	<category>sites</category>
	<category>software</category>
	<category>web</category>
	<dc:creator>jackson5</dc:creator>
	</item>
	<item>
	<title>Need to automate a weekly task using AppleScript</title>
	<link>http://ask.metafilter.com/118012/Need%2Dto%2Dautomate%2Da%2Dweekly%2Dtask%2Dusing%2DAppleScript</link>	
	<description>I need to automate the process of printing a report to PDF with the date in the file name, saving it in an archive folder, printing it, and emailing it as an attachment. I am on a Mac and using Pages, Automator, and AppleScript. Help me find the missing pieces! I have to write a report each Friday for work and send it as an attachment to a specific email address where it gets processed by an internal server. Usually my process is as follows:&lt;br&gt;
&lt;br&gt;
1. Write report in Pages.&lt;br&gt;
2. Print report as PDF to a specific folder using OS X&apos;s built-in capabilities.&lt;br&gt;
3. Name the PDF file based on the date.&lt;br&gt;
4. Print the PDF file to a hard copy.&lt;br&gt;
5. Attach the PDF to an email using Mail and send it.&lt;br&gt;
&lt;br&gt;
I realize that&apos;s not a ton of work, but this Friday I felt the urge to automate the process. At first I wanted to do it to save myself some time, and then once I had spent an hour trying to figure it out it became more of a challenge, and then after spending another hour on it I didn&apos;t care about solving the problem myself and just wanted a solution by any means necessary.&lt;br&gt;
&lt;br&gt;
Most of the individual pieces of this automated task are not difficult to accomplish, but I have found it difficult to get each step to talk to the next. I have also had trouble due to the fact that I want to make the file name of the saved PDF contain the date it was saved. I&apos;m sure this would be easy for anyone who has used AppleScript extensively, but I&apos;m just a beginner at it so it&apos;s baffling me.&lt;br&gt;
&lt;br&gt;
Could someone help me figure out the proper script structure to make all this work? If it matters, I am using the latest version of OS X and Pages. The files need to be saved with the name &quot;weekly_report_MM_DD_YYYY.pdf&quot; (it doesn&apos;t have to be exact, just something along those lines) and the email that it is attached to doesn&apos;t need anything in it except for a recipient. If I&apos;ve forgotten any necessary details, please let me know and I&apos;ll provide them.&lt;br&gt;
&lt;br&gt;
HELP!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.118012</guid>
	<pubDate>Sat, 28 Mar 2009 20:20:15 -0800</pubDate>
	<category>apple</category>
	<category>applescript</category>
	<category>automation</category>
	<category>automator</category>
	<category>mac</category>
	<category>scripting</category>
	<dc:creator>joshrholloway</dc:creator>
	</item>
	<item>
	<title>CU: A flange.</title>
	<link>http://ask.metafilter.com/116281/CU%2DA%2Dflange</link>	
	<description>How To Write Technical Training Films? The government department I work for is in the midst of an enormous communications restructure and, hoping to move into corporate communications, I volunteered my services to one of the managers in my business group.&lt;br&gt;
&lt;br&gt;
One of the myriad tasks on his plate is the start-to-finish development of a number of technical training films. The nature of our work here sees people out in the field installing specialised monitoring equipment. &lt;br&gt;
&lt;br&gt;
From the &lt;i&gt;prescis&lt;/i&gt;:&lt;br&gt;
&lt;br&gt;
&lt;i&gt;&#8220;These films will be for internal departmental use as training aids. The primary target will be for new staff who will not have someone at their side to assist them. It is hoped that most of the tasks in the field process will be covered. They may last a few minutes only dealing with specific technical issues or of greater length if going through data entry type procedures.&lt;br&gt;
&lt;br&gt;
&#8220;These training films are not to be seen as replacements/substitutes for the National Standard training requirements &#8211; they will at all times be complimentary.&#8221;&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
So, pretty straightforward (if dry) stuff, I imagine. What I have been asked to do - with the assistance of experts in the actual processes I will be documenting &#8211; is develop the &#8220;textual storyboards&#8221;, or teleplays, if you will, for these processes. &lt;br&gt;
&lt;br&gt;
I have a fair idea of how to set about doing this but I&#8217;d like to make an extra good impression with this work, so I&#8217;d love to hear about any easily accessible resources (preferably online) on this subject, and I would similarly love to hear advice and tips from any MeFites who have done similar work.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.116281</guid>
	<pubDate>Mon, 09 Mar 2009 18:23:04 -0800</pubDate>
	<category>communications</category>
	<category>corporatecommunications</category>
	<category>fail</category>
	<category>metafailter</category>
	<category>screenplay</category>
	<category>scripting</category>
	<category>storyboarding</category>
	<category>stumped</category>
	<category>technicaltraining</category>
	<category>training</category>
	<category>trainingfilms</category>
	<category>writing</category>
	<dc:creator>turgid dahlia</dc:creator>
	</item>
	<item>
	<title>Find it and add it once more in mysql field</title>
	<link>http://ask.metafilter.com/112189/Find%2Dit%2Dand%2Dadd%2Dit%2Donce%2Dmore%2Din%2Dmysql%2Dfield</link>	
	<description>I&apos;ve made a large mess and need to fix it. It&apos;s a &quot;find this&quot; and &quot;add it once more, but above it, in that same field&quot; dealio in one single tables field in mysql. &quot;This&quot; is a different string every time. Not sure this can be done with mysql, so I&apos;m open to all other ideas. Ok, so I have a badly created embed and object tag code all saved in one mysql field lets call it &apos;body&apos;. I&apos;m doing the embed like the &lt;a href=&quot;http://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_HTML/QTScripting_HTML_Document/chapter_1000_section_3.html#//apple_ref/doc/uid/TP40001525-2-GettingaBrowsertoLoadQuickTime&quot;&gt;example at the bottom of this apple page&lt;/a&gt;. &lt;br&gt;
&lt;br&gt;
Body has other data/info before and after the embed and object tags so &apos;body&apos; can vary greatly in length. &lt;br&gt;
The Object tags calls the quicktime codebase, and underneath that we have the &lt;code&gt;param name= stuff &lt;/code&gt;  but we &lt;em&gt;lack&lt;/em&gt; &lt;code&gt;param name=src&lt;/code&gt; linking to a file! Below the param name comes the &lt;code&gt;embed src=link to file!&lt;/code&gt; tag. So, what we want to do is get that link from embed, in each individual &apos;body&apos; field, and create a &lt;code&gt;param name src &lt;/code&gt;with the &lt;em&gt;same link&lt;/em&gt; and add this to this same &apos;body&apos; field. &lt;br&gt;
&lt;br&gt;
Each link is different, obviously, and we&apos;re talking 45,000 entries which is why I am scratching my head how to do this. Is there a way to, say,  &lt;code&gt;add (wildcard) where like%&lt;/code&gt; solution I could do, I&apos;m stumped?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.112189</guid>
	<pubDate>Wed, 21 Jan 2009 02:28:03 -0800</pubDate>
	<category>mysql</category>
	<category>resolved</category>
	<category>scripting</category>
	<dc:creator>dabitch</dc:creator>
	</item>
	<item>
	<title>Stop Bash from getting ahead of itself...</title>
	<link>http://ask.metafilter.com/108551/Stop%2DBash%2Dfrom%2Dgetting%2Dahead%2Dof%2Ditself</link>	
	<description>Shell scripting quandry: running apt-get and then running a command that requires a apt-get installed package fails because bash doesn&apos;t wait for apt-get to finish... My first approach is running a shell script that runs the installation, and I&apos;ve had this problem. The code is like&lt;br&gt;
&lt;br&gt;
apt-get install blah blah blah python-setuptools&lt;br&gt;
easy_install libxml&lt;br&gt;
&lt;br&gt;
However, bash runs apt-get and doesn&apos;t wait for it to finish before running the easy_install line - and the easy_install line requires setuptools to be installed. Currently I&apos;ve just split the script into two scripts at that point, so that this little timing issue doesn&apos;t come up. But that&apos;s a workaround and I&apos;m frustrated that there isn&apos;t a better way. Using &apos;wait&apos; isn&apos;t working because apt-get is interactive...&lt;br&gt;
&lt;br&gt;
Bonus points if you can point to a way that shell scripts can just install the most recent version of a package without specifying exactly what it is in the name? My issue is that this is for Ubuntu 7-8 and I don&apos;t want it to fail because of differences in repository versions...&lt;br&gt;
&lt;br&gt;
Thanks! I&apos;m a bit of a shell-scripting noob, and writing a robust install script for this project (Mapnik) is a big challenge.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.108551</guid>
	<pubDate>Sat, 06 Dec 2008 13:09:53 -0800</pubDate>
	<category>installation</category>
	<category>library</category>
	<category>linux</category>
	<category>packaging</category>
	<category>scripting</category>
	<category>shell</category>
	<dc:creator>tmcw</dc:creator>
	</item>
	<item>
	<title>BASH: Handling odd characters in a variable?</title>
	<link>http://ask.metafilter.com/107165/BASH%2DHandling%2Dodd%2Dcharacters%2Din%2Da%2Dvariable</link>	
	<description>BASH Scripting.  I&apos;m trying to do a simple &quot;mv&quot; operation with a not-so-simple filename that contains special characters (as in brackets and hyphens).  The filename itself is stored within a variable.  The operation fails, and I can understand why, but I don&apos;t know how to get around it. A sample filename would be something like:&lt;br&gt;
&lt;br&gt;
[2008] Region {XX}.pdf&lt;br&gt;
&lt;br&gt;
...and is stored in $sFilename.  Not all of the filenames are the same format although all of them start with the year in square brackets.&lt;br&gt;
&lt;br&gt;
I&apos;ve got the rest of the script set up to parse for the year in the initial set of [ ] brackets and create a folder (./2008) with that name.  The second part of the script is supposed to move the aforementioned file into the created folder.  I attempt to do this with the command:&lt;br&gt;
&lt;br&gt;
&lt;i&gt;mv &quot;$sFilename&quot; ./$sPrefix&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
...where $sPrefix is the parsed item from the brackets.  It errs out with the message:&lt;br&gt;
&lt;br&gt;
&lt;i&gt;mv: cannot stat `[2008]&apos;: No such file or directory.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
It seems to me the shell is choking on the filename.  What&apos;s the best way to work around this WITHOUT renaming the files (since the program that imports them is Windows-based and requires they be intact)?&lt;br&gt;
&lt;br&gt;
Thanks</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.107165</guid>
	<pubDate>Tue, 18 Nov 2008 13:58:55 -0800</pubDate>
	<category>bash</category>
	<category>BashScripting</category>
	<category>scripting</category>
	<dc:creator>Ziggy Zaga</dc:creator>
	</item>
	<item>
	<title>How do I use either/or logic inside an OSX Automator action?</title>
	<link>http://ask.metafilter.com/104673/How%2Ddo%2DI%2Duse%2Deitheror%2Dlogic%2Dinside%2Dan%2DOSX%2DAutomator%2Daction</link>	
	<description>How do I use either/or logic inside an OSX Automator action? This seems SO bloody simple, but I can&apos;t for the life of me figure it out.&lt;br&gt;
&lt;br&gt;
So I&apos;ve got an Automator workflow that finds all of the files with an extension of .avi inside a certain folder, then does something with them. This works great, but what I REALLY want is for the workflow to search for all files in the folder that have an .avi *or* a .wmv extension. Is this possible?&lt;br&gt;
&lt;br&gt;
I&apos;ve tried &quot;avi OR wmv&quot;, &quot;avi {or} wmv&quot;, &quot;avi &quot;or&quot; wmv&quot; and anything else you could possible imagine.&lt;br&gt;
&lt;br&gt;
The specific action I want to be able to put the either/or operator into is the &quot;Filter Finder Items&quot; action. This is a default Automator action that comes with OSX.&lt;br&gt;
&lt;br&gt;
*beating head against desk*</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.104673</guid>
	<pubDate>Sun, 19 Oct 2008 23:03:04 -0800</pubDate>
	<category>apple</category>
	<category>automator</category>
	<category>mac</category>
	<category>osx</category>
	<category>scripting</category>
	<category>workflow</category>
	<dc:creator>JPowers</dc:creator>
	</item>
	<item>
	<title>Looking for a way automate making custom resumes</title>
	<link>http://ask.metafilter.com/101789/Looking%2Dfor%2Da%2Dway%2Dautomate%2Dmaking%2Dcustom%2Dresumes</link>	
	<description>Where can I find a service / program that would enable me to dynamically create resumes and cover letters? I use a method for fabricating cover letters and resumes.&lt;br&gt;
&lt;br&gt;
I tailor my documents to match the jobs I&apos;m applying for.&lt;br&gt;
&lt;br&gt;
My method involves annotating my work history with phrases describing my work, my personal projects, my school experience, etc.  I&apos;ve stored common annotations in a large spreadsheet in order to reuse some of my previous work.&lt;br&gt;
&lt;br&gt;
Everything relevant to the job is represented.  This is the most successful method I&apos;ve tried and I&apos;d prefer to keep using it.&lt;br&gt;
&lt;br&gt;
This process takes quite a long time to produce viable documents.&lt;br&gt;
&lt;br&gt;
I&apos;d like to automate the process.&lt;br&gt;
&lt;br&gt;
I&apos;m in the process of doing my own research and developing a scripting solution as an alpha method for automating the process.  I want to know if this has been done before; To save me some time and trouble.&lt;br&gt;
&lt;br&gt;
Thanks for your input.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.101789</guid>
	<pubDate>Mon, 15 Sep 2008 19:15:15 -0800</pubDate>
	<category>application</category>
	<category>coverletter</category>
	<category>job</category>
	<category>jobapplication</category>
	<category>jobs</category>
	<category>programming</category>
	<category>resume</category>
	<category>scripting</category>
	<category>webapp</category>
	<category>webapplication</category>
	<dc:creator>Pontifex</dc:creator>
	</item>
	<item>
	<title>How do I make simple dynamic web pages using perl?</title>
	<link>http://ask.metafilter.com/99862/How%2Ddo%2DI%2Dmake%2Dsimple%2Ddynamic%2Dweb%2Dpages%2Dusing%2Dperl</link>	
	<description>How should I develop simple dynamic web pages using perl?  

Does anyone have any suggestions on how best to produce simple web pages in perl that execute logic (e.g., opening property documents to retrieve property values and saving back changes). 

I am new to perl and would like some detail instructions or links to tutorials. Would a framework like Mason be overkill? </description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.99862</guid>
	<pubDate>Fri, 22 Aug 2008 09:24:58 -0800</pubDate>
	<category>perl</category>
	<category>scripting</category>
	<category>web</category>
	<dc:creator>zzztimbo</dc:creator>
	</item>
	<item>
	<title>Run multiple php websites from a single server?</title>
	<link>http://ask.metafilter.com/96749/Run%2Dmultiple%2Dphp%2Dwebsites%2Dfrom%2Da%2Dsingle%2Dserver</link>	
	<description>How practical is it to run multiple php websites on multiple servers from a single script on one central server? I wrote a script which is now being used on a few websites, and it has been suggested that to make updates simpler we run it from a central server ie each website will use the script from one source to actually run.  While on the surface this seems like A Very Good Ideas, I am sure there are issues which might make it a very bad idea. Can you convince me one way or the other.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.96749</guid>
	<pubDate>Wed, 16 Jul 2008 11:04:41 -0800</pubDate>
	<category>php</category>
	<category>scripting</category>
	<category>web</category>
	<dc:creator>zingzangzung</dc:creator>
	</item>
	<item>
	<title>&quot;And all the bells and whistles.&quot;</title>
	<link>http://ask.metafilter.com/96208/And%2Dall%2Dthe%2Dbells%2Dand%2Dwhistles</link>	
	<description>I&apos;m looking for a way to let members of my forum create an individual &quot;member page&quot; for themselves, or have it created for them automatically upon being accepted into a certain usergroup, that they could fill out with miscellaneous info. To be more precise, the forum revolves an online game, and the member page would have details about their characters, background stories, etc. It doesn&apos;t really have to be tied to their forum account, although it would be a smooth way to handle it from the user standpoint. Except I&apos;m clueless on how to make this work. The board is hosted on space I own, under a domain I own. So theoretically anything is possible in the technical department, minus my lack of knowledge. There are so many forum softwares out there, and gallery softwares, but I don&apos;t even know where to begin to look for something that offers the functionality I want. Is this a feature I&apos;ll have to script in myself (difficulty level: probably high, but if that&apos;s the only way, point me in the right direction!), or is there another way for the php uninitiated?&lt;br&gt;
&lt;br&gt;
Extra details: I&apos;m using &lt;a href=&quot;http://simplemachines.org/&quot;&gt;Simple Machine Forums&lt;/a&gt;, and ideally I&apos;d like the pages created once someone is of the right usergroup (to differentiate between game members and visitors). Though as I said, being attached as part of the board isn&apos;t a real necessity.&lt;br&gt;
&lt;br&gt;
All help &lt;i&gt;mightily&lt;/i&gt; appreciated. If extra details are needed for you to answer, just poke!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.96208</guid>
	<pubDate>Wed, 09 Jul 2008 23:03:11 -0800</pubDate>
	<category>forum</category>
	<category>php</category>
	<category>programming</category>
	<category>scripting</category>
	<dc:creator>Bakuun</dc:creator>
	</item>
	<item>
	<title>Customizing a Wordpress function</title>
	<link>http://ask.metafilter.com/95376/Customizing%2Da%2DWordpress%2Dfunction</link>	
	<description>Wordpress/PHP question. I&apos;m working on a Wordpress theme and want to use an algorithm to alter some of the HTML it emits. I&apos;ve got a general idea of how to do this, and could probably manage a brutish implementation on my own, but my PHP-fu is weak and there is probably a better way. Here&apos;s what&apos;s going on. I&apos;m using the &lt;a href=&quot;http://code.google.com/p/blueprintcss/&quot;&gt;blueprint css&lt;/a&gt; approach for a gridded layout. And I&apos;ve got a &quot;bottom-bar&quot; of widgets, laid out in three columns. With blueprint css, the div for the third column needs &lt;tt&gt;class=&quot;last&quot;&lt;/tt&gt; added to it in (in addition to class declarations that apply to all divs) order for everything to line up right.&lt;br&gt;
&lt;br&gt;
What I want to do is get the count of widgets each time a widget is emitted, and if count mod 3 = 0, insert &apos;last&apos; into the class. Barring that, if I could insert &lt;tt&gt;class=&quot;widget-N&quot;&lt;/tt&gt; (where N=count) in all divs, I could manage, although it would be less elegant. Ideally, all browsers would magically support CSS3 and obviate this problem, but I&apos;m not holding my breath.&lt;br&gt;
&lt;br&gt;
Obviously I don&apos;t want to touch the core code. I don&apos;t mind inserting an altered version of whatever function is necessary into my functions.php file; but if there&apos;s a callback that lets me avoid doing that, so much the better.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.95376</guid>
	<pubDate>Mon, 30 Jun 2008 06:36:19 -0800</pubDate>
	<category>blog</category>
	<category>blogging</category>
	<category>php</category>
	<category>programming</category>
	<category>scripting</category>
	<category>wordpress</category>
	<dc:creator>adamrice</dc:creator>
	</item>
	<item>
	<title>Scripter needs to learn a &quot;real&quot; language.</title>
	<link>http://ask.metafilter.com/93840/Scripter%2Dneeds%2Dto%2Dlearn%2Da%2Dreal%2Dlanguage</link>	
	<description>Help a Perl/Python guy learn C# I want to learn C#/ASP.NET.  The problem is that I&apos;m a scripter by heart (Perl/Python/PHP/Javascript).    I learn by coming up with an idea for a program and figuring out how to do it (via docs, reference).  I like the O&apos;reilly &quot;Cookbook&quot; series.&lt;br&gt;
&lt;br&gt;
Every time I read a C#/ASP.NET book, I look at the examples and think, &quot;I could write this faster and simpler in Perl&quot;.    Does anyone have ideas/resources/examples/books/projects that would be good for C# but bad in a scripting language?   I need some motivation/enlightenment!&lt;br&gt;
&lt;br&gt;
I&apos;ve been trying to learn C# on and off for the past year or so, help!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.93840</guid>
	<pubDate>Wed, 11 Jun 2008 16:37:46 -0800</pubDate>
	<category>c</category>
	<category>learn</category>
	<category>programming</category>
	<category>scripting</category>
	<dc:creator>wongcorgi</dc:creator>
	</item>
	<item>
	<title>Maya MEL scripting</title>
	<link>http://ask.metafilter.com/92122/Maya%2DMEL%2Dscripting</link>	
	<description>How long will it take me to learn MEL scripting in Maya for the sole purpose of creating and manipulating complex geometries? Yes there are similar topics on Maya here, but I just need to be very comfortable creating and manipulating complex geometries for the sake of architecture or objects resembling architecture.  I do not need to be a master in Maya by any means.  This is for an upcoming masters thesis in architecture, MARCH.  I would like to accomplish something along the lines of this (think only mastering 1 of the 5 approaches):&lt;br&gt;
&lt;br&gt;
http://www.mh-portfolio.com/indexHa.html&lt;br&gt;
&lt;br&gt;
I have a light background using Maya but have absolutely no idea how to script.  Is 4 months time enough for me to learn how to script in Maya for meeting my goals?  How would you recommend going about this?&lt;br&gt;
&lt;br&gt;
I have been motivated by this book:&lt;br&gt;
&lt;br&gt;
Algorithmic Architecture by Kostas Terzidis</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.92122</guid>
	<pubDate>Thu, 22 May 2008 10:07:41 -0800</pubDate>
	<category>algorithmic</category>
	<category>architecture</category>
	<category>Maya</category>
	<category>MEL</category>
	<category>scripting</category>
	<dc:creator>comatose</dc:creator>
	</item>
	<item>
	<title>Shell scripting or something better?</title>
	<link>http://ask.metafilter.com/91011/Shell%2Dscripting%2Dor%2Dsomething%2Dbetter</link>	
	<description>Faster techniques for grabbing lines of a file and doing text manipulation and arithmetic via shell (or other) scripting? 1. Are there faster ways to grab lines of a text file?&lt;br&gt;
&lt;br&gt;
Currently I use &lt;code&gt;while read line&lt;/code&gt; and &lt;code&gt;sed -n #p filename&lt;/code&gt; in &lt;code&gt;bash&lt;/code&gt; and &lt;code&gt;csh&lt;/code&gt; scripts to grab lines of a file I&apos;m interested in. This seems slow. Are there better (faster) ways to get the line of a file, or to iterate through specified ranges of lines in a file?&lt;br&gt;
&lt;br&gt;
2. Are there faster ways than &lt;code&gt;awk&lt;/code&gt; to grab values in a line?&lt;br&gt;
&lt;br&gt;
Let&apos;s say I have the tab-delimited line:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;abc   123   345   0.52&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
What I&apos;d like to do is get the second and third values, or the fourth value, as quickly as possible. Is there a better way than &lt;code&gt;awk&lt;/code&gt;? Will a perl or other interpreted language script run faster than a shell script for scraping values from a text file?&lt;br&gt;
&lt;br&gt;
3. Arithmetic with &lt;code&gt;bash&lt;/code&gt;?&lt;br&gt;
&lt;br&gt;
I&apos;ve been doing &lt;code&gt;$((${value1}+${value2}))&lt;/code&gt; for integer arithmetic and &lt;code&gt;calc ${value1} / ${value2}&lt;/code&gt; for floating point arithmetic within &lt;code&gt;bash&lt;/code&gt;. Will I gain a performance benefit from switching over my code from &lt;code&gt;bash&lt;/code&gt; to another shell script language, or to another interpreted language entirely?&lt;br&gt;
&lt;br&gt;
Thanks for any and all tips and tricks.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.91011</guid>
	<pubDate>Fri, 09 May 2008 14:19:40 -0800</pubDate>
	<category>arithmetic</category>
	<category>bash</category>
	<category>csh</category>
	<category>float</category>
	<category>integer</category>
	<category>perl</category>
	<category>processing</category>
	<category>python</category>
	<category>script</category>
	<category>scripting</category>
	<category>text</category>
	<dc:creator>Blazecock Pileon</dc:creator>
	</item>
	<item>
	<title>My website&apos;s scripts eat up too much bandwidth. How do I resolve this?</title>
	<link>http://ask.metafilter.com/87977/My%2Dwebsites%2Dscripts%2Deat%2Dup%2Dtoo%2Dmuch%2Dbandwidth%2DHow%2Ddo%2DI%2Dresolve%2Dthis</link>	
	<description>My site&apos;s cron tasks eat up a &lt;em&gt;lot&lt;/em&gt; of bandwidth. Can I change the paths from http to local? Or can I move the tasks to my home server? One of my websites (the election one) runs a truckload of PHP to parse, mesh, filter, and cache an equally large number of external RSS feeds which are then stored and included in a reasonably lean (~10k) index.html. This creates a strange situation where the bandwidth consumed by the PHP (locally, but via http) far exceeds the actual bandwidth consumed by visitors. My web hosting provider has warned me about the excessive activity, but given the limited number of visitors, upgrading to a hosting deal with a higher bandwidth limit isn&apos;t really worthwhile for me.&lt;br&gt;
&lt;br&gt;
How do I resolve this?&lt;br&gt;
&lt;br&gt;
Current situation: a bunch of &lt;a href=&quot;http://feedforall.com/download.htm&quot;&gt;FeedForAll&lt;/a&gt; PHP scripts are executed using a Ruby-as-CGI script (which &lt;a href=&quot;http://www.metafilter.com/username/wackybrit&quot;&gt;wackybrit&lt;/a&gt; kindly helped me with) called via cron at regular intervals, varying by nature of content: none-time critical content would be updated hourly, whereas latest news etc. is updated every 10 minutes (was 2 minutes, but I took it down a notch for now to avoid further problems with my host). My monthly bandwidth limit is 8 GB; actual visitor usage is a modest fraction of that, but the scripting alone was responsible for 37 GB (!) in March.&lt;br&gt;
&lt;br&gt;
Several options:&lt;br&gt;
&lt;br&gt;
1) The bandwidth is measured by the host using HTTP responses. If I run the scripts using local UNIX paths, e.g. /usr/gnfti/www/ etc., the scripts generate no HTTP headers and thus don&apos;t count towards the quota. Of course they will still incur server load, but I have discussed this with the hosting company and it seems they&apos;re okay with it if I limit the use somewhat as a compromise. But then, not all of these scripts seem to be okay with local paths, most notably the keyword filter (rssFilter.php), which is responsible for 25% of the bandwidth on its own. &lt;br&gt;
&lt;br&gt;
Any ideas how to make it work this way anyway?&lt;br&gt;
&lt;br&gt;
2) I have a home server running &lt;a href=&quot;http://www.wampserver.com/en/&quot;&gt;WAMP&lt;/a&gt; on XP. Could I run the PHP on this box instead and have the output automatically upload to the remote server via FTP? Most of the bandwidth is to do with moving stuff around locally anyway; the actual output is in the order of kilobytes. I imagine this would involve running some sort of cron + FTP client/scheduler on the home box, but my knowledge in this area is limited. &lt;br&gt;
&lt;br&gt;
Could this be done, and if so, how?&lt;br&gt;
&lt;br&gt;
3) Lastly, if you have any suggestions on how to pull this off aside from the examples above, that too would be much appreciated.&lt;br&gt;
&lt;br&gt;
Thanks in advance for any suggestions or insight you might have to offer, guys.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.87977</guid>
	<pubDate>Sat, 05 Apr 2008 09:21:43 -0800</pubDate>
	<category>bandwidth</category>
	<category>bandwidthlimit</category>
	<category>cron</category>
	<category>crontab</category>
	<category>feedforall</category>
	<category>ftp</category>
	<category>homeserver</category>
	<category>internet</category>
	<category>php</category>
	<category>rss</category>
	<category>rss2html</category>
	<category>rssfilter</category>
	<category>rssmesh</category>
	<category>script</category>
	<category>scripting</category>
	<category>scripts</category>
	<category>webdesign</category>
	<category>website</category>
	<dc:creator>goodnewsfortheinsane</dc:creator>
	</item>
	<item>
	<title>How should I convert a Thunderbird inbox into text files?</title>
	<link>http://ask.metafilter.com/86158/How%2Dshould%2DI%2Dconvert%2Da%2DThunderbird%2Dinbox%2Dinto%2Dtext%2Dfiles</link>	
	<description>What&apos;s the best way to export all of the emails in a Thunderbird inbox to text files, one text file per email? I&apos;m planning on doing some linguistic analysis of emails and need to take a Thunderbird inbox and convert it into text files before I get to work. Google searches have revealed many mbox (which I think Thunderbird uses) parsers of, I am sure, varying quality. I&apos;d love to skip the endless trial and error stage and start with the perfect tool. What&apos;s the best way to convert a Thunderbird inbox to text files?&lt;br&gt;
&lt;br&gt;
ps - I&apos;m comfortable using Perl and Python if you guys think a scripting solution is best.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.86158</guid>
	<pubDate>Fri, 14 Mar 2008 11:57:48 -0800</pubDate>
	<category>inbox</category>
	<category>mbox</category>
	<category>perl</category>
	<category>scripting</category>
	<category>thunderbird</category>
	<dc:creator>eisenkr</dc:creator>
	</item>
	
	</channel>
</rss>

