Skip to content

Memsource Jobs

Robin Černín edited this page Jan 19, 2021 · 14 revisions

job create

$ memsource job create --filenames test_file.md test_file_a.md --target-langs ja --project-id XnrRe6wQlPb0j235Y3h016
+------------------------+--------+--------------------------+----------------+--------------+
| id                     | status | date_created             | filename       | target_langs |
+------------------------+--------+--------------------------+----------------+--------------+
| lqX0wn9yvKTN040lgq3O2j | NEW    | 2019-10-11T02:45:26+0000 | test_file.md   | ja           |
| 0PWUkCiMCYRWnWGSGXbX42 | NEW    | 2019-10-11T02:45:27+0000 | test_file_a.md | ja           |
+------------------------+--------+--------------------------+----------------+--------------+

job edit

$ memsource job edit --status EMAILED --providers USER=382403 --project-id HZ8v4GXvcOop4x0Lwej5c4 --job-id Tz9G900EUTzqxAbxWl1KBt
+-------------------------+---------------------------------------------------------------------------+
| Field                   | Value                                                                     |
+-------------------------+---------------------------------------------------------------------------+
| last_workflow_level     | 1                                                                         |
| target_lang             | ja                                                                        |
| uid                     | Tz9G900EUTzqxAbxWl1KBt                                                    |
| work_unit               | None                                                                      |
| workflow_step           | {"name": "Translation", "id": "225677", "order": 10, "workflow_level": 1} |
| filename                | ja.po                                                                     |
| date_due                | None                                                                      |
| words_count             | 8                                                                         |
| status                  | EMAILED                                                                   |
| workflow_level          | 1                                                                         |
| date_created            | 2019-12-05 12:33:40+00:00                                                 |
| end_index               | 1                                                                         |
| continuous_job_info     | None                                                                      |
| source_lang             | en_us                                                                     |
| continuous              | False                                                                     |
| imported                | True                                                                      |
| begin_index             | 0                                                                         |
| project                 | {"name": "Test", "uid": "HZ8v4GXvcOop4x0Lwej5c4"}                         |
| providers               | [{'id': '382403', 'type': 'USER'}]                                        |
| original_file_directory |                                                                           |
| is_parent_job_split     | False                                                                     |
+-------------------------+---------------------------------------------------------------------------+

jobs edit

$ memsource jobs edit --project-id Yh6jYmsPNLVW4JC9WlpCJ0 --status COMPLETED --jobs bbuEGzhDngaD3NqKIoG3r0 rr2Vykywuq8D6d10vHmFs2
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value                                                                                                                                                                                                   |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| jobs  | [{'uid': 'bbuEGzhDngaD3NqKIoG3r0', 'status': 'COMPLETED', 'providers': [], 'target_lang': 'ja', 'workflow_level': 1, 'workflow_step': None, 'filename': 'test.md', 'date_due': None, 'date_created':    |
|       | datetime.datetime(2020, 3, 27, 7, 10, 28, tzinfo=tzutc()), 'imported': True, 'job_assigned_email_template': None, 'notification_interval_in_minutes': -1, 'continuous': False}, {'uid':                 |
|       | 'rr2Vykywuq8D6d10vHmFs2', 'status': 'COMPLETED', 'providers': [], 'target_lang': 'ja', 'workflow_level': 1, 'workflow_step': None, 'filename': 'test.md', 'date_due': None, 'date_created':             |
|       | datetime.datetime(2020, 3, 27, 8, 26, 35, tzinfo=tzutc()), 'imported': True, 'job_assigned_email_template': None, 'notification_interval_in_minutes': -1, 'continuous': False}]                         |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
$ memsource job list --project-id Yh6jYmsPNLVW4JC9WlpCJ0
+------------------------+-----------+-----------+-------------+---------------+----------+----------+---------------------------+----------+------------+
| uid                    | status    | providers | target_lang | workflow_step | filename | date_due | date_created              | imported | continuous |
+------------------------+-----------+-----------+-------------+---------------+----------+----------+---------------------------+----------+------------+
| bbuEGzhDngaD3NqKIoG3r0 | COMPLETED | []        | ja          | None          | test.md  | null     | 2020-03-27 07:10:28+00:00 | True     | False      |
| rr2Vykywuq8D6d10vHmFs2 | COMPLETED | []        | ja          | None          | test.md  | null     | 2020-03-27 08:26:35+00:00 | True     | False      |
+------------------------+-----------+-----------+-------------+---------------+----------+----------+---------------------------+----------+------------+

