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

New SwiftDocs Instant Answer #2958

Closed
wants to merge 1 commit into from
Closed

Conversation

soleo
Copy link
Collaborator

@soleo soleo commented Aug 14, 2016

Description of changes

The purpose of this pull request is to use a Spice instead of Fathead to do swift related queries. The spice uses http://api.swiftdoc.org as the data source. If this IA turns out to be not good enough, we could consider using https://github.com/SwiftDocOrg/swiftdoc-parser to get a better result.

Which issues (if any) does this fix?

Fixes duckduckgo/zeroclickinfo-fathead#275
Fixes duckduckgo/zeroclickinfo-fathead#271

People to notify (@mention interested parties)

@jagtalon


IA Page: https://duck.co/ia/view/swift_docs_search
Forum Topic: https://forum.duckduckhack.com/t/create-swiftdoc-instant-answer/242
Maintainer: @jagtalon

@daxtheduck
Copy link

daxtheduck commented Aug 14, 2016

Swift Docs Search

Description: Swiftdocs uses http://api.swiftdoc.org to query for swift related answers

Example Query: [swift foreach](https://beta.duckduckgo.com/?q=swift foreach)

Tab Name:

Source: http://api.swiftdoc.org

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

@soleo
Copy link
Collaborator Author

soleo commented Aug 14, 2016

IA Page: http://duck.co/ia/view/swiftdocsspice

@soleo
Copy link
Collaborator Author

soleo commented Aug 14, 2016

Search keyword: swift flatmap
screen shot 2016-08-13 at 9 14 52 pm

More Details on swift flatmap
screen shot 2016-08-13 at 9 13 53 pm

@jagtalon
Copy link
Member

Thank you, @soleo! Checking it out. 🙌

@jagtalon jagtalon self-assigned this Aug 15, 2016
@soleo
Copy link
Collaborator Author

soleo commented Aug 15, 2016

Ideally I should have used text_item template, however in that template, the content is not recognizing the markdown syntax. Is there any way we could patch the {{ellipsis}} to be able to support markdown syntax and convert to html? @jagtalon

The issue is related with #2632 and I used the approach Spice Coderwall used.

@jagtalon
Copy link
Member

@soleo

  • Searching something like "swift foreach" gives a lot of results when I think all we need is SequenceType.forEach: https://v.usetapes.com/2O9DWIgolo
  • Searching for "swift Array" yields a lot of "unknown"s when it should just give the Array type:

screen shot 2016-08-15 at 3 47 33 pm

Is there any way we could patch the {{ellipsis}} to be able to support markdown syntax and convert to html

I'm not sure about this one yet--I'll look into it!

@soleo
Copy link
Collaborator Author

soleo commented Aug 15, 2016

@jagtalon looks like the API is much less mature than I originally thought. I saw some javascript snippets from their site. I might be able to use the same sorting method they used on https://swiftdoc.org to improve the result.

@jagtalon
Copy link
Member

@soleo thank you! Hit me up on slack if you need any help.

@moollaza
Copy link
Member

@soleo thanks for all the work here! I'm closing this PR as it has gone stale and we decided on a different approach for Apple Swift/Obj-C results

@moollaza moollaza closed this Mar 27, 2017
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.

Create SwiftDocs Instant Answer
6 participants