Download
(25Kb)
Download
Updated: 07-12-10 04:54 PM
Updated:07-12-10 04:54 PM
Created:unknown
Downloads:5,593
Favorites:35
MD5:

WoWI Mod Uploader  Popular! (More than 5000 hits)

Version: r53
by: Shadowed [More]

This is for developers who are interested in uploading mods to WoWInterface, not for updating mods from WoWInterface to your computer, Thanks!

This script tries to speed up the process of updating your mods on WoWInterface and making life easier in general, supports uploading from an svn repository on a remote server or from your own desktop. Right now, it'll only update files that have already been submitted but their are plans to allow uploading new files later.

All you need is Java 1.5 (also known as Java 5.0) or higher, and a WoWInterface account. Everything is done through a command line, the arguments can be pulled up by passing -h or -help, heres the ones that are available currently.

Code:
-u <username>               WoWInterface account name
-p <password>               WoWInterface account password
-ver <version>              File version for uploading
-log                        Includes a changelog-<version>.txt file with the mod zip.
-desc-log                   Includes the last 50 commits in the mod description.
-svn <path>                 Path to the svn command line, usually you can just use -svn.
-fid <fileid>               File ID to update on WoWInterface.
-ftitle <title>             Attempts to find the file id using the mod title.
-ftoc                       Attempts to scan the TOC file in the given path for the file title.
-desc <path>                Replaces the mod description which the file passed.
-skip                       Skips confirmation on the mod to upload to
-zip-ver                    Uploads the zip with the file name <folder>-<version>.zip
-svn-export <url>           Grabs the specified SVN directory URL and uploads it, -path and -svn-path are not needed for this.
-svn-path <dir>             Path to the svn to grab the change log/revision number from, only needed if the current working directory isn't the svn repo itself.
-path <dir>                 Path to the mod to be zipped/uploaded, only needed if the current working directory isn't the mod itself.
-zip <dir>                  Zipped file to upload, cannot use -zip-ver or -log with this.
-ignore <pattern>           Lets you choose which files should not be included in the zip, you add as many -ignore args as needed.
You do not need to pass -u or -p through the command line, it'll simply ask you to provide the information, same with -ftitle and -fid you'll be asked for the file id you want to upload to. This can be ran from any location on your computer, you just need to make sure you set the correct -path or -svn-path to point towards the location you want.

A few examples, lets say WoWIUploader.class is located in C:/ and I want to upload the add on FooBar that's located in C:/World of Warcraft/Interface/Addons/FooBar and it's also been checked out from svn and the file id is 7500.

java WoWIUploader -fid 7500 -zip-ver -desc-log -log -path "C:/World of Warcraft/Interface/Addons/FooBar" -svn-path "C:/World of Warcraft/Interface/Addons/FooBar" -ver "r50"

This will create a zip named FooBar-r50.zip, and also include a change log named changelog-r50.txt of all changes retrieved through svn log, the mod description will be updated with the last 50 changes also. Now, say you want to upload a mod that's in SVN from a tag that's located in www.testserver.com/svn/tags/FooBar-r50 and the file title is "Foo Bar", you'd use

java WoWIUploader -ftitle "Foo Bar" -desc-log -log -svn-export "www.testserver.com/svn/tags/FooBar-r55" -svn-path "www.testserver.com/svn/trunk/FooBar" -ver "r55"

This will create a zip named FooBar-r55.zip, a change log file named changelog-r55.txt retrieved from www.testserver.com/svn/trunk/FooBar/ and will include the last 50 changes in the mod description also retrieved from the same URL as changelog-r55.txt and will upload to the mod with the title Foo Bar.

-----
If you want to upload from WoWAce to WoWInterface, but you use .pkgmeta, the latest version will handle that, for example:

java WoWIUploader -curse-page "elitistgroup" -api-key "####################" -desc-log -skip -ftitle "Elitist Group" -repo-log "[email protected]:wow/elitistgroup/mainline.git"

Will pull the latest version of Elitist Group from wowace, then it will pull the latest version and change log from a git repo.


Or, if you are pulling from a straight git repo:

java WoWIUploader -git-export "git://github.com/Shadowed/DamnCraftSpam.git" -git-path "master" -ftitle "Damn Craft Spam" -log -desc-log -zip-ver -git-folder "DamnCraftSpam"

