This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# run this script as: | |
# bash move_target_files_to_final_repo.sh -i /path/to/project -o /path/to/final/repo | |
# e.g. | |
# bash move_target_files_to_final_repo.sh -i /home/souto/Repos/ACER-PISA-2025-FT/pisa_2025ft_translation_it-IT_trend-prepare-files -o /home/souto/Repos/ACER-PISA-2025-FT/pisa_2025ft_translation_final | |
# flag -i/--input: $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ROOT="/home/souto/Sync/PISA25/Tech/QQ/QQ_overlap" | |
cd ${ROOT} | |
for f in $(find $ROOT -name "*.xml") | |
do | |
f_basename="$(basename -- $f .xml)" | |
output_fname=${f_basename}.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" encoding="UTF-8" indent="yes"/> | |
<!-- run as: | |
java -jar saxon-he-12.2.jar -s:path/to/file.xlf -xsl:xlf2tmx_gVhEaiQ.xsl -o:path/to/file.tmx | |
--> | |
<xsl:template match="xliff"> | |
<xsl:element name="tmx"> | |
<xsl:attribute name="version">1.4</xsl:attribute> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet | |
version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xpath-default-namespace="urn:oasis:names:tc:xliff:document:1.1" | |
xmlns:copyright="http://www.w3.org/1999/xhtml"> | |
<copyright:info> | |
<!-- authors make it --> | |
<copyright:author name="Manuel Souto Pico" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage : Put this script in <ScriptsDir>/project_changed folder. Create a folder if it doesn't exists. | |
* | |
* @authors Yu Tang, Manuel Souto Pico | |
* @version 0.5.6 (dynamic) -- match only XML files for PISA | |
* @date 2023.05.25 | |
*/ | |
import static org.omegat.core.events.IProjectEventListener.PROJECT_CHANGE_TYPE.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage : Put this script in <ScriptsDir>/project_changed folder. Create a folder if it doesn't exists. | |
* | |
* @authors Yu Tang, Manuel Souto Pico | |
* @version 0.5.5 (dynamic) -- match only ResX files for YSC | |
* @date 2023.04.19 | |
*/ | |
import static org.omegat.core.events.IProjectEventListener.PROJECT_CHANGE_TYPE.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# author: @msoutopico | |
# version: 1.0.0 | |
# date: 2021.11.19 | |
# instructions: | |
# 1. Put OMT packages and XLIFF files directly in the folder of your preferences | |
# 2. Get the path to that folder (i.e. path/to/folder) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
import pathlib | |
import json | |
parent_dir_abspath = pathlib.Path(__file__).parent.absolute() | |
file = os.path.join(parent_dir_abspath, "doc.md") | |
url = 'https://www.mysite.com/doc/upload_md.php' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, sys, json, os | |
import pprint | |
from os.path import dirname, abspath | |
# get parent directory of this script | |
parent_dir = dirname(abspath(__file__)) | |
# get api key | |
api_key_file = os.path.join(parent_dir, 'api_key.txt') | |
with open(api_key_file) as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Versions | |
# OmegaT 4.2.0 | |
# openjdk version "1.8.0_252" | |
# run as: | |
# bash path/to/xliff_omt2okp_trans2edit.sh -p package_name.omt | |
path_to_file=$2 | |
echo $path_to_file |