Instructions for using a script to copy XML settings to QPython
A brief description of how the script works:
This Python script is designed to automatically copy settings in an XML file. It does the following:
• Copies settings:
The script copies the values from the main lens settings to the settings of available lenses that have the same name.
• Saves the result:
The script creates a new XML file with the same name but with the 'new' prefix in the same qpython/scripts3 folder (or in the root folder of the program), which contains the changed settings.
In simple terms:
The script takes the settings values and automatically copies them to other settings whose names begin with the same name. This is convenient if you want to quickly update many similar settings.
Important notes:
• If as a result of running the script you see a decrease in the size of the output file compared to the original, then do not worry: the script includes optimization of the XML file structure.
• Errors: If the script can't find files or there are errors while processing XML, it will print an error message in the QPython console.
• Backup: Don't forget to save the original in case something goes wrong.
√ Bugs I've noticed:
• Enabling id4 and id5 lenses doesn't copy, you need to enable them manually.
• In LMC8.8 it doesn't copy custom hex. You need to edit the script. Laziness.
So, what you need to do:
1. Installing QPython:
•Open Google Play Store on your Android device.
• Find the "QPython OP" or "QPython3S" or "QPython 3L" app and install it.
•Or use the apk in the archive folder.
• After installation, open the QPython app.
2. Preparing files:
• XML file (config.xml):
• Prepare the XML file you want to process.
• Copy this file to the qpython/scripts3 folder or to the program root (if it is QPython 3L) on your device. Usually this folder is located in the main memory of the device.
• Python file (script) from the archive:
• Copy this file to the qpython/scripts3 folder.
3. Running the script in QPython:
1. Open QPython: Run the QPython application on your Android device.
2. Go to the "Program" or "Editor" section: Depending on the version of QPython, find the section for working with scripts.
3. Select your Python file:
• In QPython OP, find the "Program" menu, then select "Open" and select your Config_Copy_Help_###.py script in the qpython/scripts3 folder (there are two scripts in the archive: for LMC and for Xenius X9-8.2)
* In QPython3S, click on the folder icon, then on the scripts3 folder and select your Config_Copy_Help_###.py script (there are two scripts in the archive: for LMC and for Xenius X9-8.2).
* In general, all actions are identical in different programs.
4. Run the script: Click the "Run" or "Play" button (usually this is an icon in the form of a triangle).
5. As the script runs, answer the program's prompts, there will be only three of them.
6. View the results:
* After the script has successfully run, you will see the message "Settings have been successfully copied and saved." in the QPython console.
* In the same qpython/scripts3 folder (or in the program's root folder), a new file named "newbla-bla-bla.xml" will appear, containing the changed settings.
#Config #Copy_Help #LMC #X9