job list

$ memsource job list --project-id XnrRe6wQlPb0j235Y3h016
+------------------------+--------+-----------+-------------+---------------+----------------+----------+---------------------------+----------+------------+
| uid                    | status | providers | target_lang | workflow_step | filename       | date_due | date_created              | imported | continuous |
+------------------------+--------+-----------+-------------+---------------+----------------+----------+---------------------------+----------+------------+
| lqX0wn9yvKTN040lgq3O2j | NEW    | []        | ja          | None          | test_file.md   | None     | 2019-10-11 02:45:26+00:00 | True     | False      |
| 0PWUkCiMCYRWnWGSGXbX42 | NEW    | []        | ja          | None          | test_file_a.md | None     | 2019-10-11 02:45:27+00:00 | True     | False      |
+------------------------+--------+-----------+-------------+---------------+----------------+----------+---------------------------+----------+------------+

job delete

$ memsource job delete --project-id XnrRe6wQlPb0j235Y3h016 7WDDlxHOFj9R495tNTC7h2 GjxhldVxYbFA2JN2MmOtr0
Accepted request to delete jobs: ['7WDDlxHOFj9R495tNTC7h2', 'GjxhldVxYbFA2JN2MmOtr0'] in project XnrRe6wQlPb0j235Y3h016

job show

$ memsource job show --project-id XnrRe6wQlPb0j235Y3h016 --job-id lqX0wn9yvKTN040lgq3O2j
+-------------------------+--------------------------------------------------------------+
| Field                   | Value                                                        |
+-------------------------+--------------------------------------------------------------+
| uid                     | lqX0wn9yvKTN040lgq3O2j                                       |
| status                  | NEW                                                          |
| providers               | []                                                           |
| source_lang             | en                                                           |
| target_lang             | ja                                                           |
| workflow_level          | 1                                                            |
| workflow_step           | None                                                         |
| filename                | test_file.md                                                 |
| date_due                | None                                                         |
| words_count             | 0                                                            |
| begin_index             | 0                                                            |
| end_index               | -1                                                           |
| is_parent_job_split     | False                                                        |
| date_created            | 2019-10-11 02:45:26+00:00                                    |
| project                 | {"name": "Testing project", "uid": "XnrRe6wQlPb0j235Y3h016"} |
| last_workflow_level     | 1                                                            |
| work_unit               | None                                                         |
| imported                | True                                                         |
| continuous              | False                                                        |
| continuous_job_info     | None                                                         |
| original_file_directory |                                                              |
+-------------------------+--------------------------------------------------------------+

job download (bilingual MXLF)

$ memsource job download --type bilingual --project-id XnrRe6wQlPb0j235Y3h016 --job-id 7WDDlxHOFj9R495tNTC7h2 
+--------+-------------------------------+
| Field  | Value                         |
+--------+-------------------------------+
| type   | bilingual                     |
| format | MXLF                          |
| path   | /tmp/test_file-en-ja-T.mxliff |
+--------+-------------------------------+

job download (bilingual XLIFF)

$ memsource job download --type bilingual --project-id XnrRe6wQlPb0j235Y3h016 --job-id 7WDDlxHOFj9R495tNTC7h2  --bilingual-format XLIFF
+--------+----------------------------+
| Field  | Value                      |
+--------+----------------------------+
| type   | bilingual                  |
| format | XLIFF                      |
| path   | /tmp/test_file-en-ja-T.xlf |
+--------+----------------------------+

job download (bilingual DOCX)

$ memsource job download --type bilingual --project-id XnrRe6wQlPb0j235Y3h016 --job-id 7WDDlxHOFj9R495tNTC7h2  --bilingual-format DOCX
+--------+-----------------------------+
| Field  | Value                       |
+--------+-----------------------------+
| type   | bilingual                   |
| format | DOCX                        |
| path   | /tmp/test_file-en-ja-T.docx |
+--------+-----------------------------+

job download (target)

$ memsource job download --type target --project-id XnrRe6wQlPb0j235Y3h016 --job-id 7WDDlxHOFj9R495tNTC7h2  --target-format ORIGINAL
+--------+---------------------------+
| Field  | Value                     |
+--------+---------------------------+
| type   | target                    |
| format | ORIGINAL                  |
| path   | /tmp/test_file-en-ja-C.md |
+--------+---------------------------+

job download (original)

$ memsource job download --type original --project-id XnrRe6wQlPb0j235Y3h016 --job-id 7WDDlxHOFj9R495tNTC7h2  
+-------+-------------------+
| Field | Value             |
+-------+-------------------+
| type  | original          |
| path  | /tmp/test_file.md |
+-------+-------------------+

job translations delete

$ memsource job translations delete --project-id 3Bozqg0bJ0DJN4UZ8yh91p WiZ2gQfZreo9ahEqNrWHm3
Accepted request to delete all translations in project 3Bozqg0bJ0DJN4UZ8yh91p for jobs ['WiZ2gQfZreo9ahEqNrWHm3']

job download (multiple job_uids)

$ memsource job download --type bilingual --bilingual-format XLIFF --output-dir output --project-id xjwi5RW1EEgKja5HGsZdD0 --job-id OJLcW4M0txPm321hDKU8F8 QQ5h07BI4flzrG6CgIRwb1
+--------+------------------------------------------------------------------------------------+
| Field  | Value                                                                              |
+--------+------------------------------------------------------------------------------------+
| type   | bilingual                                                                          |
| format | XLIFF                                                                              |
| path   | ['/var/home/rcernin/git/memsource-cli-client/output/joined-P255-J4-5-en-ja-T.xlf'] |
+--------+------------------------------------------------------------------------------------+
$ memsource job download --type original --output-dir output --project-id xjwi5RW1EEgKja5HGsZdD0 --job-id OJLcW4M0txPm321hDKU8F8 QQ5h07BI4flzrG6CgIRwb1
+-------+----------------------------------------------------------------------------------------------------------------------+
| Field | Value                                                                                                                |
+-------+----------------------------------------------------------------------------------------------------------------------+
| type  | original                                                                                                             |
| path  | ['/var/home/rcernin/git/memsource-cli-client/output/a.md', '/var/home/rcernin/git/memsource-cli-client/output/b.md'] |
+-------+----------------------------------------------------------------------------------------------------------------------+
$ memsource job download --output-dir output --project-id xjwi5RW1EEgKja5HGsZdD0 --job-id OJLcW4M0txPm321hDKU8F8 QQ5h07BI4flzrG6CgIRwb1
+--------+------------------------------------------------------------------------------------------------------------------------------------------+
| Field  | Value                                                                                                                                    |
+--------+------------------------------------------------------------------------------------------------------------------------------------------+
| type   | target                                                                                                                                   |
| format | ORIGINAL                                                                                                                                 |
| path  | ['/var/home/rcernin/git/memsource-cli-client/output/a/a-en-ja-C.md', '/var/home/rcernin/git/memsource-cli-client/output/a/b-en-ja-C.md'] |
+--------+------------------------------------------------------------------------------------------------------------------------------------------+

job download (all job_uids within project)

$ memsource job download --project-id xjwi5RW1EEgKja5HGsZdD0 --output-dir output --job-id $(memsource job list --project-id xjwi5RW1EEgKja5HGsZdD0 -f value -c uid | tr '\n' ' ')
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Field  | Value                                                                                                                                              |
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| type   | target                                                                                                                                             |
| format | ORIGINAL                                                                                                                                           |
| path   | ['/var/home/rcernin/git/memsource-cli-client/output_test/a/a-en-ja-C.md', '/var/home/rcernin/git/memsource-cli-client/output_test/a/b-en-ja-C.md'] |
+--------+----------------------------------------------------------------------------------------------------------------------------------------------------+

job source update

memsource job source update --jobs tU133ovtNmjE04LKnw3lad --project-id 9iFwa1rk54RL3WWSi9hVf5 --filename test.md
+------------------+---------------+----------------------+-----------------------+----------+--------+-------------+----------------+---------------+
| async_request_id | action        | date_created         | uid                   | filename | status | target_lang | workflow_level | workflow_step |
+------------------+---------------+----------------------+-----------------------+----------+--------+-------------+----------------+---------------+
| 446083875        | UPDATE_SOURCE | 2021-01-19T06:36:56+ | tU133ovtNmjE04LKnw3la | test.md  | NEW    | ja          |              1 | None          |
|                  |               | 0000                 | d                     |          |        |             |                |               |
+------------------+---------------+----------------------+-----------------------+----------+--------+-------------+----------------+---------------+