From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33394 Path: news.gmane.org!not-for-mail From: Vyatcheslav Yatskovsky Newsgroups: gmane.comp.tex.context Subject: CD cover tool -- handling unusual symbols in folder names Date: Sat, 17 Feb 2007 01:49:39 +0200 Message-ID: <993111271.20070217014939@gmail.com> References: Reply-To: Yatskovsky , mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171671314 20056 80.91.229.12 (17 Feb 2007 00:15:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 17 Feb 2007 00:15:14 +0000 (UTC) To: "ntg-context-request@ntg.nl" Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 17 01:15:06 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HIDEH-00072K-28 for gctc-ntg-context-518@m.gmane.org; Sat, 17 Feb 2007 01:15:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8C57095; Sat, 17 Feb 2007 01:12:52 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12077-02; Sat, 17 Feb 2007 01:12:52 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A608396; Sat, 17 Feb 2007 00:47:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0C68296 for ; Sat, 17 Feb 2007 00:47:37 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09289-02-2 for ; Sat, 17 Feb 2007 00:47:31 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by ronja.ntg.nl (Postfix) with ESMTP id 1F3699C for ; Sat, 17 Feb 2007 00:47:27 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id k27so1487441nfc for ; Fri, 16 Feb 2007 15:49:39 -0800 (PST) Original-Received: by 10.82.175.2 with SMTP id x2mr5864960bue.1171669779279; Fri, 16 Feb 2007 15:49:39 -0800 (PST) Original-Received: from ?77.122.221.78? ( [77.122.221.78]) by mx.google.com with ESMTP id b33sm4506167ika.2007.02.16.15.49.38; Fri, 16 Feb 2007 15:49:38 -0800 (PST) X-Mailer: The Bat! (v3.95.8) Professional X-Priority: 3 (Normal) In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:33394 Archived-At: Hello, I try to implement a script that will typeset covers for CD/DVD's that contain music compilations. Now I have script that follows. It scans the root directory of a CD for folders and outputs them a list. The major problem is that I have " & " and " ' " symbols in folder names on which script fails complaining (D:\context\xmldir-1.xml subject : - Music ! Argument of & has an extra }. \par } \next1 #1,->\dosetups {#1} \doprocesscommaitem \doprocesscommalist ...item \gobbleoneargument #1, ]\relax \global \advance \... \XML:ele:/file ->\setups [xmldir:file] \endgraf \egroup l.8 ? ! Emergency stop. How can I cope with this? Best, Vyatcheslav %%%%%%%%%%%%%%%%%%%%%%%%%% \startmode[*first] \executesystemcommand {xmltools --dir --pattern=* --root=H:\ --output=xmldir-1.xml} \stopmode \setuppapersize [S6][S6] \setuplayout [width=middle, height=middle, backspace=12pt, topspace=12pt, bottomspace=32pt, header=0pt, footer=0pt, bottomdistance=9pt, bottom=18pt] \setupbackgrounds [text] [background=color, backgroundcolor=TextColor] \definecolor [TextColor] [r=.7,g=.8,b=.9] \definecolor [DoneColor] [s=.5] \setupcolors [state=start] \setuphead [subject] [style=\tfc] \setupbodyfont [ss] \defineXMLenvironment [files] [url=] {\doifelsenothing{\XMLop{url}} {\xdef\XMLDIRurl{}} {\xdef\XMLDIRurl{\XMLop{url}/}} \startXMLignore} {\stopXMLignore} \newcounter\NOfEntries \startsetups[xmldir:file] \doglobal\increment\NOfEntries {\hbox to \hsize \bgroup \XMLflush{base} \hss \hbox to 2em{\XMLflush{type}\hss} \quad \quad \hbox to 5em{\hss\XMLflush{size}} \quad \quad \XMLflush{date} \egroup} \stopsetups \defineXMLenvironment [directory] [name=] {\subject{Music}} {} \defineXMLenvironment [file] [name=] {\bgroup} {\setups[xmldir:file] \endgraf \egroup} \defineXMLsave[base] \defineXMLsave[type] \defineXMLsave[size] \defineXMLsave[date] \starttext \processXMLfilegrouped{xmldir-1.xml} \stoptext