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

Apple Docs #278

Merged
merged 8 commits into from
Aug 5, 2016
Merged

Apple Docs #278

merged 8 commits into from
Aug 5, 2016

Conversation

jagtalon
Copy link
Member

@jagtalon jagtalon commented Jul 28, 2016

Introduction:

This is used to open an SQLite database that's installed on your computer to create a Fathead output
that's specified in http://docs.duckduckhack.com/resources/fathead-overview.html

See: https://forum.duckduckhack.com/t/improve-apple-os-x-macos-documentation/240

Page Structure:

There is no page structure here because we're essentially scraping a database. The only requirement is that you have XCode.

Pipeline:

Read DB -> Scrape / Process -> Output

How do I test this?

You'll need to have XCode installed on your computer. It comes bundled with the documentation that we need.

Screenshots:

screen shot 2016-07-28 at 2 29 43 pm

screen shot 2016-07-28 at 2 29 58 pm

IA Page: https://duck.co/ia/view/appledocs

@daxtheduck
Copy link

daxtheduck commented Jul 28, 2016

Apple Docs

Description: This Fathead goes through the Foundation Classes like NSString in developer.apple.com.

Example Query: ABSourceType

Tab Name: About

Source: developer.apple.com

These are the important fields from the IA page. Please check these for errors or missing information and update the IA page


This is an automated message which will be updated as changes are made to the IA page

@jagtalon jagtalon changed the title WIP: Apple Docs Apple Docs Jul 28, 2016
@jagtalon
Copy link
Member Author

@jdorweiler @zachthompson @MariagraziaAlastra This should be ready for review! Tested on duckpan:

screen shot 2016-07-28 at 2 29 43 pm

screen shot 2016-07-28 at 2 29 58 pm

@jdorweiler
Copy link
Contributor

I get this error when I try running it.

Traceback (most recent call last):
  File "parse.py", line 104, in <module>
    create_fathead(ios, 'iOS')
  File "parse.py", line 54, in create_fathead
    conn = sqlite3.connect(database)
sqlite3.OperationalError: unable to open database file

@jdorweiler
Copy link
Contributor

Can you add a README?

@jagtalon
Copy link
Member Author

jagtalon commented Aug 2, 2016

@jdorweiler you'd need the SQLite files on your system (which is distributed by XCode https://github.com/duckduckgo/zeroclickinfo-fathead/blob/ba829298c91c26502f276048a9567b27ff29cf72/lib/fathead/apple/parse.py#L32..L33)

@jagtalon
Copy link
Member Author

jagtalon commented Aug 2, 2016

@jdorweiler I meant this

to be the README but probably having an actual README.md is better thanks!

@jagtalon
Copy link
Member Author

jagtalon commented Aug 2, 2016

@jdorweiler added a readme!

@jdorweiler
Copy link
Contributor

Can you change the directory name to "ios" to match the metadata ID.

@jdorweiler
Copy link
Contributor

Installed on beta. Check it out and let me know what you think.
https://beta.duckduckgo.com/?q=ios+ABSourceType&atb=v23&ia=about&iax=1

@jagtalon
Copy link
Member Author

jagtalon commented Aug 2, 2016

@jdorweiler Renamed the directory and added a new IA Page!

@jdorweiler
Copy link
Contributor

Ok, installed on beta again. Use the trigger word appledocs so you can distinguish your data from the existing ios fathead. Just for testing. We can give it better trigger words when it's ready.
https://beta.duckduckgo.com/?q=appledocs+ABSourceType&atb=v23&ia=about

@jagtalon
Copy link
Member Author

jagtalon commented Aug 2, 2016

@jdorweiler thank you!

@jdorweiler
Copy link
Contributor

👍

@jdorweiler jdorweiler merged commit 6a7846c into master Aug 5, 2016
@jdorweiler jdorweiler deleted the jag/apple branch August 5, 2016 15:14
@jagtalon
Copy link
Member Author

jagtalon commented Aug 5, 2016

<3

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.

None yet

6 participants