-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Possible crash when settings file cannot be loaded. New: Configure form redesigned Added multivalue fields: Penciller, Inker, Colorist, Letterer, Cover Artist, Editor and Locations. Function to export all the profiles to a single file. Added a way to run several profiles in sequence. Option to mark operations with specific empty data as failed. Can also move these to a different failed folder. Option when overwriting a book to copy the read percentage of the old book to the new one. Changes: Much code has been rewriten with many little tweaks and fixes. Any field can be put in the prefix or suffix of any other field Fixed incorrect wording in report. Yes/No fields can now have text inserted when the value is no OR yes Multiple value fields can now be entered exactly as in the comic info. Just delete the extra variables from the template, leaving the name: for example {<tags()(issue)>} becomes {<tags>} Warnings: No longer supports profiles from 1.6 and earlier. If any are imported, some options will be reset to default.
- Loading branch information
Showing
26 changed files
with
213 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,57 @@ | ||
import clr | ||
""" | ||
This file loads some sample comics from a file and shows the config form. | ||
Simply for testing purposes. | ||
""" | ||
|
||
|
||
import clr | ||
import System | ||
clr.AddReference('System.Windows.Forms') | ||
clr.AddReference('System.Drawing') | ||
import System | ||
from System.Windows.Forms import Application, MessageBox, DialogResult | ||
import loconfigForm | ||
import System.IO | ||
from System.IO import FileStream, FileMode, File, Directory, Path, StreamWriter, StreamReader | ||
clr.AddReference("System.Xml") | ||
clr.AddReferenceToFileAndPath("C:\\Program Files\\ComicRack\\ComicRack.Engine.dll") | ||
clr.AddReferenceToFileAndPath("C:\\Program Files\\ComicRack\\cYo.Common.dll") | ||
|
||
from System.Runtime.Serialization.Formatters.Binary import BinaryFormatter | ||
clr.AddReferenceToFile("ComicRack.Engine") | ||
clr.AddReferenceToFile("cYo.Common") | ||
import cYo.Common | ||
import cYo.Projects.ComicRack.Engine | ||
from cYo.Projects.ComicRack.Engine import * | ||
import libraryorganizer | ||
import cPickle | ||
|
||
from System.Xml import XmlDocument | ||
|
||
from System.IO import StreamReader, File, FileStream, FileMode | ||
|
||
from System.Windows.Forms import Application, DialogResult | ||
import configureform | ||
|
||
import losettings | ||
import loworkerform | ||
import loduplicate | ||
import System.Text | ||
from System.Text import StringBuilder | ||
clr.AddReference("System.Xml") | ||
import System.Xml | ||
from System.Xml import XmlWriter, Formatting, XmlTextWriter, XmlWriterSettings, XmlDocument | ||
clr.AddReference("System.Core") | ||
from System import Func | ||
import loconfigForm | ||
import loforms | ||
|
||
from loworkerform import ProfileSelector | ||
|
||
SETTINGSFILE = "losettingsx.dat" | ||
|
||
try: | ||
#sfrom libraryorganizer import OverwriteAction | ||
# i.ShowDialog() | ||
# """ print __file__[0:-len("Program.py")] | ||
Application.EnableVisualStyles() | ||
#s = libraryorganizer.LoadSettings() | ||
f = FileStream("Sample.dat", FileMode.Open) | ||
s = BinaryFormatter() | ||
books = s.Deserialize(f) | ||
#for book in bbooks: | ||
#print book.ShadowSeries | ||
#print book.Series | ||
#print book.Number | ||
f.Close() | ||
|
||
#a = loforms.SelectionFormArgs(["test", "test", "testt"], "Writer", "Green Lantern Vol. 2009 #12", False) | ||
#fff = loforms.SelectionForm(a) | ||
#fff.ShowDialog() | ||
|
||
|
||
settings, lastused = libraryorganizer.LoadSettings() | ||
#Get a random book to use as an example | ||
config = loconfigForm.ConfigForm(books, settings, lastused) | ||
result = config.ShowDialog() | ||
if result == DialogResult.OK: | ||
config.SaveSettings() | ||
lastused = config._cmbProfiles.SelectedItem | ||
#Now save the settings | ||
libraryorganizer.SaveSettings(settings, lastused) | ||
|
||
System.Console.ReadLine() | ||
print "Loading test data" | ||
f = FileStream("Sample.dat", FileMode.Open) | ||
bf = BinaryFormatter() | ||
books = bf.Deserialize(f) | ||
print "Done loading sample data" | ||
print "Starting to load profiles" | ||
profiles, last_used_profiles = losettings.load_profiles(SETTINGSFILE) | ||
print "Done loading profiles" | ||
Application.EnableVisualStyles() | ||
|
||
selector = ProfileSelector(profiles.keys(), last_used_profiles) | ||
|
||
selector.ShowDialog() | ||
|
||
print selector.get_profiles_to_use() | ||
|
||
form = configureform.ConfigureForm(profiles, last_used_profiles[0], books) | ||
r = form.ShowDialog() | ||
|
||
if r != DialogResult.Cancel: | ||
form.save_profile() | ||
last_used_profile = form._profile_selector.SelectedItem | ||
losettings.save_profiles(SETTINGSFILE, profiles, last_used_profile) | ||
except Exception, ex: | ||
print "An error occured" | ||
print Exception | ||
print ex | ||
print type(ex) | ||
System.Console.ReadLine() | ||
print ex | ||
System.Console.ReadKey() | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.