Script for updating apps [help needed]
-
I was collecting some of the regex and code I found here to make a script to update apps from Xenial to Focal.
I've put some of this in an unfinished sh:
https://gitlab.com/cibersheep/update-apps
MR are welcome to finish the process that are missingWarning: It is not complete, I'm sure there's a better way of doing things and it is a good moment to do the same for Noble. Here's where I need your help.
Xenial to FocalUpdate to Morph
- clickable.json to yaml
- this is pretty bad, is there a better way of doing this? I mean, with the default tool in the system, without an external tool
- it will leave a dirty yaml file that need to be edited by hand
- Framework update
- I think this is ok
- I'm sure I forgot something here
- Update to Morph
- Probably ok
- Update imports and Ubuntu qml items
- It turned out pretty well
- clickable.json to yaml
-
C CiberSheep pinned this topic
-
@CiberSheep said in Script for updating apps [help needed]:
it will leave a dirty yaml file that need to be edited by hand
I tried it on this project: https://github.com/august-alt/filemanager-app
and the result of your script could be loaded by the python yaml library, so what's wrong ? is the software used less lenient than the yaml python library, or is there more complicated clickable.json files ? -
@gpatel-fr said in Script for updating apps [help needed]:
or is there more complicated clickable.json files ?
Thanks for asking. Yep, when the json has nested elements it would fail?
For example applying the script to this json:} [...] "kill": "qmlscene", "dependencies_host" : [ "qml-module-ubuntu-onlineaccounts2" ] }will leave a yml file similar to
[...] "kill": "qmlscene" "dependencies_host": "qml-module-ubuntu-onlineaccounts2"and, I think, it should end with a list
"dependencies_host": - "qml-module-ubuntu-onlineaccounts2" -
@CiberSheep said in Script for updating apps [help needed]:
with the default tool in the system, without an external tool
what's the 'system' in fact ? python as installed in 24.04 has json (of course, it's part of the 'batteries') and yaml is packaged too. So if the system is a phone under noble it has everything needed for a conversion.
If the job is done in a context where for some reason the yaml package is not present, there is always json. Having imported the json file a basic exporting 'by hand' should not be too difficult if one can afford to ignore handling the myriad of special cases that are certainly in the big yaml libraries.
This assumes that UT clickable.json files are always valid json.
If it can be false (comments springs to mind) a python solution will fail badly.