Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Apple OSX Documentation #86

Closed
wants to merge 6 commits into from
Closed

Apple OSX Documentation #86

wants to merge 6 commits into from

Conversation

boyter
Copy link
Collaborator

@boyter boyter commented Jun 18, 2014

Updated the OSX documentation fathead parser based on the original one in UNCLEAN.
This matches most of the fathead requirements (I believe) and now pulls down and processes
the documentation from developer.apple.com.

Be aware it takes a very long time to make a mirror of the site using wget. There is a sitemap
provided by Apple (its the start point of the wget command in fetch.sh) which might be able to
speed this up as each link appears to be the correct one.

This still isn't pep8 compliant due to some lines being too long, and isn't 100% Pythonic but
is close enough for the moment.

Finally the output.txt is not added (nor the wget output) as it is well over the 1 meg limit specified.

on the orginal searchcode.com one which was uploaded into
UNCLEAN. At this point have set the structure up as required
and have run parse.py though pep8 ignoring just the line too long
errors for the moment.

- WIP fetch.sh need to verify the wget settings to avoid overtaxing
  apple servers and potentially getting banned
- WIP parse.py need to modify to work with the new download and
  ensure that all the links are correct when parsing.
use the folder created by fetch, to resolve the URL's correctly
and to parse things out as expected. Strictly speaking this is
not "pythonic" but it does the job.
(seriously can Python 3 just work now please).
Modifying parse.py to ignore get redirects since we dont need
those files.
Adding output.txt to the ignore file.
Adding redirect to the parse.sh file.
@jagtalon
Copy link
Member

@boyter Apologies for the late reply. Checking it out now!

@jagtalon
Copy link
Member

@boyter Ah, does it get the current docs? We updated the Fathead for the current one--I should've made a branch in the Fathead repo instead. Here's an example https://duckduckgo.com/?q=AVAssetReaderVideoCompositionOutput and here's the code https://gist.github.com/jagtalon/78e73bc4f17651684355.
It works by getting the stuff from the SQLite DB in XCode, but the downside to this is that it only works if you're on a Mac.

Would you be interested in updating your code to get the 10.10 docs instead? https://developer.apple.com/osx/whats-new/

@boyter
Copy link
Collaborator Author

boyter commented Jul 10, 2014

Easy enough just need to flip the wget to the following,

https://developer.apple.com/library/prerelease/mac/sitemap.php

and it will pull down the pre-release stuff.

I didn't do this because it should change and when it goes live the URL's will change as the current ones are still 10.9. Not sure if apple has a history of trashing the prerelease documentation but there is the risk of getting nothing but 404's. Not sure... ill let you take the call, and if you want the pre release I can flip it over in a second or so.

Otherwise the code should remain the same assuming that Apple dosn't change the format in some drastic way between now and release date.

@jagtalon
Copy link
Member

@boyter Alright, well let's work on this current one then and then just update it again when Apple releases the actual docs. :)

@moollaza
Copy link
Member

Closing for now, would love to get this live though!

@moollaza moollaza closed this May 12, 2015
jagtalon pushed a commit that referenced this pull request Jul 28, 2016
@jagtalon jagtalon mentioned this pull request Jul 28, 2016
@jagtalon
Copy link
Member

@boyter you weren't kidding! I left it overnight and it's still going: https://v.usetapes.com/Ad71d8XFzv

bfmags pushed a commit to bfmags/zeroclickinfo-fathead that referenced this pull request Sep 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants