Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 14th Jul 2017 at 5:13 AM Last edited by KTrain : 16th Jul 2017 at 3:22 AM. Reason: Update
Default XML File Index - Python Program for File Retrieval
Have you ever wanted to find one or ten file locations in the XML index at once?
Do you lack the many minutes required to do this?


If you answered yes or no to any of these questions, I have the answer you've been searching for:
KTrain's XML File Retrieval

NEW: v1.1 adds user-friendly interface

I wrote this using Python version 3.5, other versions may work but I have not tested any other version. Python 3.5 is guaranteed to work.
- Python v3.5 needs to be added to the path also in order for this to work.
- Link to download Python 3.5: https://www.python.org/downloads/release/python-353/

Instructions:
Unzip File
Either: copy XML Index File to the same directory as the program files OR place contents of zip file in the same directory as XML File Index
- double click run.bat
- type search phrase
- type column number (1-5)
- type setting number: 1, 2, or 3
- 1: Creates new index filtered by search term and column number
- 2: Copies files to specified path without creating new index
- 3: Copies files to specified path and creates new index in the directory of the program and in the specified path
- type neat columns setting (if applicable)
- type destination path (if applicable) ~~ The path must be in double quotes!! (sorry, working on this) & It can't end with a backslash. \ Both of these will break the python script.
and BOOM!: Convenient list of XML files matching your search phrase

Pull up to 100 lists with this program: It generates a random number in the file name so file names will never conflict. (Sorry, this could get confusing for you. Let me know if there is a better way to avoid file name conflicts without creating more index files)

Reply with problems, I will fix the program as needed.
- Just send me a screenshot of the error and I will do my best to fix it.
Also, I will be consistently improving the program as I use it more and naturally get annoying with the amount of file handling...

I'm sure someone has done this before but I haven't found one and I conveniently know python.
Cheers!
~KTrain

Changelog
v1.0 - base program ; creates filtered index
v1.1 - program is much more user friendly ; prompts for each parameter ; 2 more settings for program
v1.1.1 - fixed errors with neat columns ; added more exception handling

p.s. Also available here: https://www.dropbox.com/s/313jhvmew...v1-1-1.zip?dl=0
Attached files:
File Type: zip  KTrainsXMLRetriever_v1-1-1.zip (3.1 KB, 37 downloads) - View custom content
Description: Read Above Instructions First!
Advertisement
Lab Assistant
#2 Old 4th Aug 2017 at 10:04 PM
Is it working well with XML, packed into the binary DATA?
Test Subject
#3 Old 7th Aug 2017 at 6:16 PM
It looks pretty cool. Maybe here is not the place but you seem to be an expert with python and I have a question for you. Im actually doing some mods and my last step to finish it is to do something with python. Do you know some tutorial to learn a bit or something looking up to modding on Sims 4. Im not noob in programming but Python looks pretty weird to me even if I know php html or c++. Thanks in advance for your program :D
Lab Assistant
#4 Old 10th Aug 2017 at 10:49 PM
Who are you asking - me or KTrain? )
Test Subject
Original Poster
#5 Old 24th Aug 2017 at 6:18 PM
Quote: Originally posted by Dexsim
It looks pretty cool. Maybe here is not the place but you seem to be an expert with python and I have a question for you. Im actually doing some mods and my last step to finish it is to do something with python. Do you know some tutorial to learn a bit or something looking up to modding on Sims 4. Im not noob in programming but Python looks pretty weird to me even if I know php html or c++. Thanks in advance for your program :D

High praise, but I am nowhere near an expert thank you though

I have no experience with C++ but I started with php, html, css. Php is similar to python so that should help some...
I started python with code academy a few years ago and that tutorial is decent for noobs. I don't really know one way to get amazing at python... I was naturally curious and any tedious task I had with file handling or really anything, I just tried to make a python program for it. I also used python in academic research so that helped a lot. Stack Overflow is a god-send!! - I use it a lot to work around bugs I can't figure out. There are a few good resources out there for modding with python, but most are dead now... One of the best ways to learn it is to look up tutorials for certain things you want to learn, but instead of copying it, try to make your own "flavor" of it. Change the variables and the flow to something, not in the tutorial. I've found that works best for me when I am trying to learn something.
I don't know if this answers your question but I hope it helps!
If you need help with anything just let me know. I'd be happy to give it a look when I'm not busy!
Test Subject
Original Poster
#6 Old 24th Aug 2017 at 6:24 PM
Quote: Originally posted by ArtUrlWWW
Is it working well with XML, packed into the binary DATA?

not sure what you mean here... it works well, i think that the program could be improved though: too messy right now.
Back to top