Last active
December 12, 2015 06:09
-
-
Save mattmccray/4727331 to your computer and use it in GitHub Desktop.
Shell script to optimize MangaStudio 5 files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The MangaStudio 5 (ms5) file format is actually just sqlite3 database. | |
| # | |
| # When you save and re-save them, they tend to accumulate a bit of cruft. | |
| # This script will loop through the specified .lip files and run the 'vacuum;' | |
| # command on each one, removing the cruft! | |
| # | |
| # WARNING: Use at your own risk! I've not had any problems, but it has not | |
| # been tested exhaustively. | |
| # | |
| # Installation: | |
| # | |
| # Add the following function to your .bash_profile, or save it as a separate | |
| # file and 'source' it. | |
| # | |
| # Usage: | |
| # $ optimize_lip *.lip | |
| # | |
| function optimize_lip { | |
| echo "Optimizing MangaStudio 5 files..." | |
| for var in "$@" | |
| do | |
| echo " ${var}:" | |
| size=$(du -k "${var}" | sed 's/\([0-9]*\)\(.*\)/\1/') | |
| echo " before: ${size} kB" | |
| sqlite3 "$var" "vacuum;" | |
| size=$(du -k "${var}" | sed 's/\([0-9]*\)\(.*\)/\1/') | |
| echo " after: ${size} kB" | |
| done | |
| echo "Done." | |
| } |
Author
You, sir, are my hero. With the Manga studio EX 5 out, there's no way to save each lip from a story file in "optimized mode". So your script comes in handy. You just saved my life (and 2 gb in hd). I LOVE YOU.
Author
Glad to hear it. 2gb is quite a savings! :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Near as I can tell, this is the same thing that saving as "Manga Studio (Optimized)" does.