Will pull from the git repo DamnCraftSpam on github, using the branch master, and it will name the folder DamnCraftSpam.

Optional Files (0)


Post A Reply Comment Options
Unread 06-16-15, 02:46 PM  
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2359
File comments: 133
Uploads: 38
Re: Uploading Files

Originally Posted by Old_tyke
Most websites have a simple 'upload' button. Why go through all this 'waste of time and energy' stuff just to upload a file? puts me right off uploading stuff
This allows for batch processing and provides a way to facilitate a level of automated distribution. If you don't need any of these, then don't use it. Some of us that maintain dozens of addons across multiple distribution sites may find this helpful.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Report comment to moderator  
Reply With Quote
Unread 09-13-13, 04:42 AM  
Old_tyke
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Unhappy Uploading Files

Most websites have a simple 'upload' button. Why go through all this 'waste of time and energy' stuff just to upload a file? puts me right off uploading stuff
Report comment to moderator  
Reply With Quote
Unread 10-14-12, 10:09 AM  
Vandesdelca32
A Kobold Labourer
 
Vandesdelca32's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 5
Uploads: 2
This supporting Curseforge would be fantastic. I'd stop forgetting to upload my addons here when I update, because I can couple this with the 'branch/tag' I already do locally to my repos.
Report comment to moderator  
Reply With Quote
Unread 04-26-11, 03:27 PM  
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view AddOns

Forum posts: 554
File comments: 271
Uploads: 24
Any chance for CurseForge support in addition to WoWAce?
__________________
Grab your sword and fight the Horde!
Report comment to moderator  
Reply With Quote
Unread 05-25-08, 02:37 PM  
Shadowed
...
Featured Addon Author

Forum posts: 387
File comments: 2513
Uploads: 83
You don't have a PATH set for the "svn" command, so you need to use the -svn argument to point to it, for example if you have svn.exe located at C:/Program Files/SVN then you would pass "-svn "C:/Program Files/SVN/svn.exe"
Report comment to moderator  
Reply With Quote
Unread 05-25-08, 02:12 PM  
ganders
A Flamescale Wyrmkin
AddOn Author - Click to view AddOns

Forum posts: 131
File comments: 59
Uploads: 10
Getting this error:
Code:
java.io.IOException: Cannot run program "svn": CreateProcess error=2, The system cannot find the file specified 
        at java.lang.ProcessBuilder.start(Unknown Source)
        at WoWIUploader.executeCommand(WoWIUploader.java:496)
        at WoWIUploader.uploadMod(WoWIUploader.java:589)
        at WoWIUploader.<init>(WoWIUploader.java:306)
        at WoWIUploader.main(WoWIUploader.java:1065)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 5 more
Failed to export http://ninjas-n-things.googlecode.com/svn/trunk/NinjaYell
This is what I entered:
Code:
java WoWIUploader -ftitle "NinjaYell" -desc-log -log -svn-export
 "http://ninjas-n-things.googlecode.com/svn/trunk/NinjaYell" -ver "r103"
Last edited by ganders : 05-25-08 at 02:12 PM.
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 12:13 AM  
Shadowed
...
Featured Addon Author

Forum posts: 387
File comments: 2513
Uploads: 83
It's the path to your SVN to download from, and then to upload to WoWI.
Report comment to moderator  
Reply With Quote
Unread 01-09-08, 02:04 AM  
Shen
A Murloc Raider

Forum posts: 5
File comments: 15
Uploads: 0
SVN path

I tried searching for it but I could not find a mention of what the actual SVN path and server is for WoWI, and trial and error didn't yield any results either. Any help?
Report comment to moderator  
Reply With Quote
Unread 10-13-07, 02:06 AM  
Shadowed
...
Featured Addon Author

