67 lines
2.1 KiB
JSON
67 lines
2.1 KiB
JSON
{
|
|
"id": "6f81754e-285d-4ce0-b59e-af7edb02d108",
|
|
"snapshot": "libreoffice_writer",
|
|
"instruction": "A certain railway company in Hong Kong uses a signaling system to keep track of trains in its railway system. Each line in the docx file represents a train calling at a station from 0600 to 1200 on 2022-09-22, and has the following format: time_HH:MM:SS, train_id, station_id, platform_no.. I want to remove duplicated train ids in order to know how many different trains are running from 0600 to 1200. Could you help me on this? I am doing it manually and it is very inefficient.",
|
|
"source": "https://superuser.com/questions/789473/remove-duplicate-lines-in-libreoffice-openoffice-writer",
|
|
"config": [
|
|
{
|
|
"type": "download",
|
|
"parameters": {
|
|
"files": [
|
|
{
|
|
"url": "https://drive.google.com/uc?id=1cK1AMt_qKVAPp6EndSFG8y8r7KOPsqC1&export=download",
|
|
"path": "C:\\Users\\chenj\\HK_train_record.docx"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "open",
|
|
"parameters": {
|
|
"path": "C:\\Users\\chenj\\HK_train_record.docx"
|
|
}
|
|
}
|
|
],
|
|
"trajectory": "trajectories/",
|
|
"related_apps": [
|
|
"libreoffice_writer"
|
|
],
|
|
"evaluator": {
|
|
"postconfig": [
|
|
{
|
|
"type": "activate_window",
|
|
"parameters": {
|
|
"window_name": "HK_train_record.docx - LibreOffice Writer",
|
|
"strict": true
|
|
}
|
|
},
|
|
{
|
|
"type": "sleep",
|
|
"parameters": {
|
|
"seconds": 0.5
|
|
}
|
|
},
|
|
{
|
|
"type": "execute",
|
|
"parameters": {
|
|
"command": [
|
|
"python",
|
|
"-c",
|
|
"import pyautogui; import time; pyautogui.hotkey('ctrl', 's'); time.sleep(0.5); "
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"func": "compare_docx_lines",
|
|
"result": {
|
|
"type": "vm_file",
|
|
"path": "C:\\Users\\chenj\\HK_train_record.docx",
|
|
"dest": "HK_train_record.docx"
|
|
},
|
|
"expected": {
|
|
"type": "cloud_file",
|
|
"path": "https://drive.google.com/uc?id=1wZ5CKxCD3biB4mFFlrBInZO-bzo36vVG&export=download",
|
|
"dest": "HK_train_record_Gold.docx"
|
|
}
|
|
}
|
|
} |