Mike_da_Spike Posted May 19, 2019 Share Posted May 19, 2019 (edited) Hi All I created a small program that wil generate XML files that will be shown as "Recently Updated" in the game list. It will check all XML files from the INI file and wil create a top list (as many as you want) This is handy if yo have a lot of tables, and added (or modified) some recently How does it works ? Simple copy the attached EXE and INI file and put it into a directory. Edit the INI file with your favorite editor (Notepad.exe for me ) [Global] LogPathLocal = "log" LogFileName = "GenerateUpdateTables.log" LogSize = 0 LogLevel = "LOGLVL_INFO [Paths] PinballX_Path = "c:\Pinball\PinballX" [PINBALLX] ShowTotalNewCount = 25 GenerateXMLSection1 = "VisualPinball" GenerateXMLSection2 = "System_1" GenerateXMLSection3 = "PinballFX3" [Options] CreateSeparateFile = True CleanupDebug = True CleanupOldFiles = True Setup the next sections one time : [Global] section : LogPathLocal - path for logfile. Can be only put a subdirectory or file pathname LogFileName - File name of the logfile LogSize - 0 will overwrite everytime the log file other value will be overwrite the logfile is fize is reached (kb) LogLevel - Type of logging : LOGLVL_INFO - Shows the least ammount of logging. Enough if all is working LOGLVL_VERBOSE - If you encounter errors, this mode will shows the most issues LOGLVL_VERY_VERBOSE - Nightmare logging mode ! Shows too much info, but handy if it is really not working [Paths] section : PinballX_Path - Set the correct to your PinballX root folder [PINBALLX] section : ShowTotalNewCount - Set a number. This will show the totally new or modified tables GenerateXMLSection - Start the GenerateXMLSection from 1 and up. add/remove the sections that has the names in the original Pinballx.INI in the CONFIG folder of PinballX for the emulators which you want t create the new tables for In the example, I want only for the 3 entries that are defined in PinballX.ini to be processed for this script. Modify this to your own needs, but make sure the numbering is starting from 1 to ... [Options] section : CreateSeparateFile - Set to True is you want to have Recently Added and Recently Modified in your list. Set to False creates 1 list of Recently Added (including recently modified) CleanupOldFiles - Set to True if you want to cleanup the next folders for unused files : "Backglass Images","Table Images","Table Images Desktop","Table Videos Desktop","Table Videos","Backglass Videos" Set to False to SKIP deletion (CleanupDebug will be ignored) CleanupDebug - True will only show files to delete, False will delete the files And just run the executable file every time you add or modify tables (I run it after i finished GameManager.exe) A log file will be generated to check anything (See global section), but also on the command line you see the results If you encounter any issues, please change the LogLevel = "LOGLVL_INFO" to LogLevel = "LOGLVL_VERBOSE" and post the logfile as attachment here The EXE file uses the icon of pinballX. Not sure if that is aloud. If not, I will remove the icon latest version : 1.3 GenerateUpdatedTables.exe GenerateUpdatedTables.ini (English is not my native language, so it could be that in the program/logs there are typos. I'm open to change that too ) Thanks to @scutters for testing this in Beta phase and reported issue (and extra feature) back and @simbamame for testing without finding issues Edited August 15, 2019 by Mike_da_Spike Uploaded version 1.3 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 @Mike_da_Spike This sounds great!, I guess i could just add it as startup program in pinballx rather than launch manually and it'll keep the list up to date automatically? How does it work out the what the new tables are? Anyway, i'll definitely give it a go later on... Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 10 minutes ago, scutters said: @Mike_da_Spike This sounds great!, I guess i could just add it as startup program in pinballx rather than launch manually and it'll keep the list up to date automatically? How does it work out the what the new tables are? Anyway, i'll definitely give it a go later on... This must run outside pinballx, because it generates xml files and those are readed by pbx at startup. For my cab the program takes arround 30 second to complete. I added it myself in a batchfile that I use for gamemanager to launch. So always when I use gamemanger. It will run this program after closing gamemanager. Basically how it works:, it checks the databe xml files. I put the metadat in the registry. When adding for the first time. The date is set to 1/1/1999. New tables will get the recent date. and put it If I find a table path in pinballx.ini than I check the files itself for datemodified. The newest of the 2 (dateadded or datemodified) will win. With this info, I take the newest x (showtotalnewcount) and create new xmls for it. Pbx will combine those xml's because it has the same name. Please let me know @scutters if it is working for you. I really don't know if the data/time conversion will work on other pc's Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 Thanks.. makes sense. I'll run it once later, do some of those pesky table updates and then run it again. Should be a good test. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 First do an initial run to capture all before you update/add/remove a table I must also work for programs like fx3 when they add new tabbles. We will see and of the month Thanks for checking ! Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 @Mike_da_Spike First issue i'm afraid, but the error makes perfect sense when you look at my database xml as I use unicode characters in the game description field. Put this error down to my non standard xml files, but if you can get a workaround so i can keep the characters that'd be great. Thanks 5/19/2019 10:54:47 AM ERROR Error reading XML file object [c:\PinballX\Databases\Visual Pinball X Pinsound\Visual Pinball X Pinsound.xml] reason [Invalid unicode character. Visual Pinball X Pinsound.xml GenerateUpdateTables.log Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 Hmmm.. was afraid of that. Not at home, but will check it. Thanks for the xml. I will test it tonight I was home earlier, so I could test a bit. Thanks for posting the XML file. I do use UNICODE myself, but good thing ! I tested it (found another bug too), and I uploaded version 0.6b. Can you test this one @scutters ? And thanks mate ! I really appreciate that someone is able to test Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 3 hours ago, Mike_da_Spike said: And thanks mate ! I really appreciate that someone is able to test Not a problem, especially for a feature i'm going to use! Ok so tried it again, but doesn't seem to be picking up file dates. I ran it once, then updated a table (big buck hunter) and ran it again but the updated table did not appear on recent tables. Had a dig round and found the registry entries, all dates are set to 199-01-01 so it seems like it isn't picking up date stamps on my system for some reason. My date format is dd/mm/yyyy if that helps. Here's a verbose log... let me know if you need any other files. GenerateUpdateTables.log Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 The 1/1/1999 is the initial run, and set the dateadd. The datemodified, i must get from the file itself. If on 2nd run a new file is found, it should put the current date in it. But ... i see that the program cannot find the tablepath from pinballx.ini and leave it blank (so initial date) Did you put the pinballx names in my ini file ? (So the names of the sections ?) [Visual pinball x sound] is set in the ini file, but think it is under [system_1] or something Post both ini's so I am sure Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 Here ya go.. GenerateUpdatedTables.ini PinballX.ini Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 @Mike_da_Spike Re-read your post... i'd added the databse xml names to the ini rather than system_2 & system_3 I've updated the ini file and it now works like a charm!, updated a table and re-ran it - the table is picked up and added on the recently added list. Excellent!, thanks a lot for this Will post back if i notice any issues. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 Just as I suspected Remove GenerateXMLSection2 from ini and change GenerateXMLSection1 to : GenerateXMLSection1 = "VisualPinball" I asume that both xml files are under the databse directory "Visual Pinball"? Maybe remove hkcu\pinballx\* Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 All working now thanks. For info, both my vpx databases are under other systems, the in built visual pinball system is not used. I'll add it to PinballX to run as an Exit Program (with wait for exit - true), the list may be slightly out of date at times, but it'll save me having to remember to run it manually. Very happy with this, thanks again! Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 Awesome ! We posted both on almost the same time. Glad is it working. I was a a bit afraid that the date/time would not work for different countries, but looks like thats working. I check in the ini file for path and exe file. If I find multiple xml's (except the xml I generate), I will process them all. If the documentation is not really clear, ease let me know how to update it, so it can be used by anyone. I'll hope you enjoy this program as much as I do. Maybe Tom will implement this is the near future in the official release, but in the meantime, I use this program Quote Link to comment Share on other sites More sharing options...
scutters Posted May 19, 2019 Share Posted May 19, 2019 I guess the test of dates might come in a couple of weeks, is 01/06/19 the 6th of Jan or the 1st of June?!, I'll keep a close on it things around then. Regarding the documentation, don't think there's a problem with it. Problem was just with me not reading it! 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted May 19, 2019 Author Share Posted May 19, 2019 You must be an IT professional. They never read the documentation! 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted June 1, 2019 Share Posted June 1, 2019 @Mike_da_Spike Hi mate, just to let you know the 1st of June passed without issue for my dd/mm/yyyy date format, the exe worked and added Phantom of the Opera to the recent tables list as expected. It's also been working great as an Exit Program (i only have ~150 tables enabled now, delay on exit is only a few secs for me), so no issues at all to report I do have one request though!... maybe as an ini file flag / option, could there be two lists created instead of one, splitting out to Recently Modified and Recently Added? So 'new' tables aren't on the modified list. Not a problem if not, just a nice to have for me! Thanks again!! Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted June 1, 2019 Author Share Posted June 1, 2019 Hmmm ... I thought i should get this question someday. I prefer to have all in the same list (but the text in pbx was too long for "Recently Added/Modified" It will make a lot of xml files and noticed that I cannot hide them in game manager. Do not have much time, but let me think about 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted June 1, 2019 Share Posted June 1, 2019 Sorry, forgot one minor thing - noticed manufacturer information isn't added to the Recently Added xml Just means i don't get the manufacturer logo in the wheel, so not a big problem. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted June 1, 2019 Author Share Posted June 1, 2019 (edited) 1 hour ago, scutters said: Sorry, forgot one minor thing - noticed manufacturer information isn't added to the Recently Added xml Just means i don't get the manufacturer logo in the wheel, so not a big problem. Good catch ! that was a bug. I completely forgot to write that part in the new XML Version 0.8b uploaded with the fix. And I started to separate the files (Recently Added.xml & Recently Modified.xml) . Still not 100%. I check on the file (if exist) when it is modified. A new file can have a higher modified date. So if a file exist a new file can be added to modified XML. But only if there is a file ! Need to think of a better way. I have some idea's, but need more time to think about it Uploaded 0.9b Note : An file that is being replaced by a new file is identified as a new file (because it is new). Need to find a way to identify this as a modified file Edited June 1, 2019 by Mike_da_Spike Uploaded new version 1 Quote Link to comment Share on other sites More sharing options...
simbamame Posted June 2, 2019 Share Posted June 2, 2019 Hiya, i will hopefully get some spare time in the next few days so ill give this a run on my cab and report back. thanks for sharing, this is a useful program i think i will be using as i can never remember which of my 750+ tables ive updated !! 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted June 3, 2019 Author Share Posted June 3, 2019 I had the same. Thats why I cteated this 5 hours ago, simbamame said: Hiya, i will hopefully get some spare time in the next few days so ill give this a run on my cab and report back. thanks for sharing, this is a useful program i think i will be using as i can never remember which of my 750+ tables ive updated !! I had the same (arround 1000 tables in total). Thats why I created this. I prefer the Createseperatefile=false option (or the blank default), but @scutterswanted 2 files. So pick the best what you prefer to use. But give it a try and let me know what you think Quote Link to comment Share on other sites More sharing options...
scutters Posted June 3, 2019 Share Posted June 3, 2019 You guys with your hundreds of tables - it's about quality not quantity! @Mike_da_Spike thanks for the latest version. Manufacturer info issue is resolved and i have recently modified and recently added tables xml created. Just need to wait for some new tables to tempt me into loading them to test. For the new table identification could you check registry and if no entry preexists from your app then it must be new, and all else are updates? - don't know, i might be way off with that, just ignore me if i am.. Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted June 3, 2019 Author Share Posted June 3, 2019 I already check the registry @scutters but in the registry I put the name of the game (game name from xml). Thats normally the filename (for fp, vpx and vp9) but if the filenam change because of the version number, I see this now as a new entry. But it should be a modified one. But hard to trigger (and does'nt want to loose speed by cycling the complete registry) how many tables do you have ? Only the few you like ? Quote Link to comment Share on other sites More sharing options...
scutters Posted June 3, 2019 Share Posted June 3, 2019 3 hours ago, Mike_da_Spike said: how many tables do you have ? About 150 enabled at the moment.... Must be about time for a cull to get it back down to < 100! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.