[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] p tags in docs

>>>>> "DkS" == Dan Stowell <danstowell@xxxxxxxxx> writes:

    DkS> Would you mind sending a patch for adding this to the scons
    DkS> install step? I'd like to try it out on my little linux.

Im sorry i dont talk enough 'sconsish' to be able to plug it into the
SCEL installation part of SConstruct, but its supposed to be easy :-)

I think it involves making a Builder for the SCEL environment with a
method for substituting the p-tags in every html-file.  Anybody has a
template for this?

The actual substitution is just 2 sed-pipes (which presumably should be
substituted with relevant python code inside a SConscript somewhere):

Put a script in a file "./rehtmlize" ( between the --- lines):



echo rehtmlizing "$IN"

# change various <p id=*> type tags with equivalent divs:

cat "$IN" | sed 's/p\.p\([0-9]\)/#p\1/' \
	  | sed 's/<p class="\(.*\)">\(.*\)<\/p>/<div id="\1">\2<\/div>/' \
	   > "$OUT"
mv "$OUT" "$IN"


then run it on every html-file inside Help:

$ find Help -name '*.html' -print0 -exec ./rehtmlize $i {} \;

sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/