Complete rewrite of Chicago95 Plus in to a library and added support for multiple items
This commit is contained in:
parent
5501303028
commit
9baf0b140f
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 802 KiB |
Binary file not shown.
Before Width: | Height: | Size: 374 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
Before Width: | Height: | Size: 657 KiB |
Binary file not shown.
After Width: | Height: | Size: 418 KiB |
Binary file not shown.
Before Width: | Height: | Size: 761 KiB |
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from pluslib import ChicagoPlus
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
def main():
|
||||
|
||||
|
||||
desc = '''Chicago95 Plus! is a python script that can parse Windows 95/98/ME/XP theme files and create new Chicago95 themes. Chicago95 Plus! supports Icons, Cursors, Fonts, Wallpapers, Sounds and Theme colors! Use this against themes you can find on ThemeWorld or any site that have Windows Plus! Themes!\nThis script can be called from any folder, execute it and provide it the path to a theme file (e.g. %(prog)s /home/bgates/Wicked/Wicked.theme) and your new theme will be created!'''
|
||||
arg_parser = argparse.ArgumentParser(description=desc,
|
||||
usage='%(prog)s [options] MS_Theme_File',
|
||||
epilog="Part of the Chicago95 theme project",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
arg_parser.add_argument('-d', '--debug', help="Print lots of debugging statements", action="store_const", dest="loglevel", const=logging.DEBUG, default=logging.WARNING)
|
||||
arg_parser.add_argument('-v', '--verbose', help="Be verbose", action="store_const", dest="loglevel", const=logging.INFO)
|
||||
arg_parser.add_argument("--noinstall", help="Do not place folders nor change theme", action="store_true")
|
||||
arg_parser.add_argument("--info", help="Prints the json conversion of the theme file", action="store_true")
|
||||
arg_parser.add_argument('-c', '--colors', help='How many colors before skipping Inkscape fix/merge for SVGs. Set to 1 to speed up conversion. WARNING: This may result in transparent icons!', default=32, type=int)
|
||||
arg_parser.add_argument('-o', '--overlap', help='Pixel overlap for SVG icons', default=1, type=int)
|
||||
arg_parser.add_argument('-s', '--squaresize', help='Square size for SVG icons', default=20, type=int)
|
||||
arg_parser.add_argument('--cursorfolder', help="Chicago95 cursor folder to convert to new theme", default=str(Path.home())+"/.icons/Chicago95_Cursor_Black")
|
||||
arg_parser.add_argument('--themefolder', help="Chicago95 theme folder to convert to new theme", default=str(Path.home())+"/.themes/Chicago95")
|
||||
arg_parser.add_argument('--iconsfolder', help="Chicago95 icons folder to convert to new theme", default=str(Path.home())+"/.icons/Chicago95")
|
||||
arg_parser.add_argument("--installdir", help="Folder to create new theme in, default is current working directory", default=os.getcwd())
|
||||
arg_parser.add_argument("--logfile", help="Filename for debug logging", default="chicago95_plus.log")
|
||||
arg_parser.add_argument("theme_file", help="Microsoft Windows 95/98/ME .theme file")
|
||||
specific_args = arg_parser.add_argument_group("Specific Installs")
|
||||
specific_args.add_argument("--nocursors", help="Do not generate/install/enable the cursors", action="store_false")
|
||||
specific_args.add_argument("--noicons", help="Do not generate/install/enable the icons", action="store_false")
|
||||
specific_args.add_argument("--nowallpaper", help="Do not generate/install/enable the wallpaper", action="store_false")
|
||||
specific_args.add_argument("--nosounds", help="Do not generate/install/enable the sounds", action="store_false")
|
||||
specific_args.add_argument("--nocolors", help="Do not generate/install/enable the colors", action="store_false")
|
||||
specific_args.add_argument("--nofonts", help="Do not generate/install/enable the fonts", action="store_false")
|
||||
specific_args.add_argument("--noscreensaver", help="Do not generate/install the screensaver", action="store_false")
|
||||
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
plus = ChicagoPlus(themefile=args.theme_file,
|
||||
loglevel=args.loglevel,
|
||||
colors=args.colors,
|
||||
overlap=args.overlap,
|
||||
squaresize=args.squaresize,
|
||||
installdir=args.installdir,
|
||||
chicago95_cursor_path=args.cursorfolder,
|
||||
chicago95_theme_path=args.themefolder,
|
||||
chicago95_icons_path=args.iconsfolder,
|
||||
logfile=args.logfile)
|
||||
|
||||
print(plus.logo())
|
||||
|
||||
if args.info:
|
||||
plus.parse_theme()
|
||||
plus.print_theme_config()
|
||||
sys.exit(0)
|
||||
|
||||
if args.noinstall:
|
||||
plus.check_software(args.nocursors, args.noicons, args.colors)
|
||||
plus.parse_theme()
|
||||
plus.generate_theme(cursors=args.nocursors, icons=args.noicons, wallpaper=args.nowallpaper, sounds=args.nosounds, colors=args.nocolors, fonts=args.nofonts, screensaver=args.noscreensaver)
|
||||
else:
|
||||
plus.go(cursors=args.nocursors, icons=args.noicons, wallpaper=args.nowallpaper, sounds=args.nosounds, colors=args.nocolors, fonts=args.nofonts, screensaver=args.noscreensaver)
|
||||
|
||||
main()
|
|
@ -1,34 +1,27 @@
|
|||
# Chicago95 Plus!
|
||||
#### Windows Plus! Theme Conversion for XFCE/Chicago95
|
||||
|
||||
Is Chicago95 not authentic enough for you? Do you want to use Windows Plus! themes to personalize your Chicago95 experience? Well look no further!
|
||||
Is Chicago95 not authentic enough for you? Do you want to use Microsoft Plus! themes to personalize your Chicago95 experience? Well look no further!
|
||||
|
||||
Download any `.theme` file from the web, point `Chicago95_plus.py` at it and it will generate a wholy new theme for you to install.
|
||||
|
||||
Change Chicago95 from this:
|
||||
|
||||

|
||||
|
||||
to this!
|
||||
|
||||

|
||||
Download any Windows 95, 98, ME or XP theme file (from places like themeworld.com or archive.org) and use this tool to switch to your new theme!
|
||||
|
||||
Currently supports:
|
||||
|
||||
* Icons
|
||||
* Cursors
|
||||
* Icons (ICL, DLL and ICO files)
|
||||
* Cursors (CUR and ANI files)
|
||||
* Theme colors
|
||||
* Fonts
|
||||
* Sounds
|
||||
* Wallpapers (installed to `/home/$USER/Pictures`)
|
||||
|
||||
Sounds are copied to the output folder and named but arent installed yet.
|
||||
Sounds are installed assuming you have XFCE sounds enabled per the Chicago95 Install instructions.
|
||||
|
||||
By default Chicago95 Plus! creates the theme in your working folder and copies the files to their required location then automatically changes the current theme to the new theme, just like Windows!
|
||||
|
||||
If you want to get more out Chicago95 Plus! it supports multiple options:
|
||||
|
||||
* `--installdir DIRECTORY` generates the new theme files and outputs them to DIRECTORY
|
||||
* `--noinstall` generates the theme files but does not move them or run the commands to switch the theme
|
||||
* `--noinstall` generates the theme files but does not move them or run the commands to enable the theme
|
||||
* `--info` Gives verbose information about the theme file, does not do any conversion
|
||||
* `--verbose`/`--debug` gives more/way more information about what is happening
|
||||
* `--colors`/`--squaresize`/`--overlap` controls the way Icon files are converted to svg
|
||||
|
@ -36,16 +29,15 @@ If you want to get more out Chicago95 Plus! it supports multiple options:
|
|||
Detailed Help output:
|
||||
|
||||
```
|
||||
Microsoft Theme file parser
|
||||
usage: Chicago95_Plus.py [options] MS_Theme_File
|
||||
usage: ChicagoPlus.py [options] MS_Theme_File
|
||||
|
||||
Chicago95 Plus! is a python script that can parse Windows 95/98/ME/XP theme
|
||||
files and create new Chicago95 themes. Chicago95 Plus! supports Icons,
|
||||
Cursors, Fonts, Wallpapers and Theme colors! Use this against themes you can
|
||||
find on ThemeWorld or any site that have Windows Plus! Themes! This script can
|
||||
be called from any folder, execute it and provide it the path to a theme file
|
||||
(e.g. Chicago95_Plus.py /home/bgates/Wicked/Wicked.theme) and your new theme
|
||||
will be created!
|
||||
Cursors, Fonts, Wallpapers, Sounds and Theme colors! Use this against themes
|
||||
you can find on ThemeWorld or any site that have Windows Plus! Themes! This
|
||||
script can be called from any folder, execute it and provide it the path to a
|
||||
theme file (e.g. ChicagoPlus.py /home/bgates/Wicked/Wicked.theme) and your new
|
||||
theme will be created!
|
||||
|
||||
positional arguments:
|
||||
theme_file Microsoft Windows 95/98/ME .theme file
|
||||
|
@ -55,8 +47,8 @@ optional arguments:
|
|||
-d, --debug Print lots of debugging statements (default: 30)
|
||||
-v, --verbose Be verbose (default: None)
|
||||
--noinstall Do not place folders nor change theme (default: False)
|
||||
--info Does nothing except give information about the theme
|
||||
file (default: False)
|
||||
--info Prints the json conversion of the theme file (default:
|
||||
False)
|
||||
-c COLORS, --colors COLORS
|
||||
How many colors before skipping Inkscape fix/merge for
|
||||
SVGs. Set to 1 to speed up conversion. WARNING: This
|
||||
|
@ -65,19 +57,46 @@ optional arguments:
|
|||
Pixel overlap for SVG icons (default: 1)
|
||||
-s SQUARESIZE, --squaresize SQUARESIZE
|
||||
Square size for SVG icons (default: 20)
|
||||
--cursorfolder CURSORFOLDER
|
||||
Chicago95 cursor folder to convert to new theme
|
||||
(default: /home/phil/.icons/Chicago95_Cursor_Black)
|
||||
--themefolder THEMEFOLDER
|
||||
Chicago95 theme folder to convert to new theme
|
||||
(default: /home/phil/.themes/Chicago95)
|
||||
--iconsfolder ICONSFOLDER
|
||||
Chicago95 icons folder to convert to new theme
|
||||
(default: /home/phil/.icons/Chicago95)
|
||||
--installdir INSTALLDIR
|
||||
Folder to create new theme in, default is current
|
||||
working directory (default:
|
||||
/home/grassmunk/Themes/Chicago95/Plus)
|
||||
working directory (default: /home/phil/PlusGTK)
|
||||
--logfile LOGFILE Filename for debug logging (default:
|
||||
chicago95_plus.log)
|
||||
|
||||
Specific Installs:
|
||||
--nocursors Do not generate/install/enable the cursors (default:
|
||||
True)
|
||||
--noicons Do not generate/install/enable the icons (default:
|
||||
True)
|
||||
--nowallpaper Do not generate/install/enable the wallpaper (default:
|
||||
True)
|
||||
--nosounds Do not generate/install/enable the sounds (default:
|
||||
True)
|
||||
--nocolors Do not generate/install/enable the colors (default:
|
||||
True)
|
||||
--nofonts Do not generate/install/enable the fonts (default:
|
||||
True)
|
||||
--noscreensaver Do not generate/install the screensaver (default:
|
||||
True)
|
||||
|
||||
Part of the Chicago95 theme project
|
||||
|
||||
```
|
||||
|
||||
Here are two examples running Chicago95 Plus! to change the theme:
|
||||
|
||||
Changing themes:
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue