Pre-Validation Tool

  • 2
  • Idea
  • Updated 9 years ago
The file naming limitations for BB make it kind of challenging to use JS libraries like jQuery Mobile as many of the css resources have characters in their filename that BB doesn't allow.

In stead of having to go through all my source files manually, I've tried to make a validation tool that could report the necessary changes in my file names, .html and .css files, and commit those changes if so desired.

So I built a basic CLI tool with an HTML and CSS parser that will output something like this:


gapval -s="F:\Projects\OKeez\OKeez Apps\Manager" -report

Rename File \OKeez.png to \okeez.png
Rename File \assets\OKeez.png to \assets\okeez.png
Rename File \css\jquery.mobile-1.0a3.min.css to \css\jquery.mobile1.0a3.min.css
Rename File \css\images\ajax-loader.png to \css\images\ajaxloader.png
...
Change Element \index.html-style: jquery.mobile-1.0a3.min.css; to jquery.mobile1.0a3.min.css

Change Element \index.html-script: jquery.mobile-1.0a3.min.js to jquery.mobile1.0a3.min.js
...


It's probably not going to catch everything, but I just wanted to share the thought and see if someone had done something similar and what their experience was.

If anyone's interested I'd be more than happy to share the code (C# .NET)
Photo of OKeez

OKeez

  • 25 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 2
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
This is a great idea - if you choose to make the code available, we'll link it on the BlackBerry documentation page.
Photo of OKeez

OKeez

  • 25 Posts
  • 0 Reply Likes
Thanks, let me do some more testing and then I'll set up a code repository for it.
Photo of vivekmago

vivekmago

  • 2 Posts
  • 0 Reply Likes
Any luck in making this available?