ModUpdater | |
---|---|
Current developers | SatanicSanta |
Latest version | Alpha (no official version number) |
Status | Active |
Written in | Ruby, Perl 5 |
Operating systems | Linux, OS X, Windows |
Depends on | wikiutils.rb, mediawiki_api, multipart-post, open_uri_redirections, mime-types, WWW::Twitter |
License | All rights reserved |
Source | Link |
Issues | Link |
Website | Link |
ModUpdater is a command-line developer tool created by SatanicSanta. Its purpose is to limit the tedious acts that occur after a mod developer compiles their mod, such as updating wiki articles, making announcements on Twitter, and uploading the compiled mod to CurseForge. It uses a user-created JSON or XML configuration file to enable and perform the acts. It is written in Ruby, with a tiny amount of Perl 5.
Configuration[]
ModUpdater is configured via a JSON or XML file of any name, and any directory. This file has the following tree:
- modupdater: The main object. Will cause a forced program exit if omitted.
- new_vers: A string field defining the version of the mod that is being uploaded. Will cause a forced program exit if omitted.
- cf_settings: The object for CurseForge-specific configuration. Will cause a forced program exit if omitted.
- type (Optional): A string field defining the release type for use in the CurseForge upload. Will default to the standard release if omitted or an invalid value.
- release: Standard release
- beta: Beta release
- alpha: Alpha release
- api_key: A string field defining the user's CurseForge API Key. Will cause a forced program exit if omitted.
- project: An integer field defining the user's CurseForge Project ID. Will cause a forced program exit if omitted.
- file_name (Optional): A string field defining the user's file name for use in the CurseForge upload. This does not need, and probably cannot, match the file_dir field. Will default to everything after the last / in the file_dir field if omitted.
- file_dir: A string field defining the directory of the file being uploaded to CurseForge. This does not need, and probably cannot, match the file_name field. Will cause a forced program exit if omitted.
- game_versions: An array of strings defining the valid Minecraft versions of the mod being uploaded. Will cause a forced program exit if omitted.
- type (Optional): A string field defining the release type for use in the CurseForge upload. Will default to the standard release if omitted or an invalid value.
- issues_bool: A boolean field enabling (true) or disabling (false) the use of issue tracker links in the changelogs. Will cause a forced program exit if omitted.
- issues_url: A string field containing the URL to the user's issue tracker. Will cause a forced program if omitted and issues_bool is true.
- changelog (Optional): A standard object containing an infinite number of arrays that define each line in the changelog.
- type (Optional): A string field defining the type of change described by that particular array.
- changes: A string field describing the change. Will cause a forced program exit if omitted and the changelog array object is not omitted.
- issue (Optional): The issue number.
- twitter_bool: A boolean value enabling (true) or disabling (false) the use of the Twitter announcement. If this value is false, Perl and WWW::Twitter are not required for the software. Will cause a forced program exit if omitted.
- twitter_un: A string containing the user's Twitter username. This must be an account that they have access to, because the software will require the user's password. Will cause a forced program exit if omitted and twitter_bool is true.
- tweet_custom: A string containing a custom tweet. Cannot be longer than 140 characters, and will say one of the following, depending on whether the length of (
mod_name + new_vers
) is greater than 101.- Greater than: My mod with a long name and version number has updated. Get it at CurseForge
- Otherwise: mod_name has updated to new_vers. Get it at CurseForge, which is also the default tweet.
- mod_name: A string containing the mod's name. Will cause a forced program exit if omitted.
- wiki_settings: An object containing the settings for the Wiki-related features of the bot. Will cause a forced program exit if omitted.
- wiki_bool: A boolean value enabling (true) or disabling (false) the wiki features.
- wiki_page (Optional): A string value linking to the FTB Gamepedia page for the mod's changelog. Will default to mod_name/Changelog if omitted.
- wiki_un: A string value containing the user's Gamepedia username. Will cause a forced program exit if omitted and wiki_bool is true.
- section_size (Optional): An integer defining the size of the headers used in the changelog update. Will default to 2 if the value is greater than 6 or smaller than 2.
Example JSON file[]
The following JSON file is provided by the developer as an example.
{ "modupdater": { "new_vers": "0.29.0", "cf_settings": { "type": "beta", "api_key": "jhdfjhdfghjdfghjdfghjgdf", "project": 9769283495845, "file_name": "Flaxbeard's-Steam-Power-1.7.10-0.29.0.jar", "file_dir": "elifoster/dev/fsp/build/lib/Flaxbeards-Steam-Power-1.7.10-0.29.0.jar", "game_versions": ["1.7.10"] }, "issues_bool": true, "issues_url": "http://github.com/esteemed-innovation/flaxbeards-steam-power/issues", "changelog": [ { "type": "FIX", "changes": "Fixed the bug", "issue": 69 }, { "type": "NEW", "changes": "Added the feature", "issue": 42 } ], "twitter_bool": true, "twitter_un": "SatanNicholas", "tweet_custom": "Updated FSP to 0.29.0!!!!! GET IT AT CURSEFORGE!", "mod_name": "Flaxbeard's Steam Power", "wiki_settings": { "wiki_bool": true, "wiki_page": "Flaxbeard's Steam Power/Changelog", "wiki_un": "TheSatanicSanta", "section_size": 2, } } }
Example XML file[]
The following XML file is provided by the developer as an example.
<?xml version="1.0" encoding="UTF-8"?> <modupdater> <cf_settings> <api_key>jhdfjhdfghjdfghjdfghjgdf</api_key> <file_dir>elifoster/dev/fsp/build/lib/Flaxbeards-Steam-Power-1.7.10-0.29.0.jar</file_dir> <file_name>Flaxbeard's-Steam-Power-1.7.10-0.29.0.jar</file_name> <game_versions>["1.7.10", "1.6.4"]</game_versions> <project>9769283495845</project> <type>b</type> </cf_settings> <changelog changes="Fixed the bug" issue="69" type="FIX" /> <changelog changes="Added the feature" issue="42" type="NEW" /> <issues_bool>true</issues_bool> <issues_url>http://github.com/esteemed-innovation/flaxbeards-steam-power/issues</issues_url> <mod_name>Flaxbeard's Steam Power</mod_name> <new_vers>0.29.0</new_vers> <tweet_custom>Updated FSP to 0.29.0!!!!! GET IT AT CURSEFORGE!</tweet_custom> <twitter_bool>true</twitter_bool> <twitter_un>SatanNicholas</twitter_un> <wiki_settings> <section_size>2</section_size> <wiki_bool>true</wiki_bool> <wiki_page>Flaxbeard's Steam Power/Changelog</wiki_page> <wiki_un>TheSatanicSanta</wiki_un> </wiki_settings> </modupdater>