StripHTML - Fine Tuning.
Posted: 09 Sep 2010 15:16
Some may think this is not a file manager's primary mission, some will see the potential for this regarding current readfile/readURL abilities (as stated here, for example).
So...
Let's consider this thread and StripHTML function.
-can ReadFile has the same ability for offline files? As in this script I made to get the job done (currently works one file at a time... I HATE not knowing how to script!):
EDIT: even better: WRITEFILE/both having such option, as one may want to leave source, raw data intact.
-can StriptHTML deal with Unicode? If it already does, what have I done wrong to produce results like 05_ReadURL_Detagging_NNegroponte_Transcr_pgm0687.txt diplays, such:
Correct:
Attached some samples of such offline source files, Detagger (best so far! - but doesn't batch operations...), PowerEdit and ReadFile+Regex/StripHTML and respective approaches/results.
Contents:
Tag - xyScript
So...
Let's consider this thread and StripHTML function.
-can ReadFile has the same ability for offline files? As in this script I made to get the job done (currently works one file at a time... I HATE not knowing how to script!):
Code: Select all
$sc = readfile(<curitem>, b),,b);
$a = regexreplace($sc, "<[^<]*>", "");
copytext $a;
writefile("<curitem>.diz", $a);
-can StriptHTML deal with Unicode? If it already does, what have I done wrong to produce results like 05_ReadURL_Detagging_NNegroponte_Transcr_pgm0687.txt diplays, such:
Code: Select all
Nicholas Negroponte: Porque o retorno é muito alto. Se você está em uma posição confortável, em uma posição satisfatória, não assumirá riscos. Não tentará, quer seja na educação ou no comércio, fazer coisas que ponham em risco essa satisfação.
Code: Select all
*Nicholas Negroponte*: Porque o retorno é muito alto. Se você está em uma
posição confortável, em uma posição satisfatória, não assumirá riscos. Não
tentará, quer seja na educação ou no comércio, fazer coisas que ponham em
risco essa satisfação.
Contents:
- _xyScript_XYDetagger.xys
01_SOURCE_NNegroponte_Transcr_pgm0687.txt
02_IDEAL_byDetagger_NNegroponte_Transcr_pgm0687_2.txt
03_SIMILARtoCurrentReadFilePlusRegEx_PowerEDIT_NNegroponte_Transcr_pgm0687.txt
04_ReadFilePlusRegEx_NNegroponte_Transcr_pgm0687.txt.diz
05_ReadURL_Detagging_NNegroponte_Transcr_pgm0687.txt
Tag - xyScript