Moving from trac to a single redmine

Pierre Pronchery khorben at defora.org
Fri Feb 19 20:19:45 UTC 2016


On 19/02/2016 21:00, Holger Freyther wrote:
> In trac we have:
> 
> 	[[Image(motorola_filter_replacement_step_1_low.jpg, 250px)]]
> 
> For redmine we need:
> 
> 	{{thumbnail(motorola_filter_replacement_step_1_low.jpg, size=250)}}
> 
> Anyone wants to try his luck with a regexp to do this automatically?
> Or a bit of ruby code to split and manipulate if it is matching [[Image?

This works for me:

$ REGEXP='s/\[\[Image(\([^,]*\), *\([0-9]*\)px)\]\]/{{thumbnail(\1,
size=\2)}}/'
$ echo '[[Image(motorola_filter_replacement_step_1_low.jpg, 250px)]]' |
sed -e "$REGEXP"
{{thumbnail(motorola_filter_replacement_step_1_low.jpg, size=250)}}

HTH,
-- 
khorben


More information about the baseband-devel mailing list