View Single Post
Old 02-03-2022, 06:45 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by vyvlad View Post
Is there an easy way to change the mapping of many special characters? Regex works well, but single-function mode means that you can only do one character swap per field (unless there's a chaining syntax I couldn't find), and I don't necessarily want to enter a full programming environment just to swap some characters.
For something like that, using General Program mode makes sense. But, Template program mode would work. For example, changing random characters:

Code:
{title:'re(re($,"[os]","f"),"[bdcH]","a")'}
works to change "Bleak House" to "aleak afufe". But I would much rather use:
Code:
program:
title = re($title,"[os]","f");
title = re(title,"[bdcH]","a");
strcat(current_library_name(), '/', $author_sort, '/', title, ' - ', $author)
Which is an update to my current send-to-device save template.
davidfor is offline   Reply With Quote