Forum posts: 387
File comments: 2513
Uploads: 83
Originally posted by Gazmik
Yep... to get the shell to pass the entire path as one arg to svn, you have to quote the whole path or escape the spaces with backslashes, and then it works just fine. (Same goes for any other *nix, really... it's just that filenames with spaces in them are a bit more common on the Mac.) Again, that's at the shell level, though... once you're in an environment like Java where you're passing args around as an array, the quotes are superfluous.
Try grabbing the version from http://wowiuploader.googlecode.com/s...k/WoWIUploader this includes skipping any files that starts with a period by default and removes quotes for the svn commands.

[Edit] It also includes -ftoc, does not work with -svn-export yet.
Last edited by Shadowed : 10-13-07 at 02:21 AM.
Report comment to moderator  
Reply With Quote
Unread 10-13-07, 12:15 AM  
Gazmik
A Cobalt Mageweaver
 
Gazmik's Avatar
AddOn Author - Click to view AddOns

Forum posts: 245
File comments: 44
Uploads: 18
Originally posted by Shadowd
Must be a Mac vs Windows inconsistency then, I assume if you pass the arguments manually to svn even with the path or URL having a space in it works fine?
Yep... to get the shell to pass the entire path as one arg to svn, you have to quote the whole path or escape the spaces with backslashes, and then it works just fine. (Same goes for any other *nix, really... it's just that filenames with spaces in them are a bit more common on the Mac.) Again, that's at the shell level, though... once you're in an environment like Java where you're passing args around as an array, the quotes are superfluous.
__________________
Gazmik Fizzwidget's UI Addons: www.fizzwidget.com
Report comment to moderator  
Reply With Quote
Unread 10-12-07, 11:40 PM  
Shadowed
...
Featured Addon Author

Forum posts: 387
File comments: 2513
Uploads: 83
Originally posted by Gazmik
In the shell, can pass the args to /usr/bin/java (and through it, to WoWIUploader) as either -svn-path "/Applications/World of Warcraft" or -svn-path /Applications/World\ of\ Warcraft... either way, once it gets to your code as a single item in the args array, containing the path without any escape codes or quotes. The problem is when you invoke SVN -- at that point, cmdArgs.get("svn-path") is exactly what you need to pass to the ProcessBuilder for the unquoted, unescaped path to get to SVN. Wrapping it in quotes causes SVN to think they're part of the path and throw an error.

I'm surprised it'd work for you at all with it wrapped in quotes... but I suppose there may be some differences in the *nix versus Windows platform-specific parts of the JVM, relating to whether ProcessBuilder ends up going through a shell (or emulating shell command parsing) to invoke the command it's given.

Doesn't run at all: Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value -1095041334 in class file ArgumentTest

Ah, I think I figured it out. When I originally posted those mods on WoWI (ages ago), I must've copied & pasted from the webpages on fizzwidget.com; on there I use the Markdown plugin for Wordpress to get "smart quotes" and whatnot. So the WoWI descriptions got those as literal chars instead of entities, and when those bytes ran through Java it used a different character encoding (UTF8 vs ISO-Latin1, maybe). So I oughta fix that in my mod descriptions.
Must be a Mac vs Windows inconsistency then, I assume if you pass the arguments manually to svn even with the path or URL having a space in it works fine? I'll just remove the quotes if so, since it's not required in Windows either was just doing it to be safe.

Oh well, not a big deal.

Java is using UTF8 I believe, not sure actually.
Report comment to moderator  
Reply With Quote
Unread 10-12-07, 11:13 PM  
Gazmik
A Cobalt Mageweaver
 
Gazmik's Avatar
AddOn Author - Click to view AddOns

Forum posts: 245
File comments: 44
Uploads: 18
Originally posted by Shadowd
If you pass -svn-path "/Applications/World of Warcraft" it doesn't work, if you pass -svn-path /Applications/World of Warcraft it works fine?
In the shell, can pass the args to /usr/bin/java (and through it, to WoWIUploader) as either -svn-path "/Applications/World of Warcraft" or -svn-path /Applications/World\ of\ Warcraft... either way, once it gets to your code as a single item in the args array, containing the path without any escape codes or quotes. The problem is when you invoke SVN -- at that point, cmdArgs.get("svn-path") is exactly what you need to pass to the ProcessBuilder for the unquoted, unescaped path to get to SVN. Wrapping it in quotes causes SVN to think they're part of the path and throw an error.

I'm surprised it'd work for you at all with it wrapped in quotes... but I suppose there may be some differences in the *nix versus Windows platform-specific parts of the JVM, relating to whether ProcessBuilder ends up going through a shell (or emulating shell command parsing) to invoke the command it's given.

Originally posted by Shadowd
Can you grab http://wowiuploader.googlecode.com/s...mentTest.class and run java ArgumentTest -svn-path /Applications/World of Warcraft/ and java ArgumentTest -svn-path "/Applications/World of Warcraft/" and give me the output for both? I'm 99% sure it's something with Mac OS X but this will verify it.
Doesn't run at all: Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value -1095041334 in class file ArgumentTest

Originally posted by Shadowd
Are you using r32? And can you link the mod in question thats causing this issue, I may have missed some characters to convert.
Ah, I think I figured it out. When I originally posted those mods on WoWI (ages ago), I must've copied & pasted from the webpages on fizzwidget.com; on there I use the Markdown plugin for Wordpress to get "smart quotes" and whatnot. So the WoWI descriptions got those as literal chars instead of entities, and when those bytes ran through Java it used a different character encoding (UTF8 vs ISO-Latin1, maybe). So I oughta fix that in my mod descriptions.
__________________
Gazmik Fizzwidget's UI Addons: www.fizzwidget.com
Report comment to moderator  
Reply With Quote
Unread 10-12-07, 10:39 PM  
Shadowed
...
Featured Addon Author

Forum posts: 387
File comments: 2513
Uploads: 83
Originally posted by Gazmik
Nice! Anything that makes posting updates to my mods less of a hassle is good by me!

Suggestions:
  • BUG: Fetching the svn logs fails if the path contains spaces. (BTW, on Mac OS X the default install for WoW puts it in "/Applications/World of Warcraft".) Not wrapping the path in quotes when passing it to executeCommand on line 478 fixes this.
  • BUG: Some characters get mucked up when it grabs the mod description from the site and inserts the changelog... all my mods now have various accented letters where they should have quotes and apostrophes in their descriptions.
  • Read the addon's TOC file... from it you could get the title (for looking up the file ID on the site) and the version number for posting the upload under.
  • Include all filenames starting with a period in the ignore pattern by default. (I do my development on Mac OS X, which likes to put .DS_Store files everywhere.)
If you pass -svn-path "/Applications/World of Warcraft" it doesn't work, if you pass -svn-path /Applications/World of Warcraft it works fine? Thats rather odd, Java is doing the command argument parsing so it maybe just an issue with the implementation used, I'll need to look into this.

[Edit] Can you grab http://wowiuploader.googlecode.com/svn/trunk/ArgumentTest/ArgumentTest.class and run java ArgumentTest -svn-path /Applications/World of Warcraft/ and java ArgumentTest -svn-path "/Applications/World of Warcraft/" and give me the output for both? I'm 99% sure it's something with Mac OS X but this will verify it.

Are you using r32? And can you link the mod in question thats causing this issue, I may have missed some characters to convert.

This was originally included in the Lua version but I never got around to adding it back into the Java one, will get it added as an option (probably something like -ftoc) along with showing you all mod titles that are close to the one given, so if your mod is named "FooBar" and you type "FooB" it'll show you that the mod "FooBar" closely matches "FooB".

Done, anything starting with . will be skipped.
Last edited by Shadowed : 10-12-07 at 10:45 PM.
Report comment to moderator  
Reply With Quote
Unread 10-12-07, 09:16 PM  
Gazmik
A Cobalt Mageweaver
 
Gazmik's Avatar
AddOn Author - Click to view AddOns

Forum posts: 245
File comments: 44
Uploads: 18
Nice! Anything that makes posting updates to my mods less of a hassle is good by me!

Suggestions:
  • BUG: Fetching the svn logs fails if the path contains spaces. (BTW, on Mac OS X the default install for WoW puts it in "/Applications/World of Warcraft".) Not wrapping the path in quotes when passing it to executeCommand on line 478 fixes this.
  • BUG: Some characters get mucked up when it grabs the mod description from the site and inserts the changelog... all my mods now have various accented letters where they should have quotes and apostrophes in their descriptions.
  • Read the addon's TOC file... from it you could get the title (for looking up the file ID on the site) and the version number for posting the upload under.
  • Include all filenames starting with a period in the ignore pattern by default. (I do my development on Mac OS X, which likes to put .DS_Store files everywhere.)
__________________
Gazmik Fizzwidget's UI Addons: www.fizzwidget.com
Last edited by Gazmik : 10-12-07 at 09:27 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.