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

Fix #405: Apple Docs MacOS - Switched to new fathead template. #447

Merged
merged 1 commit into from Oct 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/fathead/apple_docs_macos/parse.py
Expand Up @@ -39,7 +39,7 @@

# Format the output as specified in https://duck.co/duckduckhack/fathead_overview
def generate_output(result):
abstract_format = "{name}\tA\t\t\t\t\t\t\t\t\t\t{abstract}\t{path}\n"
abstract_format = '{name}\tA\t\t\t\t\t\t\t\t\t\t<section class="prog__container">{abstract}</section>\t{path}\n'
redirect_format = "{alt_name}\tR\t{name}\t\t\t\t\t\t\t\t\t\t\n"

f = open('output.txt', 'a')
Expand Down Expand Up @@ -84,7 +84,7 @@ def create_fathead(database):
# This is the meta data that we're going to attach later.
pack = {
"name": name,
"abstract": abstract or "",
"abstract": '<p>' + abstract + '</p>' or "",
"path": url + path + "#" + anchor,
"original": abstract or "",
"platform": "Mac",
Expand All @@ -98,7 +98,7 @@ def create_fathead(database):
# Process the abstract
# Classes have irrelevant snippets so we're not adding that in
if tokentype != 2:
pack['abstract'] = pack['abstract'] + " " + pack['snippet']
pack['abstract'] = pack['abstract'] + pack['snippet']
pack['abstract'] = pack['abstract'].replace("\n", "\\n")

# Remove function parenthesis
Expand Down