Fix trailing whitespaces in files
This commit is contained in:
parent
1af089219f
commit
d8195f0fd8
46 changed files with 240 additions and 241 deletions
|
@ -7,5 +7,5 @@ To update the Airtime translations:
|
|||
- Commit the updated files.
|
||||
- Push to GitHub.
|
||||
- Transifex will then pick up the updated files in about 24 hours, and they'll be available for translation there.
|
||||
- After translators have updated strings, they'll be automatically downloaded and committed to our git repo by
|
||||
- After translators have updated strings, they'll be automatically downloaded and committed to our git repo by
|
||||
a script running here at Sourcefabric (contact Andrey).
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?PHP
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
|
||||
The purpose of this script is to take a file from cc_files table, and insert it into
|
||||
the schedule table. DB columns at the time of writing are
|
||||
|
||||
|
||||
starts | ends | file_id | clip_length | fade_in | fade_out | cue_in | cue_out | media_item_played | instance_id
|
||||
|
||||
|
||||
an example of data in this row is:
|
||||
"9" | "2012-02-29 17:10:00" | "2012-02-29 17:15:05.037166" | 1 | "00:05:05.037166" | "00:00:00" | "00:00:00" | "00:00:00" | "00:05:05.037166" | FALSE | 5
|
||||
|
||||
|
@ -19,25 +19,25 @@ function query($conn, $query){
|
|||
echo "Error executing query $query.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getFileFromCcFiles($conn){
|
||||
$query = "SELECT * from cc_files LIMIT 2";
|
||||
|
||||
|
||||
$result = query($conn, $query);
|
||||
|
||||
|
||||
$files = array();
|
||||
while ($row = pg_fetch_array($result)) {
|
||||
$files[] = $row;
|
||||
}
|
||||
|
||||
|
||||
if (count($files) == 0){
|
||||
echo "Library is empty. Could not choose random file.";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ function insertIntoCcShow($conn){
|
|||
while ($row = pg_fetch_array($result)) {
|
||||
$show_id = $row["currval"];
|
||||
}
|
||||
|
||||
|
||||
return $show_id;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ function insertIntoCcShowInstances($conn, $show_id, $starts, $ends, $files){
|
|||
* Column values:
|
||||
* starts | ends | show_id | record | rebroadcast | instance_id | file_id | time_filled | last_scheduled | modified_instance
|
||||
* */
|
||||
|
||||
|
||||
$nowDateTime = new DateTime("now", new DateTimeZone("UTC"));
|
||||
|
||||
$now = $nowDateTime->format("Y-m-d H:i:s");
|
||||
|
@ -79,7 +79,7 @@ function insertIntoCcShowInstances($conn, $show_id, $starts, $ends, $files){
|
|||
$values = "('$starts', '$ends', $show_id, 0, 0, NULL, NULL, TIMESTAMP '$ends' - TIMESTAMP '$starts', '$now', 'f')";
|
||||
$query = "INSERT INTO cc_show_instances $columns values $values ";
|
||||
echo $query.PHP_EOL;
|
||||
|
||||
|
||||
$result = query($conn, $query);
|
||||
|
||||
$query = "SELECT currval('cc_show_instances_id_seq');";
|
||||
|
@ -92,7 +92,7 @@ function insertIntoCcShowInstances($conn, $show_id, $starts, $ends, $files){
|
|||
while ($row = pg_fetch_array($result)) {
|
||||
$show_instance_id = $row["currval"];
|
||||
}
|
||||
|
||||
|
||||
return $show_instance_id;
|
||||
}
|
||||
|
||||
|
@ -102,9 +102,9 @@ function insertIntoCcShowInstances($conn, $show_id, $starts, $ends, $files){
|
|||
*/
|
||||
function insertIntoCcSchedule($conn, $files, $show_instance_id, $p_starts, $p_ends){
|
||||
$columns = "(starts, ends, file_id, clip_length, fade_in, fade_out, cue_in, cue_out, media_item_played, instance_id)";
|
||||
|
||||
|
||||
$starts = $p_starts;
|
||||
|
||||
|
||||
foreach($files as $file){
|
||||
|
||||
$endsDateTime = new DateTime($starts, new DateTimeZone("UTC"));
|
||||
|
@ -115,9 +115,9 @@ function insertIntoCcSchedule($conn, $files, $show_instance_id, $p_starts, $p_en
|
|||
$values = "('$starts', '$ends', $file[id], '$file[length]', '00:00:00', '00:00:00', '00:00:00', '$file[length]', 'f', $show_instance_id)";
|
||||
$query = "INSERT INTO cc_schedule $columns VALUES $values";
|
||||
echo $query.PHP_EOL;
|
||||
|
||||
|
||||
$starts = $ends;
|
||||
$result = query($conn, $query);
|
||||
$result = query($conn, $query);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ function getEndTime($startDateTime, $p_files){
|
|||
foreach ($p_files as $file){
|
||||
$startDateTime->add(getDateInterval($file['length']));
|
||||
}
|
||||
|
||||
|
||||
return $startDateTime;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ function rabbitMqNotify(){
|
|||
echo "Contacting $url".PHP_EOL;
|
||||
$ch = curl_init($url);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
$conn = pg_connect("host=localhost port=5432 dbname=airtime user=airtime password=airtime");
|
||||
|
@ -152,9 +152,9 @@ if (!$conn) {
|
|||
}
|
||||
|
||||
if (count($argv) > 1){
|
||||
if ($argv[1] == "--clean"){
|
||||
if ($argv[1] == "--clean"){
|
||||
$tables = array("cc_schedule", "cc_show_instances", "cc_show");
|
||||
|
||||
|
||||
foreach($tables as $table){
|
||||
$query = "DELETE FROM $table";
|
||||
echo $query.PHP_EOL;
|
||||
|
@ -162,9 +162,9 @@ if (count($argv) > 1){
|
|||
}
|
||||
rabbitMqNotify();
|
||||
exit(0);
|
||||
} else {
|
||||
} else {
|
||||
$str = <<<EOD
|
||||
This script schedules a file to play 30 seconds in the future. It
|
||||
This script schedules a file to play 30 seconds in the future. It
|
||||
modifies the database tables cc_schedule, cc_show_instances and cc_show.
|
||||
You can clean up these tables using the --clean option.
|
||||
EOD;
|
||||
|
@ -178,7 +178,7 @@ $startDateTime = new DateTime("now + 30sec", new DateTimeZone("UTC"));
|
|||
$starts = $startDateTime->format("Y-m-d H:i:s");
|
||||
//$ends = $endDateTime->format("Y-m-d H:i:s");
|
||||
|
||||
$files = getFileFromCcFiles($conn);
|
||||
$files = getFileFromCcFiles($conn);
|
||||
$show_id = insertIntoCcShow($conn);
|
||||
|
||||
$endDateTime = getEndTime(clone $startDateTime, $files);
|
||||
|
|
|
@ -30,7 +30,7 @@ class AirtimeMediaMonitorBootstrap:
|
|||
config = ConfigObj("/etc/airtime/airtime.conf")
|
||||
self.api_client = apc.api_client_factory(config)
|
||||
|
||||
"""
|
||||
"""
|
||||
try:
|
||||
logging.config.fileConfig("logging.cfg")
|
||||
except Exception, e:
|
||||
|
|
|
@ -90,7 +90,7 @@ fi
|
|||
rm -rf liquidsoap-full
|
||||
git clone https://github.com/savonet/liquidsoap-full
|
||||
cd liquidsoap-full
|
||||
git checkout master
|
||||
git checkout master
|
||||
make init
|
||||
make update
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ build_env () {
|
|||
echo "Please use -u to assign sudo username before build environments."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "build_env $1"
|
||||
#exec > >(tee ./liquidsoap_compile_logs/build_env_$1.log)
|
||||
os=`echo $1 | awk '/(debian)/'`
|
||||
|
@ -40,7 +40,7 @@ build_env () {
|
|||
useradd tmp
|
||||
echo "User tmp is created."
|
||||
fi
|
||||
|
||||
|
||||
apt-get update
|
||||
apt-get --force-yes -y install debootstrap dchroot
|
||||
echo [$1] > /etc/schroot/chroot.d/$1.conf
|
||||
|
@ -87,7 +87,7 @@ compile_liq () {
|
|||
else
|
||||
mv ./liquidsoap-compile_logs/compile_liq_$1.log ./liquidsoap-compile_logs/fail_to_compile_liq_$1.log
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
os_versions=("ubuntu_lucid_32" "ubuntu_lucid_64" "ubuntu_precise_32" "ubuntu_precise_64" "ubuntu_quantal_32" "ubuntu_quantal_64" "ubuntu_raring_32" "ubuntu_raring_64" "debian_squeeze_32" "debian_squeeze_64" "debian_wheezy_32" "debian_wheezy_64")
|
||||
|
||||
|
@ -147,7 +147,7 @@ do
|
|||
compile_liq ${os_versions[$i]} | tee ./liquidsoap-compile_logs/compile_liq_${os_versions[$i]}.log
|
||||
flag=0
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ $flag = 1 ];then
|
||||
echo "Unsupported Platform from:"
|
||||
for k in "${os_versions[@]}"
|
||||
|
|
|
@ -74,7 +74,7 @@ tar -czf $target_file \
|
|||
--exclude dev_tools \
|
||||
--exclude vendor/phing \
|
||||
--exclude vendor/simplepie/simplepie/tests \
|
||||
libretime-${suffix}
|
||||
libretime-${suffix}
|
||||
echo " Done"
|
||||
popd
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[merge "pofile"]
|
||||
name = Gettext merge driver
|
||||
driver = git merge-po %O %A %B
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# https://gist.github.com/mezis/1605647
|
||||
# https://gist.github.com/mezis/1605647
|
||||
# by Julien Letessier (mezis)
|
||||
#
|
||||
# Custom Git merge driver - merges PO files using msgcat(1)
|
||||
|
@ -8,15 +8,15 @@
|
|||
# - Install gettext
|
||||
#
|
||||
# - Place this script in your PATH
|
||||
#
|
||||
#
|
||||
# - Add this to your .git/config :
|
||||
#
|
||||
# [merge "pofile"]
|
||||
# name = Gettext merge driver
|
||||
# driver = git merge-po %O %A %B
|
||||
#
|
||||
#
|
||||
# - Add this to .gitattributes :
|
||||
#
|
||||
#
|
||||
# *.po merge=pofile
|
||||
# *.pot merge=pofile
|
||||
#
|
||||
|
|
|
@ -5,7 +5,7 @@ if [[ $EUID -ne 0 ]]; then
|
|||
fi
|
||||
|
||||
usage () {
|
||||
echo "Use --enable <user> or --disable flag. Enable is to set up environment"
|
||||
echo "Use --enable <user> or --disable flag. Enable is to set up environment"
|
||||
echo "for specified user. --disable is to reset it back to pypo user"
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ elif [ "$1" = "--disable" ]; then
|
|||
echo "Changing ownership to user $1"
|
||||
chmod 644 /etc/airtime/airtime.conf
|
||||
chown -Rv $user:$user /var/tmp/airtime/pypo/
|
||||
chmod -v a+r /etc/airtime/api_client.cfg
|
||||
chmod -v a+r /etc/airtime/api_client.cfg
|
||||
|
||||
|
||||
/etc/init.d/airtime-playout stop-liquidsoap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue