目前我有3个类别,应用程序,应用程序实例和供应商。
现在,应用程序有一个链接(通过属性Made By)到供应商。应用程序实例需要通过属性链接回供应商。我有可以用来返回应用程序名称的查询,供应商是
{{#ask:
[[Category:Program]][[{{{Program}}}]]
|?Made By
}}
然而
{{#set:Made By={{#ask:
[[Category:Program]][[{{{Program}}}]]
|?Made By
}}}}
无法将属性设置为ask查询返回的vendor的值。
还有其他方法吗?
答案 0 :(得分:1)
也许有点迟了但你可以用模板来设置属性。像这样的东西?
在Application Instance模板中(或在每个Application Instance页面上手动添加)添加以下ask查询:
{{#ask:[[Category:Program]][[{{{Program}}}]]
|?Made By
|link=none
|format=template
|template=Set made by
}}
然后使用以下内容创建模板“wiki / Template:Set made by”:
includeonly>
{{#set:
Made By={{{2}}}
}}
</includeonly>
注释
clean build folder
}是主题,它是页面名称,{ for coro in tqdm(asyncio.as_completed(tasks, loop=loop)):
try:
response = await coro
if response is None:
continue
data, store = response
result = json.loads(data['searchResults'])['results'][0]
summary = {
'name': result['name'],
'aisle': result['price']['aisle'][0],
'status': result['inventory']['status'],
}
results[store] = summary
except (IndexError, KeyError):
continue
with open('Testing.txt', 'w') as outfile:
json.dump(results, outfile, indent = 2)
outfile.write('\n')
}将是'Made By'的结果。