From: Vyatcheslav Yatskovsky <yatskovsky@gmail.com>
To: "ntg-context-request@ntg.nl" <ntg-context@ntg.nl>
Subject: CD cover tool -- handling unusual symbols in folder names
Date: Sat, 17 Feb 2007 01:49:39 +0200 [thread overview]
Message-ID: <993111271.20070217014939@gmail.com> (raw)
In-Reply-To: <mailman.1235.1171641318.17432.ntg-context@ntg.nl>
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 }.
<inserted text>
\par
<to be read again>
}
\next1 #1,->\dosetups {#1}
\doprocesscommaitem
\doprocesscommalist ...item \gobbleoneargument #1,
]\relax \global \advance \...
\XML:ele:/file ->\setups [xmldir:file]
\endgraf \egroup
l.8 </file>
?
! 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
next parent reply other threads:[~2007-02-16 23:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1235.1171641318.17432.ntg-context@ntg.nl>
2007-02-16 23:49 ` Vyatcheslav Yatskovsky [this message]
2007-02-18 5:48 ` Not able to use Bibtex module Zulkifli Hidayat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=993111271.20070217014939@gmail.com \
--to=yatskovsky@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).