Mercurial > hg > orthanc
comparison Resources/Samples/Lua/WriteToDisk.lua @ 2576:4555a8ef2e88
escape colons in path
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 May 2018 08:37:32 +0200 |
parents | 905842836ad4 |
children |
comparison
equal
deleted
inserted
replaced
2572:fcf447be9e97 | 2576:4555a8ef2e88 |
---|---|
1 TARGET = '/tmp/lua' | 1 TARGET = '/tmp/lua' |
2 | 2 |
3 function ToAscii(s) | 3 function ToAscii(s) |
4 -- http://www.lua.org/manual/5.1/manual.html#pdf-string.gsub | 4 -- http://www.lua.org/manual/5.1/manual.html#pdf-string.gsub |
5 return s:gsub('[^a-zA-Z0-9-/ ]', '_') | 5 -- https://groups.google.com/d/msg/orthanc-users/qMLgkEmwwPI/6jRpCrlgBwAJ |
6 return s:gsub('[^a-zA-Z0-9-/-: ]', '_') | |
6 end | 7 end |
7 | 8 |
8 function OnStableSeries(seriesId, tags, metadata) | 9 function OnStableSeries(seriesId, tags, metadata) |
9 print('This series is now stable, writing its instances on the disk: ' .. seriesId) | 10 print('This series is now stable, writing its instances on the disk: ' .. seriesId) |
10 | 11 |