Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass on Configuration support. #41

Closed

Conversation

khakionion
Copy link

This will scrape the Config Manager interface to get the full-text
content (and user-defined name) of each configuration saved on
RadarWeb. These are then saved, and can be applied in a manner similar
to picking recently launched apps. (Of course, since RadarWeb allows
it, the user can also freely input configuration data like "iPad 3,1
64GB + iOS 6.1".)

This will scrape the Config Manager interface to get the full-text
content (and user-defined name) of each configuration saved on
RadarWeb. These are then saved, and can be applied in a manner similar
to picking recently launched apps. (Of course, since RadarWeb allows
it, the user can also freely input configuration data like "iPad 3,1
64GB + iOS 6.1".)
@amyworrall
Copy link
Owner

I'm having trouble testing it since I'm getting RadarWeb errors here (in Safari too, so it's not anything we're doing, although it strangely works in FireFox). I'll try again later :)

@khakionion
Copy link
Author

I was hitting a lot of RadarWeb errors too. Hope it clears up!

./Michael

Sent from my iPhone

Mar 1, 2013 8:10�$B!"�(Bamyworrall notifications@github.com �$B$N%a%C%;!<%8�(B:

I'm having trouble testing it since I'm getting RadarWeb errors here (in Safari too, so it's not anything we're doing, although it strangely works in FireFox). I'll try again later :)

�$B!=�(B
Reply to this email directly or view it on GitHub.

@amyworrall
Copy link
Owner

Hi! I've had an investigate and found a few problems, not necessarily with your code.

For one of the saved configurations on my work Radar account, I have set the configuration body to the output of System Profiler, which is a huge chunk of XML. When fetching the configuration page, QRWebScraper hangs on the following line:

NSXMLDocument *newXMLDoc = [[NSXMLDocument alloc] initWithData:data options:NSXMLDocumentTidyXML error:&error];

If you init an NSXMLDocument with that page, while telling it to tidy the XML, it attempts to tidy the pasted XML (as far as I can gather). This takes ages, and it sat there eating all my CPU for 15 minutes before I killed it.

Not tidying the XML is not an option: the Radar HTML is not very good, and will only parse if it's tidied first. (Tidying with NSXMLDocumentTidyHTML instead didn't make a difference). I guess the way round this would be to write a custom parser just for that page, rather than using NSXMLDocument.

I tested it on another Radar account that had a config field that just contained a small amount of text, and then it worked.

Other than that, I did have one crash, in -[QRConfigListViewController outlineView:shouldSelectItem:], where it seemed item was pointing to invalid memory. At the time, I was playing with the configurations popover, alternating between a named configuration via the popover and some text entered in the box.

I doubt I'm going to have time to write a new parser for the configuration page this weekend. If you fancy doing it, feel free (you can check out the development branch if you want to work on the current state of the codebase), or alternatively I'll try to get on to it soon.

@khakionion
Copy link
Author

Aha, interesting catch. I haven't used really big Configurations, so that completely missed me. Custom parser, eh? Well, I'll be a little busy in the next two weeks, but I'm happy to take a crack at it in April if you haven't gotten to it.

As for the crash, do you have a log? I'll try to reproduce it this weekend and update the pull request with a fix for that, at the very least.

@amyworrall
Copy link
Owner

Just a note to say that I'm sorry I still haven't got round to this one. I was half hoping they'd release the new-look RadarWeb UI, which would mean we didn't have to solve this one, but it doesn't seem to be forthcoming.

@khakionion
Copy link
Author

No problem, I'd be working on it too, but I'm suddenly in the middle of switching jobs/countries.

@amyworrall amyworrall closed this Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants