(input_file)
| 26 | return nodes |
| 27 | |
| 28 | def onlchunkfile2node(input_file): |
| 29 | content_json = json.load(open(input_file, 'r')) |
| 30 | nodes = [] |
| 31 | for data in content_json: |
| 32 | node = TextNode(text=data['title'] + data.get('hier_title', '') + data['content'], file_name=input_file) |
| 33 | nodes.append(node) |
| 34 | if len(nodes) > 1: |
| 35 | nodes[-1].relationships[NodeRelationship.PREVIOUS] = RelatedNodeInfo( |
| 36 | node_id=nodes[-2].node_id |
| 37 | ) |
| 38 | nodes[-2].relationships[NodeRelationship.NEXT] = RelatedNodeInfo( |
| 39 | node_id=nodes[-1].node_id |
| 40 | ) |
| 41 | return nodes |
| 42 | |
| 43 | |
| 44 | def transform_idp2markdown(response_json: dict) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected