home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
App to Copy Artwork and Details to Movie Folder v0.5.6
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kiwijunglist" data-source="post: 551230" data-attributes="member: 76888"><p><strong>Re: App to Copy Artwork and Details to Movie Folder</strong></p><p></p><p></p><p></p><p><a href="http://www.autohotkey.com/forum/viewtopic.php?p=319540#319540" target="_blank">Convert text string to acceptable filename format</a></p><p></p><p>Below example will convert movietitle="Æon Flùx*" into movietitle="Aeon Flux"</p><p>Obviously the special character list should be expanded.</p><p></p><p>[code]</p><p>txt=Æon Flùx*</p><p></p><p>MsgBox % txt</p><p></p><p>;replace special characters with non special equivalents</p><p></p><p>replace=àa|áa|âa|ãa|äa|åa|çc|èe|ée|êe|ëe|ìi|íi|îi|ùu</p><p>Loop, Parse, Replace, |</p><p>{</p><p>StringSplit, Part, A_LoopField</p><p>StringReplace, txt, txt, %Part1%, %Part2%, All</p><p>}</p><p></p><p>;replace Æ with AE</p><p></p><p>txt := RegExReplace(txt, "Æ", "AE")</p><p></p><p>;replace æ with ae</p><p></p><p>txt := RegExReplace(txt, "æ", "ae")</p><p></p><p>;replace space with underscore</p><p></p><p>txt := RegExReplace(txt, " ", "_")</p><p></p><p>;remove any chars that remain that are not "a-zA-Z0-9_"</p><p></p><p>txt := RegExReplace(txt, "\W", "")</p><p></p><p>;replace underscore with space</p><p></p><p>txt := RegExReplace(txt, "_", " ")</p><p></p><p>MsgBox % txt</p><p>[/code]</p></blockquote><p></p>
[QUOTE="kiwijunglist, post: 551230, member: 76888"] [b]Re: App to Copy Artwork and Details to Movie Folder[/b] [url=http://www.autohotkey.com/forum/viewtopic.php?p=319540#319540]Convert text string to acceptable filename format[/url] Below example will convert movietitle="Æon Flùx*" into movietitle="Aeon Flux" Obviously the special character list should be expanded. [code] txt=Æon Flùx* MsgBox % txt ;replace special characters with non special equivalents replace=àa|áa|âa|ãa|äa|åa|çc|èe|ée|êe|ëe|ìi|íi|îi|ùu Loop, Parse, Replace, | { StringSplit, Part, A_LoopField StringReplace, txt, txt, %Part1%, %Part2%, All } ;replace Æ with AE txt := RegExReplace(txt, "Æ", "AE") ;replace æ with ae txt := RegExReplace(txt, "æ", "ae") ;replace space with underscore txt := RegExReplace(txt, " ", "_") ;remove any chars that remain that are not "a-zA-Z0-9_" txt := RegExReplace(txt, "\W", "") ;replace underscore with space txt := RegExReplace(txt, "_", " ") MsgBox % txt [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
App to Copy Artwork and Details to Movie Folder v0.5.6
Contact us
RSS
Top
Bottom