Compare commits
269 Commits
00c4e87f69
...
master
Author | SHA1 | Date | |
---|---|---|---|
82df1c9412 | |||
688d87bb66 | |||
74a695d65c | |||
c267d62e62 | |||
386c58e40b | |||
4c7b6a2bd7 | |||
4940fee1cc | |||
c5ee1be726 | |||
7f7dfd1838 | |||
af4106b1f6 | |||
d9629d8817 | |||
e52e16df93 | |||
8d868cfeb5 | |||
4093afc78d | |||
d6023ef851 | |||
4259f74718 | |||
46a3a8722b | |||
3c6d970681 | |||
f11ed91101 | |||
b812d7f769 | |||
62fa973e4e | |||
be538f720d | |||
ea33b5cd95 | |||
80354312f6 | |||
e359be76a5 | |||
a9aa5070fc | |||
f40ce88f64 | |||
1285b8b659 | |||
ef31ea82be | |||
9f459ad8fe | |||
9a134d0118 | |||
88bebb510e | |||
43f47b8fbf | |||
a0a69b31b6 | |||
d0bb8252a6 | |||
2412b203ed | |||
0f0f2b2a47 | |||
fb153caa2b | |||
ea380d551c | |||
46b0987e86 | |||
fb6760ec63 | |||
28eb756ab0 | |||
046b5bcd42 | |||
119c56656c | |||
c8eca5736e | |||
6fb044e248 | |||
d88a51819a | |||
f96f299e97 | |||
48b5c5336a | |||
5d5d3be702 | |||
983fcc3d6b | |||
ebe9dd0e72 | |||
16b9e2cfbb | |||
b29617d025 | |||
96c8de2a0e | |||
929caae93f | |||
bb32617942 | |||
e0bddb9890 | |||
b319a77da2 | |||
f25e85fb52 | |||
f4638be665 | |||
414b7f4ab4 | |||
35a34a0803 | |||
a3602f3b28 | |||
26f4f29ea8 | |||
b392fd8cb3 | |||
af2731bc03 | |||
cde63519b6 | |||
8036adcfbe | |||
eb271bd389 | |||
7b7dc31eff | |||
fb947ffb57 | |||
1bc733b55a | |||
20a0e336b7 | |||
25c58cb3f5 | |||
5a508512a4 | |||
b25529d138 | |||
5a7735c239 | |||
bf06049b39 | |||
3d9d87a0cd | |||
b7001253d6 | |||
67d5be43b2 | |||
6cd9841d43 | |||
bb2fe2c071 | |||
c4e7f82288 | |||
75ef373a2f | |||
a67742218f | |||
abf19161d1 | |||
1b011dbf12 | |||
638b0ac112 | |||
f83080ff3a | |||
b7ede595e7 | |||
69cf57b887 | |||
ed9a329c52 | |||
f597da21dc | |||
3bc02d539d | |||
1d75372fa7 | |||
35fa1471c4 | |||
730deb5302 | |||
d85a99e873 | |||
f440b27dc9 | |||
1a10780e39 | |||
f0345169c5 | |||
6319e62015 | |||
19475e0885 | |||
ef36fff425 | |||
b9671b13c1 | |||
67a7dc73f6 | |||
e3e389945e | |||
467c01d373 | |||
3e07a97bc1 | |||
eaf54cbff3 | |||
a4c57b9843 | |||
9a02669c63 | |||
60ced590d3 | |||
2d72e43b10 | |||
b81bdf5fc0 | |||
00f8aee210 | |||
61c2ee798f | |||
6cdfcd5d57 | |||
8ee69bc47e | |||
754ea8f0fc | |||
8bac70b01d | |||
e35dc5d3e8 | |||
2fd314e116 | |||
82d2a8a0eb | |||
38b758f9fe | |||
797e2bf7c1 | |||
fb94cfbaa7 | |||
61c180842b | |||
09c3609e26 | |||
3eacf27648 | |||
9e5e330de3 | |||
18bdac085a | |||
754513f84f | |||
ece28454a6 | |||
fa3eded8a4 | |||
b25ac295f1 | |||
70719b2565 | |||
1142557c48 | |||
211034223d | |||
062af284c7 | |||
76f2bbe397 | |||
bdd99c4d51 | |||
8b580d6d68 | |||
b6f8a75423 | |||
f24db8987c | |||
c81bb51b4d | |||
57df1efb58 | |||
dc81a1fb89 | |||
f2f9be4a3b | |||
d945017846 | |||
9d3d9a8e81 | |||
355c7cc971 | |||
0ab51e8a64 | |||
3dc76791e7 | |||
c8dbc44dcc | |||
d8cb84f500 | |||
7ce9c5ce0a | |||
b573f7825a | |||
7f0701fd24 | |||
003e593c26 | |||
e2980e86df | |||
e658ccf77e | |||
45f28f2a6a | |||
d2eabf8e6b | |||
20acc6396c | |||
7e0871fd81 | |||
75cea0816b | |||
fffb1c9ebd | |||
4040616434 | |||
b9f916ab8f | |||
9df7494065 | |||
9573bdcf50 | |||
7e46e4567a | |||
7bc3cb83a3 | |||
dd816e4bb8 | |||
e69054aa41 | |||
e937406894 | |||
db666639cc | |||
146d64bbee | |||
4e4b41a29d | |||
f0b601d05f | |||
62f2b50e98 | |||
2a17a45848 | |||
59b579ffaa | |||
56b28966be | |||
73173839b6 | |||
0789cbdcd9 | |||
20a5907a4c | |||
562d9bae8d | |||
33253d1aaa | |||
5dcea1e2cc | |||
f15c31c1e0 | |||
afe9e12e1e | |||
b9f5673264 | |||
838d47be34 | |||
47b210d303 | |||
d203ab5057 | |||
94e6ce94f2 | |||
0e3511079e | |||
7cc7e5e27d | |||
15db722412 | |||
12499be20c | |||
cd01f7dda3 | |||
7bfd202a33 | |||
ab4faec5a3 | |||
4acada0cc6 | |||
8844715dcf | |||
ed61d93c94 | |||
02c473c473 | |||
8fa0625898 | |||
01a7611920 | |||
4b862a771e | |||
6327fba1dc | |||
cf5513d883 | |||
4cba029878 | |||
042c85e42e | |||
eada25f6f7 | |||
49e9b65609 | |||
c8c35d6d20 | |||
3e303de96f | |||
f3fa8becbe | |||
32ebed0d43 | |||
99b6a39722 | |||
02dec00a69 | |||
ac8cd59101 | |||
e0a4addb11 | |||
e77af37dcf | |||
aa41880a90 | |||
af2358621d | |||
5176b820b5 | |||
39f11412b8 | |||
2917affb34 | |||
a5fb88848b | |||
439c39361d | |||
44e5f1deef | |||
cf5093b830 | |||
b70fcff128 | |||
28ba6ac8d4 | |||
5d84b40b26 | |||
7a861c7e8b | |||
2e4258f015 | |||
ebc7b1202a | |||
fd7721aad1 | |||
f6a994544d | |||
0150391690 | |||
b50deea343 | |||
c542418747 | |||
ccd946c2c7 | |||
8f4bd088c2 | |||
bb627645a5 | |||
8cc5b39cd6 | |||
3116abd4bb | |||
8dbc5191a5 | |||
a3d941caac | |||
11582415bd | |||
7908c218fa | |||
e1693ee5d8 | |||
a21b66044c | |||
8fd6c4530a | |||
e46735ab4d | |||
972a730365 | |||
697b255efc | |||
6da3a06714 | |||
066800178a | |||
440cc9cb49 | |||
52c2ec03da | |||
aa1bf4f3e2 |
11
Conversion FLAC vers MP3/flac_to_mp3.sh
Normal file
@ -0,0 +1,11 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-26
|
||||
##
|
||||
## Pour une aide à l'installation, consulter le README
|
||||
##
|
||||
#!/bin/bash
|
||||
|
||||
while read FILE ; do
|
||||
[[ -e ${FILE%%.*}.mp3 ]] || ffmpeg -i "$FILE" -ab 320k -map_metadata 0 "${FILE%.*}.mp3"
|
||||
[[ $? -eq 0 ]] && rm $FILE
|
||||
done < <(find . -name "*.flac")
|
6
Conversion FLAC vers MP3/readme.md
Normal file
@ -0,0 +1,6 @@
|
||||
Conversion FLAC vers MP3
|
||||
========
|
||||
|
||||
Ce script permet la conversion de vos flacs en MP3 320kbps de manière automatique.
|
||||
|
||||
ATTENTION : Les fichiers flacs sont supprimées quand la conversion à réussie.
|
8
Plex Bot Music/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Plex Bot Music
|
||||
|
||||
**Plex Bot Music est un bot écrit en Python. Il vous permettra d'écouter votre musique sur Discord au travers d'un bot, tel que Rythme mais vous serez limité à votre Bibliothèque**
|
||||
|
||||
|
||||
## Lien vers le répértoire
|
||||
|
||||
https://gitea.zoz-serv.org/gigidsss/Plex-Bot-Music
|
@ -2,11 +2,11 @@
|
||||
|
||||
**Plex Discord Activity est un logiciel en Python. Il a été récuperé déjà depuis le dépot d'un utilisateur GitHub mais a été simplifié de sorte a ce que la pré-configuration soit la plus simple possible**
|
||||
|
||||
Il y a eu peu de modifications, mais elle vous simplifie grandement la vie
|
||||
Il y a eu peu de modifications par rapport à l'original, mais elles vous simplifient grandement la vie.
|
||||
|
||||
## Attention
|
||||
|
||||
Sachez que pour le script fonctionne, il faut qu'il tourne sur le même PC que votre application Discord. Malheureusement faire tourner ce script sur un serveur en tâche de fond ne donnera aucun résultat...
|
||||
Sachez que pour que le script fonctionne, il faut qu'il tourne sur le même PC que votre application Discord. Malheureusement faire tourner ce script sur un serveur en tâche de fond ne donnera aucun résultat...
|
||||
|
||||
## Installation
|
||||
|
||||
@ -69,8 +69,7 @@ python3 pma.py
|
||||
*Patientez +/- 20 secondes pour que le script démarre... Le script lancera tout seul la page web Plex*
|
||||
|
||||
## Source
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||
|
||||
https://github.com/Phineas05/discord-rich-presence-plex
|
||||
|
||||
|
||||
## License
|
||||
|
@ -19,6 +19,8 @@ Ce dépot nous sert a stocker les composes / aides / tutos / ... qui nous permet
|
||||
|
||||
Lisez le README "Aide pour le repo" ici : https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/README_GIT.md
|
||||
|
||||
Aussi dispo : [Tutoriel pour Git avec SourceTree](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/TUTO_Git_SourceTree.md)
|
||||
|
||||
## Comment nous rejoindre ?
|
||||
|
||||
Nous sommes sur Discord et Guilded, a ces adresses : https://discord.gg/ERpYMqS | https://guilded.gg/PlexFR
|
||||
Nous sommes sur Discord et Guilded, a ces adresses : https://discord.gg/3gtABCH | https://guilded.gg/PlexFR
|
@ -12,6 +12,7 @@ Clonez le dépot sur votre machine `git clone https://gitea.zoz-serv.org/Zoz/ple
|
||||
### Pour chaque modification, attention à bien suivre cette procédure si vous voulez éviter des conflits de versions
|
||||
|
||||
- Créez votre branche via la GUI Gitea (idéalement votre pseudo) ex : `Benj`
|
||||
(pour cela, demandez à Zoz de vous attribuer un rôle de contributeur)
|
||||
|
||||

|
||||
|
||||
|
@ -0,0 +1,885 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer deux MKV en gardant l'audio et le(s) sous-titre du premier ou un sous-titre ##
|
||||
## externe, et seulement la vidéo du second MKV ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
# ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ - MKV1 : file to keep with 2 audio, 1 internal SRT, DROP the video (720p) │
|
||||
# │ - MKV2 : file to keep with only the video 1080p ! │
|
||||
# │ - SRT1 : external SRT file with same name of the MKV2 file (SRT made by extracted PGS in the MKV2 file) │
|
||||
# │ - SRT2 : external SRT file with same name of the MKV2 file (SRT made by extracted PGS in the MKV2 file) │
|
||||
# └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
Clear-Host
|
||||
Invoke-Command -ScriptBlock {
|
||||
|
||||
# #############################################################################################
|
||||
# -> BEGIN VARIABLES DECLARATION -----------------------------------------------------------
|
||||
# #############################################################################################
|
||||
|
||||
# Set MKVMerge.exe and MediaInfo.exe (CLI version) Path
|
||||
$MKVMerge = "`"PATH_TO\mkvtoolnix\mkvmerge.exe`""
|
||||
$MediaInfo = "`"PATH_TO\MediaInfo_CLI\MediaInfo.exe`""
|
||||
# For the parameters to pass to MKVMerge executable, will be construct
|
||||
# Set this to $true in order to merge a MKV_2 present in $sourceDirectory_2
|
||||
$merge_another_video_MKV2 = $false # If set to $false, $sourceDirectory_2 will be ignored.
|
||||
|
||||
# Don't add a \ at the end of the path...
|
||||
$sourceDirectory_1 = "PATH_TO_SOURCE_1"
|
||||
$sourceDirectory_2 = "PATH_TO_SOURCE_1"
|
||||
|
||||
$destinationDirectory = "PATH_TO_DESTINATION"
|
||||
|
||||
# If you want a .json file created, set this $JSON_Export to $true, set the $sourceDirectory_1_json variable to set the path for the .json file.
|
||||
# If you don"t want a .json file, set set this $JSON_Export to $false, and let the others as they are.
|
||||
$JSON_Export = $false
|
||||
$sourceDirectory_1_json = "PATH_TO_JSON_FILE"
|
||||
|
||||
|
||||
|
||||
# Remove dots before the season or the resolution ?
|
||||
$remove_dots = $false
|
||||
# If there is the year in the title, set it to $true
|
||||
$set_year_with_brackets = $false
|
||||
|
||||
# Renaming the output file (and the video title)
|
||||
# Use https://regex101.com/r/cU5lC2/1 to get the RegEx
|
||||
$chain_to_search = ''
|
||||
$chain__to_replace = ''
|
||||
|
||||
# $chain_to_search = '(.*) - S(\d{2})E(\d{3})(.*)H264(.*)'
|
||||
# $chain_to_search = '(.*) - S(\d{2})E(\d{3})(.*)'
|
||||
# $chain__to_replace = '$1 - S$2E$3$4x265-10bits$5--Custom'
|
||||
|
||||
# Move MKV1 (and SRT) to Not-Merged folder ? Set to $false or $true
|
||||
$move_mkv1_after_merge = $true
|
||||
$move_mkv2_after_merge = $true
|
||||
|
||||
# Extension without the .
|
||||
$VideoExtension_1 = "mkv"
|
||||
$VideoExtension_2 = "mkv"
|
||||
|
||||
$no_attachements = $true
|
||||
|
||||
# ################ VIDEO to keep ##################
|
||||
# = 0 : for video from MKV1 (first file)
|
||||
# = 1 : for video from MKV2 (second file)
|
||||
$Video_Lang = "ja" # en for english / fr for french / ja for japanese
|
||||
# ================== AUDIO ================== Common for all videos, MAX 2 audio
|
||||
# _1 will be the first in track-name order, then _2
|
||||
|
||||
# How many audio tracks to keep = 0, 1 or 2
|
||||
$NB_Audio_MKV1 = 1
|
||||
# This is to search for the right ID in the MKV (with JSON)
|
||||
$AudioTrack_1_Lang = "ja" # Set here the first audio lang to keep
|
||||
$AudioTrack_2_Lang = "fr" # Set here the second audio lang to keep
|
||||
# $AudioTrack_Default_Lang = "ja" # Set here the default audio lang to set in merge
|
||||
|
||||
# This is for personalizing the tracks info !
|
||||
# Track 1 = Audio n°1
|
||||
$AudioTrackName_1_sansID = "Japonais - AAC 2.0"
|
||||
$AudioLang_1_sansID = "ja" # en for english / fr for french / ja for japanese
|
||||
$AudioTrack_1_default_sansID = "yes"
|
||||
# Define track order. Do not modify it unless you changed the track number in this section
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name and language of Audio Track n°2
|
||||
$AudioTrackName_2_sansID = "Français - Dolby Digital 2.0"
|
||||
$AudioLang_2_sansID = "fr" # en for english / fr for french / ja for japanese
|
||||
$AudioTrack_2_default_sansID = "no"
|
||||
# Define track order. Do not modify it unless you changed the track number in this section
|
||||
# ================================================================
|
||||
|
||||
|
||||
|
||||
# ===========================================
|
||||
# ================== Internal SUB ? =========
|
||||
# To keep or not internal subtitles
|
||||
# $keep_internal_Sub = $true
|
||||
$Internal_SUB_Number = 0 # Set this to 1 or 2 to keep 1 or 2 or 3 internal subtitles, or to 0 to keep no internal sub.
|
||||
$Internal_SUB_Lang_1 = "fr" # Set here the first internal subtitle lang to keep
|
||||
$Internal_SUB_Lang_2 = "fr" # Set here the second internal subtitle lang to keep
|
||||
$Internal_SUB_Lang_3 = "fr" # Set here the third internal subtitle lang to keep
|
||||
|
||||
# If there is 2 sub in the same language, like "FR Full" and "FR Forced", set those variables :
|
||||
$Internal_SUB_to_search_with_title = $false # Set this to $true if there is at least 2 internal sub in the same lang
|
||||
$Internal_SUB_1_title_to_search = "SDH" # Set this to a string to search in sub title to set it into the first internal sub
|
||||
$Internal_SUB_2_title_to_search = "" # Set this to a string to search in subtitle TITLE to set it into the second internal sub
|
||||
$Internal_SUB_2_title_to_search = "" # Set this to a string to search in subtitle TITLE to set it into the third internal sub
|
||||
$Internal_SUB_to_be_forced = "" # Set this to 1 or 2 in order to set it to forced subtitle
|
||||
|
||||
# Max 3 Internal SRT is configured in the script.
|
||||
# If set to 3, must be 2 SRT configured
|
||||
$SubTrackName_1_sansID = "English SDH - SRT"
|
||||
$SubTrackLang_1_sansID = "en" # en for english / fr for french / jp for japanese
|
||||
$SubTrack_1_default_sansID = "yes"
|
||||
$SubTrack_1_forced_track_sansID = "no"
|
||||
$SubTrack_1_SDH_sansID = "yes"
|
||||
$sub_charset_1_sansID = "UTF-8"
|
||||
|
||||
|
||||
$SubTrackName_2_sansID = "Français - SRT"
|
||||
$SubTrackLang_2_sansID = "fr" # en for english / fr for french / jp for japanese
|
||||
$SubTrack_2_default_sansID = "no"
|
||||
$SubTrack_2_forced_track_sansID = "no"
|
||||
$SubTrack_2_SDH_sansID = "no"
|
||||
$sub_charset_2_sansID = "UTF-8"
|
||||
|
||||
$SubTrackName_3_sansID = "Français - SRT"
|
||||
$SubTrackLang_3_sansID = "fr" # en for english / fr for french / jp for japanese
|
||||
$SubTrack_3_default_sansID = "no"
|
||||
$SubTrack_3_forced_track_sansID = "no"
|
||||
$SubTrack_3_SDH_sansID = "no"
|
||||
$sub_charset_3_sansID = "UTF-8"
|
||||
# ===========================================
|
||||
|
||||
# ===========================================
|
||||
# ================== External SUB ? =========
|
||||
# Must have the same name as MKV1
|
||||
|
||||
$External_SUB = $true
|
||||
$External_SUB_Number = 1 # Works only if $External_SUB = $true
|
||||
# Max 2 External SRT is configured in the script.
|
||||
# If set to 2, must be 2 SRT configured
|
||||
|
||||
# Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension_1 = 'Full.fre.srt'
|
||||
$SubExtension_2 = 'Forced.fre.srt'
|
||||
|
||||
#### FILE 2 - SRT_1 - Keeping all but the video (audio + chapters tags)
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_1 = "0:Français (Complet) - SRT"
|
||||
$ExtSubTrackLang_1 = "0:fr"
|
||||
$ExtSubTrack_1_default = "0:yes"
|
||||
$ExtSub_charset_1 = "0:UTF-8"
|
||||
$ExtSub_forced_track_1 = "0:no"
|
||||
$ExtSub_SDH_1 = "0:no"
|
||||
|
||||
#### FILE 3 - SRT_2 - Keeping all but the video (audio + chapters tags)
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_2 = "0:Français (Forcé) - SRT"
|
||||
$ExtSubTrackLang_2 = "0:fr"
|
||||
$ExtSubTrack_2_default = "0:no"
|
||||
$ExtSub_charset_2 = "0:UTF-8"
|
||||
$ExtSub_forced_track_2 = "0:yes"
|
||||
$ExtSub_SDH_2 = "0:no"
|
||||
|
||||
#----------------------------------------------------------------------------------------------
|
||||
# DO NOT TOUCH WHAT'S UNDER THIS -----------------------------------------------------------
|
||||
#----------------------------------------------------------------------------------------------
|
||||
|
||||
# #############################################################################################
|
||||
# -> BEGIN FUNCTION DEFINITIONS -----------------------------------------------------------
|
||||
# #############################################################################################
|
||||
|
||||
function Get-Track_ID {
|
||||
param (
|
||||
[Parameter(Mandatory)]$MediaInfo,
|
||||
[Parameter(Mandatory)]$MKV_1,
|
||||
[Parameter(Mandatory)][ValidateSet(1, 2)]$NB_Audio_MKV1,
|
||||
[Parameter(Mandatory)]$AudioTrack_1_Lang,
|
||||
[Parameter(Mandatory)]$AudioTrack_2_Lang,
|
||||
[Parameter(Mandatory)][ValidateSet(0, 1, 2, 3)]$Internal_SUB_Number,
|
||||
[Parameter(Mandatory)]$Internal_SUB_Lang_1,
|
||||
[Parameter(Mandatory)]$Internal_SUB_Lang_2,
|
||||
[Parameter(Mandatory)]$Internal_SUB_Lang_3,
|
||||
[Parameter(Mandatory)][ValidateSet($true, $false)]$Internal_SUB_to_search_with_title,
|
||||
[Parameter(Mandatory)]$Internal_SUB_1_title_to_search = "",
|
||||
[Parameter(Mandatory)]$Internal_SUB_2_title_to_search = "",
|
||||
[Parameter(Mandatory)]$Internal_SUB_3_title_to_search = "",
|
||||
[Parameter(Mandatory = $false)][ValidateSet($true, $false)]$JSON_Export = $false,
|
||||
[Parameter(Mandatory = $false)]$JSON_file = ""
|
||||
)
|
||||
|
||||
# Values witch will be found with MediaInfo JSON
|
||||
$VideoTrack_ID = ""
|
||||
$AudioTrack_1_ID = ""
|
||||
$AudioTrack_2_ID = ""
|
||||
$Internal_Sub_1_ID = ""
|
||||
$Internal_Sub_2_ID = ""
|
||||
$Internal_Sub_3_ID = ""
|
||||
|
||||
$JSON_video_position = "" # To use with $JSON_object.media.Track[ ]
|
||||
$JSON_audio_1_position = "" # To use with $JSON_object.media.Track[ ]
|
||||
$JSON_audio_2_position = "" # To use with $JSON_object.media.Track[ ]
|
||||
$JSON_sub_1_position = ""
|
||||
$JSON_sub_2_position = ""
|
||||
$JSON_sub_3_position = ""
|
||||
|
||||
if (( $JSON_Export -eq $true) -And ( $JSON_file -ne "")) {
|
||||
$MediaInfo_arguments = "--output=JSON --LogFile=`"$JSON_file`""
|
||||
}
|
||||
else {
|
||||
if ( $JSON_Export -eq $false ) {
|
||||
Write-Host "`tNo JSON file will be created..." -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
}
|
||||
elseif ( $JSON_file -eq "") {
|
||||
Write-Host "`tNo JSON file is pass in Get-Track_ID function parameters !!`n`tThere will not be any JSON file created..." -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
}
|
||||
$MediaInfo_arguments = "--output=JSON"
|
||||
}
|
||||
$command_info = "& $MediaInfo $MediaInfo_arguments `"$MKV_1`""
|
||||
# Launch command begin... and we're grabbing the output into json_output
|
||||
$json_output = Invoke-Expression $command_info
|
||||
# Write-Host "`$json_output = `n$json_output" -ForegroundColor "green"
|
||||
# $JSON_object = Get-Content -Raw -Path "$JSON_file" | ConvertFrom-Json
|
||||
$JSON_object = $json_output | ConvertFrom-Json
|
||||
|
||||
|
||||
$i = 0 # Counter for video track detected
|
||||
$j = 0 # Counter for audio track detected
|
||||
$k = 0 # Counter for audio tracks kept
|
||||
$l = 0 # Counter for track position
|
||||
$m = 0 # Counter for sub track detected
|
||||
$n = 0 # Counter for sub tracks kept
|
||||
$JSON_VideoCount = $JSON_object.media.Track[0].VideoCount
|
||||
$JSON_AudioCount = $JSON_object.media.Track[0].AudioCount
|
||||
$JSON_SubCount = $JSON_object.media.Track[0].TextCount
|
||||
|
||||
foreach ( $track in $JSON_object.media.Track ) {
|
||||
# Note :
|
||||
# The reel track ID is 1 minus the ID get in JSON...
|
||||
|
||||
# Check if there is a bug in the script
|
||||
if ( $j -gt $JSON_AudioCount ) {
|
||||
Write-Host "`tThere is a problem in Audio Track detection from JSON !! Need to debug this !!" -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
Exit
|
||||
}
|
||||
elseif ( $i -gt $JSON_VideoCount ) {
|
||||
Write-Host "`tThere is a problem in Video Track detection from JSON !! Need to debug this !!" -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
Exit
|
||||
}
|
||||
elseif ( ( $m -gt $JSON_SubCount ) -And ( $JSON_SubCount -ne $null ) ) {
|
||||
Write-Host "`tThere is a problem in Subtitles Track detection from JSON !! Need to debug this !!" -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
Exit
|
||||
}
|
||||
|
||||
if ( $track."@type" -match "Video" ) {
|
||||
$VideoTrack_ID = $track.id - 1
|
||||
$i++
|
||||
$JSON_video_position = $l
|
||||
}
|
||||
elseif ( $track."@type" -match "Audio" ) {
|
||||
$j++
|
||||
|
||||
if (( $track."Language" -match "$AudioTrack_1_Lang" ) -And ( $AudioTrack_1_ID -eq "" ) -And ( $k -ne $NB_Audio_MKV1)) {
|
||||
$AudioTrack_1_ID = $track.id - 1
|
||||
$k++
|
||||
$JSON_audio_1_position = $l
|
||||
}
|
||||
elseif (( $track."Language" -match "$AudioTrack_2_Lang" ) -And ( $AudioTrack_2_ID -eq "" ) -And ( $k -ne $NB_Audio_MKV1)) {
|
||||
$AudioTrack_2_ID = $track.id - 1
|
||||
$k++
|
||||
$JSON_audio_2_position = $l
|
||||
}
|
||||
else {
|
||||
if (( $AudioTrack_1_ID -eq "" ) -And ( $AudioTrack_2_ID -eq "" )) {
|
||||
Write-Host "`tThere is no audio tracks that match your specifications." -ForegroundColor "Yellow"
|
||||
}
|
||||
else {
|
||||
Write-Host "`tThere is no audio tracks that match your specifications." -ForegroundColor "Yellow"
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ( $track."@type" -match "Text" ) {
|
||||
$m++
|
||||
if ($Internal_SUB_Number -ne 0 ) {
|
||||
if ( ( $Internal_SUB_Lang_1 -ne "" ) -And ( $track."Language" -match "$Internal_SUB_Lang_1" ) -And ( $Internal_Sub_1_ID -eq "" ) -And ( $n -ne $Internal_SUB_Number ) -And (( $Internal_SUB_to_search_with_title -eq $false ) -OR (( $Internal_SUB_to_search_with_title -eq $true ) -And ( $track.Title -match "$Internal_SUB_1_title_to_search" )) ) ) {
|
||||
$Internal_Sub_1_ID = $track.id - 1
|
||||
$n++
|
||||
$JSON_sub_1_position = $l
|
||||
}
|
||||
elseif ( ( $Internal_SUB_Lang_2 -ne "" ) -And ( $track."Language" -match "$Internal_SUB_Lang_2" ) -And ( $Internal_Sub_2_ID -eq "" ) -And ( $n -ne $Internal_SUB_Number) -And (( $Internal_SUB_to_search_with_title -eq $false ) -OR (( $Internal_SUB_to_search_with_title -eq $true ) -And ( $track.Title -match "$Internal_SUB_2_title_to_search" )) ) ) {
|
||||
$Internal_Sub_2_ID = $track.id - 1
|
||||
$n++
|
||||
$JSON_sub_2_position = $l
|
||||
}
|
||||
elseif ( ( $Internal_SUB_Lang_3 -ne "" ) -And ( $track."Language" -match "$Internal_SUB_Lang_3" ) -And ( $Internal_Sub_3_ID -eq "" ) -And ( $n -ne $Internal_SUB_Number) -And (( $Internal_SUB_to_search_with_title -eq $false ) -OR (( $Internal_SUB_to_search_with_title -eq $true ) -And ( $track.Title -match "$Internal_SUB_3_title_to_search" )) ) ) {
|
||||
$Internal_Sub_3_ID = $track.id - 1
|
||||
$n++
|
||||
$JSON_sub_3_position = $l
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Some Internal Sub are present, but we don't care, we don't keep it/them...
|
||||
Write-Host "`tThere is some internal subtitle tracks, but you choose to not keep it/them..." -ForegroundColor "Cyan"
|
||||
}
|
||||
}
|
||||
|
||||
$l++ # Increment number of track processed
|
||||
}
|
||||
if ($Internal_SUB_Number -ne 0 ) {
|
||||
# Checking if there are the right number of IDs retrieved
|
||||
if ( ( $Internal_SUB_Number -ne 0 ) -And ( $JSON_SubCount -eq 0 ) ) {
|
||||
Write-Host "`tYou choose to keep at least one internal subtitle, but there isn't any in the MKV..." -ForegroundColor "Red"
|
||||
}
|
||||
|
||||
|
||||
if (( $Internal_Sub_1_ID -eq "" ) -And ( $Internal_Sub_2_ID -eq "" ) -And ( $Internal_Sub_3_ID -eq "" )) {
|
||||
Write-Host "`tThere is no internal subtitle tracks that match your specifications." -ForegroundColor "Yellow"
|
||||
}
|
||||
else {
|
||||
$counter = 0
|
||||
if ( $Internal_Sub_1_ID -ne "" ) {
|
||||
$counter++
|
||||
}
|
||||
if ( $Internal_Sub_2_ID -ne "" ) {
|
||||
$counter++
|
||||
}
|
||||
if ( $Internal_Sub_3_ID -ne "" ) {
|
||||
$counter++
|
||||
}
|
||||
if ( $counter -lt $Internal_SUB_Number ) {
|
||||
# Not all desired subtitles are retrieved
|
||||
Write-Host "`tNot all desired subtitles are retrieved..." -ForegroundColor "Red"
|
||||
if (( $Internal_SUB_Number -ge 1 ) -And ( $Internal_Sub_1_ID -eq "" )) {
|
||||
Write-Host "`tThere is no internal subtitle tracks that match your specification language : $Internal_SUB_Lang_1." -ForegroundColor "Yellow"
|
||||
}
|
||||
if (( $Internal_SUB_Number -ge 2 ) -And ( $Internal_Sub_2_ID -eq "" )) {
|
||||
Write-Host "`tThere is no internal subtitle tracks that match your specification language : $Internal_SUB_Lang_2." -ForegroundColor "Yellow"
|
||||
}
|
||||
if (( $Internal_SUB_Number -eq 3 ) -And ( $Internal_Sub_3_ID -eq "" )) {
|
||||
Write-Host "`tThere is no internal subtitle tracks that match your specification language : $Internal_SUB_Lang_3." -ForegroundColor "Yellow"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Write-Host "`tThere is no internal subtitle tracks that match your specifications." -ForegroundColor "Yellow"
|
||||
}
|
||||
}
|
||||
|
||||
# if ( ( $Internal_SUB_Number -eq 1 ) -And ( $Internal_Sub_1_ID -eq "" ) ) {
|
||||
# Write-Host "`tYou choose to keep one internal subtitle, but there isn't any in the MKV..." -ForegroundColor "Red"
|
||||
# }
|
||||
# elseif ( ( $Internal_SUB_Number -eq 2 ) -And ( ($Internal_Sub_1_ID -eq "") -Or ($Internal_Sub_2_ID -eq "") ) ) {
|
||||
# if ( $Internal_Sub_1_ID -eq "" ) {
|
||||
# Write-Host "`tYou choose to keep two internal subtitle, but there isn't any in the MKV..." -ForegroundColor "Yellow"
|
||||
# }
|
||||
# }
|
||||
# elseif ( ( $Internal_SUB_Number -eq 2 ) -And ( ($Internal_Sub_1_ID -eq "") -And ($Internal_Sub_2_ID -eq "") ) ) {
|
||||
# Write-Host "`tYou choose to keep two internal subtitle, but there isn't any in the MKV..." -ForegroundColor "Yellow"
|
||||
# }
|
||||
# elseif ( ( $Internal_SUB_Number -eq 2 ) -And ( ($Internal_Sub_1_ID -ne "") -And ($Internal_Sub_2_ID -ne "") -And ($Internal_Sub_3_ID -eq "") ) ) {
|
||||
# Write-Host "`tOnly Two Internal Subtitles ID have been retrieved ! Great !" -ForegroundColor "Yellow"
|
||||
# }
|
||||
# elseif ( ( $Internal_SUB_Number -eq 3 ) -And ( ($Internal_Sub_1_ID -ne "") -And ($Internal_Sub_2_ID -ne "") -And ($Internal_Sub_3_ID -ne "") ) ) {
|
||||
# Write-Host "`tOnly Three Internal Subtitles ID have been retrieved ! Great !" -ForegroundColor "Yellow"
|
||||
# }
|
||||
|
||||
Write-Host "`t`$VideoTrack_ID = $VideoTrack_ID" -ForegroundColor "Yellow"
|
||||
if ($NB_Audio_MKV1 -ge 1) {
|
||||
Write-Host "`t`$AudioTrack_1_ID = $AudioTrack_1_ID`tLang set in the script = $AudioTrack_1_Lang" -ForegroundColor "Yellow"
|
||||
if ($NB_Audio_MKV1 -eq 2) {
|
||||
Write-Host "`t`$AudioTrack_2_ID = $AudioTrack_2_ID`tLang set in the script = $AudioTrack_2_Lang" -ForegroundColor "Yellow"
|
||||
}
|
||||
}
|
||||
|
||||
if ( $Internal_SUB_Number -ne 0 ) {
|
||||
Write-Host "`t`$Internal_Sub_1_ID = $Internal_Sub_1_ID`tLang set in the script = $Internal_SUB_Lang_1" ( &{ If ($Internal_SUB_to_search_with_title -eq $true) { "`tSearched Title was : $Internal_SUB_1_title_to_search" } Else { "" } }) -ForegroundColor "Yellow"
|
||||
if ($Internal_SUB_Number -ge 2) {
|
||||
Write-Host "`t`$Internal_Sub_2_ID = $Internal_Sub_2_ID`tLang set in the script = $Internal_SUB_Lang_2" ( &{ If ($Internal_SUB_to_search_with_title -eq $true) { "`tSearched Title was : $Internal_SUB_2_title_to_search" } Else { "" } }) -ForegroundColor "Yellow"
|
||||
if ($Internal_SUB_Number -eq 3) {
|
||||
Write-Host "`t`$Internal_Sub_3_ID = $Internal_Sub_3_ID`tLang set in the script = $Internal_SUB_Lang_3" ( &{ If ($Internal_SUB_to_search_with_title -eq $true) { "`tSearched Title was : $Internal_SUB_3_title_to_search" } Else { "" } }) -ForegroundColor "Yellow"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $VideoTrack_ID, $AudioTrack_1_ID, $AudioTrack_2_ID, $Internal_Sub_1_ID, $Internal_Sub_2_ID, $Internal_Sub_3_ID
|
||||
}
|
||||
|
||||
function Test-Directory {
|
||||
param (
|
||||
[Parameter(Mandatory)]$path_to_verify
|
||||
)
|
||||
If (!(test-path $path_to_verify)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $path_to_verify
|
||||
Write-Host "The path $path_to_verify (or one of the last subfolder) didn't exist. It has been created." -ForegroundColor "DarkBlue"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# #############################################################################################
|
||||
# -> BEGIN MAIN SCRIPT -------------------------------------------------------------------
|
||||
# #############################################################################################
|
||||
|
||||
# Resetting some variables that should be equal to ""
|
||||
if ( $NB_Audio_MKV1 -eq 0 ) {
|
||||
$AudioTrack_1_Lang = ""
|
||||
$AudioTrack_2_Lang = ""
|
||||
}
|
||||
elseif ( $NB_Audio_MKV1 -eq 1 ) {
|
||||
$AudioTrack_2_Lang = ""
|
||||
}
|
||||
|
||||
if ( $Internal_SUB_Number -eq 0 ) {
|
||||
$Internal_SUB_Lang_1 = ""
|
||||
$Internal_SUB_Lang_2 = ""
|
||||
$Internal_SUB_Lang_3 = ""
|
||||
}
|
||||
elseif ( $Internal_SUB_Number -eq 1 ) {
|
||||
$Internal_SUB_Lang_2 = ""
|
||||
$Internal_SUB_Lang_3 = ""
|
||||
}
|
||||
elseif ( $Internal_SUB_Number -eq 2 ) {
|
||||
$Internal_SUB_Lang_3 = ""
|
||||
}
|
||||
# -------------------------------------------------
|
||||
|
||||
# Define track order - DO NOT TOUCH
|
||||
$track_order_EXT_sub = ""
|
||||
if ( $merge_another_video_MKV2 -eq $false) {
|
||||
if ( $External_SUB -eq $true ) {
|
||||
if ( $External_SUB_Number -ge 1 ) {
|
||||
$track_order_EXT_sub += "1:0"
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
$track_order_EXT_sub += ",2:0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( $External_SUB -eq $true ) {
|
||||
if ( $External_SUB_Number -ge 1 ) {
|
||||
$track_order_EXT_sub += "2:0"
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
$track_order_EXT_sub += ",3:0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ===========================================
|
||||
|
||||
# Checking if the $destinationDirectory exists, if not, create the folder(s)
|
||||
Test-Directory $destinationDirectory
|
||||
|
||||
# Counting the number of MKV_1
|
||||
$MKV_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$VideoExtension_1" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1 = $MKV_1_List.count
|
||||
Write-Host "$Count_1 Videos ($VideoExtension_1) to be processed in $sourceDirectory_1."
|
||||
# Testing if the Done_Remerged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_1 = $sourceDirectory_1 + "\Done_Remerged"
|
||||
Test-Directory $Path_Folder_NotMerged_1
|
||||
|
||||
if ($merge_another_video_MKV2 -eq $true) {
|
||||
# Counting the number of MKV_1
|
||||
$MKV_2_List = Get-ChildItem $sourceDirectory_2 -Filter "*.$VideoExtension_2" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2 = $MKV_2_List.count
|
||||
Write-Host "$Count_2 MKV's to be processed in $sourceDirectory_2."
|
||||
# Testing if the Done_Remerged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_2 = $sourceDirectory_2 + "\Done_Remerged"
|
||||
Test-Directory $Path_Folder_NotMerged_2
|
||||
|
||||
|
||||
# #########################
|
||||
# Check if there is the same .mkv files in both source directory
|
||||
if ($Count_1 -eq $Count_2) {
|
||||
Write-Host "There is the same number of MKV in the two sources folders. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV in the two sources folders isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
# #########################
|
||||
}
|
||||
|
||||
# #########################
|
||||
# Check if there is the same number of .srt files as .mkv files
|
||||
if ( $External_SUB -eq $true ) {
|
||||
if ( $External_SUB_Number -ge 1 ) {
|
||||
# If $NB_External_SUB >= 1 (include =1 and =2)
|
||||
$SRT_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_1" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1_SRT = $SRT_1_List.count
|
||||
Write-Host "$Count_1_SRT SRT's ($SubExtension_1) to be processed in $sourceDirectory_1."
|
||||
if ($Count_1 -eq $Count_1_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°1 files ($SubExtension_1) in this folder. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV and SRT n°1 files isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
# Only if $External_SUB_Number = 2
|
||||
$SRT_2_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_2" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2_SRT = $SRT_2_List.count
|
||||
Write-Host "$Count_2_SRT SRT's ($SubExtension_2) to be processed in $sourceDirectory_1."
|
||||
|
||||
if ($Count_1 -eq $Count_2_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°2 files ($SubExtension_2) in this folder. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV and SRT n°2 files ($SubExtension_2) isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
}
|
||||
# #########################
|
||||
|
||||
$compteur = 1 # Counter to show the progress of file processed
|
||||
|
||||
Foreach ($MKV_1 in $MKV_1_List) {
|
||||
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "Traitement du fichier n° $compteur / $Count_1..." -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
# Clear variables
|
||||
$MKVMerge_param_start = ""
|
||||
$MKVMerge_param_mkv1 = ""
|
||||
$MKVMerge_param_srt1 = ""
|
||||
$MKVMerge_param_srt2 = ""
|
||||
$MKVMerge_param_all = ""
|
||||
$MKVMerge_sub_param = ""
|
||||
$SRT_1_Name = ""
|
||||
$SRT_2_Name = ""
|
||||
$SRT_1 = ""
|
||||
$SRT_2 = ""
|
||||
$SubTrackName_1 = ""
|
||||
$SubTrackLang_1 = ""
|
||||
$SubTrack_1_default = ""
|
||||
$sub_charset_1 = ""
|
||||
$SubTrackName_2 = ""
|
||||
$SubTrackLang_2 = ""
|
||||
$SubTrack_2_default = ""
|
||||
$sub_charset_2 = ""
|
||||
$track_order = ""
|
||||
$VideoTrack_ID, $AudioTrack_1_ID, $AudioTrack_2_ID = "", "", ""
|
||||
$Internal_Sub_1_ID, $Internal_Sub_2_ID, $Internal_Sub_3_ID = "", "", ""
|
||||
$MKVMerge_audio_param = ""
|
||||
|
||||
$FormatName_1 = (Get-Item $MKV_1).Basename
|
||||
$MKV_1_name = $FormatName_1.ToString()
|
||||
|
||||
# #################################################################
|
||||
# Title for the video track and for the destination file $Output
|
||||
$VideoTrackName = $MKV_1_name
|
||||
if ( $set_year_with_brackets -eq $true ) {
|
||||
if ( $type_media -eq "movie" ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '(\d{4}(?=\..*))', '($1)'
|
||||
}
|
||||
elseif ( $type_media -eq "serie" ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '(\d{4}(?=.*S\d{2}E\d{2}))', '($1)'
|
||||
}
|
||||
}
|
||||
if ( $remove_dots -eq $true ) {
|
||||
if ( $type_media -eq "movie" ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '\.(?=.*\d{4})', ' '
|
||||
}
|
||||
elseif ( $type_media -eq "serie" ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '\.(?=.*S\d{2}E\d{2})', ' '
|
||||
}
|
||||
}
|
||||
$VideoTrackName = $VideoTrackName -replace $chain_to_search, $chain__to_replace
|
||||
$VideoTrackName = "$VideoTrackName"
|
||||
Write-Host "`tThe Video Track Name will be : `r`n`t`t $VideoTrackName" -ForegroundColor "green"
|
||||
if ( $compteur -le 3 ) {
|
||||
# Will prompt for a key to be pressed for the 3 first names
|
||||
Write-Host "`tFor the 3 first file, this will show up, and pause for 10s" -ForegroundColor "yellow";
|
||||
Start-Sleep -Seconds 10
|
||||
}
|
||||
$Output = "$destinationDirectory" + "\" + "$VideoTrackName" + ".mkv"
|
||||
$JSON_file = "$sourceDirectory_1_json\$MKV_1_name.json"
|
||||
# #################################################################
|
||||
|
||||
# Now we'll get the track ID for the MKV in action !
|
||||
$VideoTrack_ID, $AudioTrack_1_ID, $AudioTrack_2_ID, $Internal_Sub_1_ID, $Internal_Sub_2_ID, $Internal_Sub_3_ID = Get-Track_ID $MediaInfo $MKV_1 $NB_Audio_MKV1 $AudioTrack_1_Lang $AudioTrack_2_Lang $Internal_SUB_Number $Internal_SUB_Lang_1 $Internal_SUB_Lang_2 $Internal_SUB_Lang_3 $Internal_SUB_to_search_with_title $Internal_SUB_1_title_to_search $Internal_SUB_2_title_to_search $Internal_SUB_3_title_to_search $JSON_Export $JSON_file
|
||||
|
||||
# Exception for some files !!! -----------------------------------------------------------------
|
||||
if ( $MKV_1_name.Substring(0, 26) -eq "One Piece (1999) - S20E001" ) {
|
||||
$AudioTrack_1_ID = 2 # Manual set for 1st audio track in final MKV
|
||||
$AudioTrack_2_ID = 1 # Manual set for 2nd audio track in final MKV
|
||||
Write-Host "`tThis file doesn't have correct track language. We set it to :`n`t`t`$AudioTrack_1_ID = $AudioTrack_1_ID`t for audio lang 1 = $AudioTrack_1_Lang`n`t`t`$AudioTrack_2_ID = $AudioTrack_2_ID." -ForegroundColor "White" -BackgroundColor "DarkRed"
|
||||
}
|
||||
# if ( $MKV_1_name.Substring(0, 26) -eq "One Piece (1999) - S18E001" ) {
|
||||
# $AudioTrackName_1_sansID = "Japonais - AAC 2.0"
|
||||
# $AudioTrackName_2_sansID = "Français - AAC 2.0"
|
||||
# Write-Host "`tThis file doesn't have correct track language. We set it to : `$AudioTrack_1_ID = $AudioTrack_1_ID`tand`t`$AudioTrack_2_ID = $AudioTrack_2_ID."
|
||||
# }
|
||||
# if ( $MKV_1_name.Substring(0, 26) -eq "One Piece (1999) - S18E008" ) {
|
||||
# $AudioTrack_1_ID = 2
|
||||
# $AudioTrack_2_ID = 1
|
||||
# Write-Host "`tThis file doesn't have correct track language. We set it to : `$AudioTrack_1_ID = $AudioTrack_1_ID`tand`t`$AudioTrack_2_ID = $AudioTrack_2_ID."
|
||||
# }
|
||||
# if ( $MKV_1_name.Substring(0, 26) -eq "One Piece (1999) - S18E020" ) {
|
||||
# $AudioTrack_1_ID = 2
|
||||
# $AudioTrack_2_ID = 1
|
||||
# Write-Host "`tThis file doesn't have correct track language. We set it to : `$AudioTrack_1_ID = $AudioTrack_1_ID`tand`t`$AudioTrack_2_ID = $AudioTrack_2_ID."
|
||||
# }
|
||||
|
||||
|
||||
# End of Exceptions ----------------------------------------------------------------------------
|
||||
|
||||
if ( $merge_another_video_MKV2 -eq $false ) {
|
||||
# Only 1 MKV is to re-merge
|
||||
# We keep video and audio from MKV_1
|
||||
if (( $NB_Audio_MKV1 -gt 0 ) -and ($NB_Audio_MKV1 -le 2)) {
|
||||
# $NB_Audio_MKV1 = 1 or 2
|
||||
$MKVMerge_audio_param = "--language $AudioTrack_1_ID" + ":$AudioLang_1_sansID --track-name `"$AudioTrack_1_ID" + ":$AudioTrackName_1_sansID`" --default-track $AudioTrack_1_ID" + ":$AudioTrack_1_default_sansID"
|
||||
$track_order = "$VideoTrack_ID" + ":0,0:$AudioTrack_1_ID"
|
||||
if ( $NB_Audio_MKV1 -eq 2 ) {
|
||||
$MKVMerge_audio_param += " --language $AudioTrack_2_ID" + ":$AudioLang_2_sansID --track-name `"$AudioTrack_2_ID" + ":$AudioTrackName_2_sansID`" --default-track $AudioTrack_2_ID" + ":$AudioTrack_2_default_sansID"
|
||||
$track_order += ",0:$AudioTrack_2_ID"
|
||||
}
|
||||
}
|
||||
elseif ($NB_Audio_MKV1 -ne 0) {
|
||||
write-host "Problem with `$NB_Audio_MKV1=$NB_Audio_MKV1.`n`$NB_Audio_MKV1 must be set to : 0, 1 or 2" -ForegroundColor "Red"
|
||||
exit
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
# 2 MKV are to be merged, keeping audio from MKV_1 and only video from MKV_2
|
||||
|
||||
# We change the video track ID because it's on the MKV_2 !!
|
||||
$VideoTrack_ID = "0" # May not be usefull... TO-DO !!!!
|
||||
|
||||
# ########################################################
|
||||
# Extracting the episode number of the OnePiece Serie (must be commented if not used...)
|
||||
# Generating pattern string to search for the right MKV2 file in case of filename differents...
|
||||
|
||||
# $MKV1_search_pattern = '(.*) - (\d{3}) -(.*)'
|
||||
# # $chain__to_replace = ''
|
||||
# $MKV1_chain_to_replace_for_MKV2 = '$1 - $2'
|
||||
# $MKV_2_search_pattern = $MKV_1_name -replace $MKV1_search_pattern, $MKV1_chain_to_replace_for_MKV2
|
||||
|
||||
$MKV_2_search_pattern = $MKV_1_name
|
||||
# Get MKV2 filename
|
||||
$MKV_2_file = get-ChildItem $sourceDirectory_2 | where { $_.name -like "*$MKV_2_search_pattern*" } | select name
|
||||
$FormatName_2 = $MKV_2_file.Name.ToString()
|
||||
$MKV_2_name = $FormatName_2.Substring(0, $FormatName_2.Length - ($VideoExtension_2.Length + 1))
|
||||
$MKV_2 = $sourceDirectory_2 + "\" + $MKV_2_name + ".$VideoExtension_2"
|
||||
|
||||
# Now that MKV_2 is defined, we can create the MKVmerge parameters, witch will be common to all merge.
|
||||
$MKVMerge_param_mkv2 = "--no-audio --no-subtitles --no-track-tags --no-global-tags --language 0:$Video_Lang --track-name `"0:$VideoTrackName`" --default-track 0:yes `"$MKV_2`""
|
||||
|
||||
|
||||
|
||||
if (( $NB_Audio_MKV1 -gt 0 ) -and ($NB_Audio_MKV1 -le 2)) {
|
||||
# $NB_Audio_MKV1 = 1 or 2
|
||||
$MKVMerge_audio_param = "--language $AudioTrack_1_ID" + ":$AudioLang_1_sansID --track-name `"$AudioTrack_1_ID" + ":$AudioTrackName_1_sansID`" --default-track $AudioTrack_1_ID" + ":$AudioTrack_1_default_sansID"
|
||||
$track_order = "1:0,0:$AudioTrack_1_ID"
|
||||
if ( $NB_Audio_MKV1 -eq 2 ) {
|
||||
$MKVMerge_audio_param += " --language $AudioTrack_2_ID" + ":$AudioLang_2_sansID --track-name `"$AudioTrack_2_ID" + ":$AudioTrackName_2_sansID`" --default-track $AudioTrack_2_ID" + ":$AudioTrack_2_default_sansID"
|
||||
$track_order += ",0:$AudioTrack_2_ID"
|
||||
}
|
||||
}
|
||||
elseif ($NB_Audio_MKV1 -ne 0) {
|
||||
write-host "Problem with `$NB_Audio_MKV1=$NB_Audio_MKV1.`n`$NB_Audio_MKV1 must be set to : 0, 1 or 2" -ForegroundColor "Red"
|
||||
exit
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( $Internal_SUB_Number -ne 0 ) {
|
||||
|
||||
# Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "$Internal_Sub_1_ID" + ":$SubTrackName_1_sansID"
|
||||
$SubTrackLang_1 = "$Internal_Sub_1_ID" + ":$SubTrackLang_1_sansID"
|
||||
$SubTrack_1_default = "$Internal_Sub_1_ID" + ":$SubTrack_1_default_sansID"
|
||||
$SubTrack_1_forced_track = "$Internal_Sub_1_ID" + ":$SubTrack_1_forced_track_sansID"
|
||||
$SubTrack_1_SDH = "$Internal_Sub_1_ID" + ":$SubTrack_1_SDH_sansID"
|
||||
$sub_charset_1 = "$Internal_Sub_1_ID" + ":$sub_charset_1_sansID"
|
||||
# Define track order
|
||||
$track_order += ",0:$Internal_Sub_1_ID"
|
||||
$subtitle_tracks = "$Internal_Sub_1_ID"
|
||||
$MKVMerge_sub_param = "--sub-charset $sub_charset_1 --language $SubTrackLang_1 --track-name `"$SubTrackName_1`" --default-track $SubTrack_1_default --forced-track $SubTrack_1_forced_track --hearing-impaired-flag $SubTrack_1_SDH"
|
||||
|
||||
if ( $Internal_SUB_Number -ge 2 ) {
|
||||
# Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_2 = "$Internal_Sub_2_ID" + ":$SubTrackName_2_sansID"
|
||||
$SubTrackLang_2 = "$Internal_Sub_2_ID" + ":$SubTrackLang_2_sansID"
|
||||
$SubTrack_2_default = "$Internal_Sub_2_ID" + ":$SubTrack_2_default_sansID"
|
||||
$SubTrack_2_forced_track = "$Internal_Sub_2_ID" + ":$SubTrack_2_forced_track_sansID"
|
||||
$SubTrack_2_SDH = "$Internal_Sub_2_ID" + ":$SubTrack_2_SDH_sansID"
|
||||
$sub_charset_2 = "$Internal_Sub_2_ID" + ":$sub_charset_2_sansID"
|
||||
# Define track order
|
||||
$track_order += ",0:$Internal_Sub_2_ID"
|
||||
$subtitle_tracks += ",$Internal_Sub_2_ID"
|
||||
$MKVMerge_sub_param += " --sub-charset $sub_charset_2 --language $SubTrackLang_2 --track-name `"$SubTrackName_2`" --default-track $SubTrack_2_default --forced-track $SubTrack_2_forced_track --hearing-impaired-flag $SubTrack_2_SDH"
|
||||
}
|
||||
if ( $Internal_SUB_Number -eq 3 ) {
|
||||
# Sub n°3 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_3 = "$Internal_Sub_3_ID" + ":$SubTrackName_3_sansID"
|
||||
$SubTrackLang_3 = "$Internal_Sub_3_ID" + ":$SubTrackLang_3_sansID"
|
||||
$SubTrack_3_default = "$Internal_Sub_3_ID" + ":$SubTrack_3_default_sansID"
|
||||
$SubTrack_3_forced_track = "$Internal_Sub_3_ID" + ":$SubTrack_3_forced_track_sansID"
|
||||
$SubTrack_3_SDH = "$Internal_Sub_3_ID" + ":$SubTrack_3_SDH_sansID"
|
||||
$sub_charset_3 = "$Internal_Sub_3_ID" + ":$sub_charset_3_sansID"
|
||||
# Define track order
|
||||
$track_order += ",0:$Internal_Sub_3_ID"
|
||||
$subtitle_tracks += ",$Internal_Sub_3_ID"
|
||||
$MKVMerge_sub_param += " --sub-charset $sub_charset_3 --language $SubTrackLang_3 --track-name `"$SubTrackName_3`" --default-track $SubTrack_3_default --forced-track $SubTrack_3_forced_track --hearing-impaired-flag $SubTrack_3_SDH"
|
||||
}
|
||||
$subtitle_tracks = "`"$subtitle_tracks`""
|
||||
}
|
||||
|
||||
if ( ( $External_SUB_Number -ne 0 ) -and ( $External_SUB -eq $true ) ) {
|
||||
|
||||
# First external SRT to include
|
||||
$SRT_1_Name = $MKV_1_name + ".$SubExtension_1"
|
||||
$SRT_1 = $sourceDirectory_1 + "\" + $SRT_1_name
|
||||
|
||||
# Subtitles are elsewhere...
|
||||
# $SRT_1_Name = "3_English.srt"
|
||||
# $SRT_1 = $sourceDirectory_1 + "\" + $SRT_1_name
|
||||
# $SRT_1 = $sourceDirectory_1 + "\Subs\" + $MKV_1_name + "\" + $SRT_1_name
|
||||
|
||||
If (-Not (Test-Path $SRT_1) ) {
|
||||
Write-Host "File NON-EXISTANT - $SRT_1" -ForegroundColor "Red"
|
||||
Write-Host "Check the filename or the script. ABORT..." -ForegroundColor "Red"
|
||||
Exit
|
||||
}
|
||||
$track_order += ",$track_order_EXT_sub"
|
||||
|
||||
$MKVMerge_param_srt1 = "--sub-charset $Extsub_charset_1 --language $ExtSubTrackLang_1 --track-name `"$ExtSubTrackName_1`" --default-track $ExtSubTrack_1_default --forced-track $ExtSub_forced_track_1 --hearing-impaired-flag $ExtSub_SDH_1 `"$SRT_1`""
|
||||
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
# Second external SRT to include
|
||||
$SRT_2_Name = $MKV_1_name + ".$SubExtension_2"
|
||||
$SRT_2 = $sourceDirectory_1 + "\" + $SRT_2_name
|
||||
|
||||
# Subtitles are elsewhere...
|
||||
# $SRT_2_Name = "3_English.srt"
|
||||
# $SRT_2 = $sourceDirectory_1 + "\" + $SRT_2_name
|
||||
# $SRT_2 = $sourceDirectory_1 + "\Subs\" + $MKV_1_name + "\" + $SRT_2_name
|
||||
|
||||
$MKVMerge_param_srt2 = "--sub-charset $Extsub_charset_2 --language $ExtSubTrackLang_2 --track-name `"$ExtSubTrackName_2`" --default-track $ExtSubTrack_2_default --forced-track $ExtSub_forced_track_2 --hearing-impaired-flag $ExtSub_SDH_2 `"$SRT_2`""
|
||||
}
|
||||
}
|
||||
|
||||
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`""
|
||||
|
||||
if ( $Internal_SUB_Number -eq 0 ) {
|
||||
$MKVMerge_param_start += " --no-subtitles"
|
||||
}
|
||||
else {
|
||||
# Part for internal subtitles
|
||||
$MKVMerge_param_start += " --subtitle-tracks $subtitle_tracks"
|
||||
}
|
||||
|
||||
|
||||
if ($merge_another_video_MKV2 -eq $false) {
|
||||
# Video is from MKV_1
|
||||
$MKVMerge_param_start += " --track-name `"$VideoTrack_ID" + ":$VideoTrackName`" --default-track $VideoTrack_ID" + ":yes --language $VideoTrack_ID" + ":$Video_Lang"
|
||||
}
|
||||
else {
|
||||
# If Video is from MKV_2, we don't want the video from MKV_1 added...
|
||||
$MKVMerge_param_start += " --no-video"
|
||||
}
|
||||
|
||||
|
||||
if ( $no_attachements -eq $true ) {
|
||||
$MKVMerge_param_start += " --no-attachments"
|
||||
}
|
||||
|
||||
if ( $Internal_SUB_Number -ne 0 ) {
|
||||
# Part for internal subtitles
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param $MKVMerge_sub_param `"$MKV_1`""
|
||||
}
|
||||
else {
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param `"$MKV_1`""
|
||||
}
|
||||
|
||||
$MKVMerge_param_all = "$MKVMerge_param_start $MKVMerge_param_mkv1"
|
||||
|
||||
if ( $merge_another_video_MKV2 -eq $true ) {
|
||||
$MKVMerge_param_all += " $MKVMerge_param_mkv2"
|
||||
}
|
||||
|
||||
if ( ( $External_SUB_Number -ne 0 ) -and ( $External_SUB -eq $true ) ) {
|
||||
$MKVMerge_param_all += " $MKVMerge_param_srt1"
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
$MKVMerge_param_all += " $MKVMerge_param_srt2"
|
||||
}
|
||||
}
|
||||
|
||||
# Write-Host "`$MKVMerge_param_start = $MKVMerge_param_start" -ForegroundColor "White"
|
||||
# Write-Host "`$MKVMerge_param_mkv1 = $MKVMerge_param_mkv1" -ForegroundColor "White"
|
||||
# Write-Host "`$MKVMerge_param_all = $MKVMerge_param_all" -ForegroundColor "White"
|
||||
Write-Host "`tRecap. of all language tracks :" -ForegroundColor "Cyan"
|
||||
Write-Host "`t`t- Video lang will be : $Video_Lang" -ForegroundColor "Cyan"
|
||||
Write-Host "`t`t- Audio 1 lang will be : $AudioLang_1_sansID`t`tand name = $AudioTrackName_1_sansID" -ForegroundColor "Cyan"
|
||||
if ($NB_Audio_MKV1 -eq 2) {
|
||||
Write-Host "`t`t- Audio 2 lang will be : $AudioLang_2_sansID`t`tand name = $AudioTrackName_2_sansID" -ForegroundColor "Cyan"
|
||||
}
|
||||
if ($Internal_SUB_Number -ge 1) {
|
||||
Write-Host "`t`t- Internal Sub 1 lang will be : $SubTrackLang_1_sansID`tand name = $SubTrackName_1_sansID" ( &{ If ( ($SubTrack_1_SDH_sansID -eq "yes") -eq $true) { "`tFlagged with SDH (--hearing-impaired-flag)" } }) -ForegroundColor "Cyan"
|
||||
if ($Internal_SUB_Number -ge 2) {
|
||||
Write-Host "`t`t- Internal Sub 2 lang will be : $SubTrackLang_2_sansID`tand name = $SubTrackName_2_sansID" ( &{ If ( ($SubTrack_2_SDH_sansID -eq "yes") -eq $true) { "`tFlagged with SDH (--hearing-impaired-flag)" } }) -ForegroundColor "Cyan"
|
||||
if ($Internal_SUB_Number -eq 3) {
|
||||
Write-Host "`t`t- Internal Sub 3 lang will be : $SubTrackLang_3_sansID`tand name = $SubTrackName_3_sansID" ( &{ If ( ($SubTrack_3_SDH_sansID -eq "yes") -eq $true) { "`tFlagged with SDH (--hearing-impaired-flag)" } }) -ForegroundColor "Cyan"
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($External_SUB -eq $true) {
|
||||
Write-Host "`t`t- External Sub 1 lang will be : $($ExtSubTrackLang_1 -replace '0:', '')`tand name = $($ExtSubTrackName_1 -replace '0:', '')" ( &{ If ( ($ExtSub_SDH_1 -match "yes") -eq $true) { "`tFlagged with SDH (--hearing-impaired-flag)" } }) -ForegroundColor "Cyan"
|
||||
if ($External_SUB_Number -eq 2) {
|
||||
Write-Host "`t`t- External Sub 2 lang will be : $($ExtSubTrackLang_2 -replace '0:', '')`tand name = $($ExtSubTrackName_1 -replace '0:', '')" ( &{ If ( ($ExtSub_SDH_2 -match "yes") -eq $true) { "`tFlagged with SDH (--hearing-impaired-flag)" } }) -ForegroundColor "Cyan"
|
||||
}
|
||||
}
|
||||
|
||||
# Last step to command construction
|
||||
$command = "& $MKVMerge $MKVMerge_param_all"
|
||||
# Launch begin...
|
||||
Invoke-Expression $command
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Fin du traitement du fichier n° $compteur / $Count_1.`n" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
If (-Not (Test-Path $Output) ) {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
else {
|
||||
if ( $move_mkv1_after_merge -eq $true ) {
|
||||
Move-Item -Path $MKV_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $External_SUB -eq $true ) {
|
||||
Move-Item -Path $SRT_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
Move-Item -Path $SRT_2 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ( $move_mkv2_after_merge -eq $true ) -And ( $merge_another_video_MKV2 -eq $true) ) {
|
||||
Move-Item -Path $MKV_2 -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
}
|
||||
}
|
||||
|
||||
$compteur++
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,479 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer deux MKV en gardant l'audio et le(s) sous-titre du premier ou un sous-titre ##
|
||||
## externe, et seulement la vidéo du second MKV ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
Clear-Host
|
||||
Invoke-Command -ScriptBlock {
|
||||
|
||||
# Set MKVMerge.exe Path
|
||||
$MKVMerge = "`"PATH_TO\mkvtoolnix\mkvmerge.exe`""
|
||||
# For the parameters to pass to MKVMerge executable, will be construct
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory_1 = "PATH_TO_SOURCE_1"
|
||||
$sourceDirectory_2 = "PATH_TO_SOURCE_2"
|
||||
$destinationDirectory = "PATH_TO_DESTINATION"
|
||||
|
||||
# Rename output file with this settings :
|
||||
# Use https://regex101.com/r/cU5lC2/1 to get the RegEx
|
||||
$chain_to_search = ''
|
||||
# $chain_to_search = '(\w+)\.S(\d{2})E(\d{2}).(.*)H264(.*)'
|
||||
# $chain_to_search = '(\w+)\.S(\d{2})E(\d{2})(.*)1080p.(.*)H.264(.*)'
|
||||
$chain__to_replace = ''
|
||||
# $chain__to_replace = '$1 - S$2E$3 - $4x265-10bits$5--Reencoded'
|
||||
# $chain__to_replace = '$1 (2021) - S$2E$3 - 1080p.$5x265-10bits$6--Reencoded'
|
||||
|
||||
# The filenames must be like : blabla.S00E00.blabla.H.264.blabla
|
||||
# They will be renamed to : blabla - S00E00 - blabla.x265-10bits.blabla--Reencoded
|
||||
# If you don't want the rename to be made, juste set to '' the variables.
|
||||
|
||||
# If there is no internal subtitles to keep :
|
||||
# Set to $false for no internal subtitle
|
||||
# Set to $true for one or more internal subtitles
|
||||
$Internal_SUB = $true
|
||||
|
||||
# Is there an external subtitle ? Set the number of .SRT (0 - 2)
|
||||
# It's exclusive, no internal SUB will be proceed..
|
||||
$NB_External_SUB = 0
|
||||
|
||||
# Extension without the .
|
||||
$MkvExtension = "mkv"
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension_1 = 'eng.srt'
|
||||
$SubExtension_2 = 'fre.srt'
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
# Move MKV1 (and SRT) to Not-Merged folder ? Set to $false or $true
|
||||
$move_mkv1_after_merge = $true
|
||||
# Move MKV2 (and SRT) to Not-Merged folder ? Set to $false or $true
|
||||
$move_mkv1_after_merge = $true
|
||||
|
||||
# Initialization for those 3 variables, do not change them !
|
||||
$MKVMerge_sub_param = ""
|
||||
$MKVMerge_audio_param = ""
|
||||
$subtitle_tracks = ""
|
||||
# ##################
|
||||
|
||||
#### FILE 1 - Keeping all but the video
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:English - DDP 5.1"
|
||||
$AudioLang_1 = "1:eng"
|
||||
$AudioTrack_1_default = "1:yes"
|
||||
# Define track order. Do not modify it unless you changed the track number in this section
|
||||
$track_order = "1:0,0:1"
|
||||
# $MKVMerge_audio_param = '--language', "$AudioLang_1", '--track-name', "$AudioTrackName_1", '--default-track', "$AudioTrack_1_default"
|
||||
$MKVMerge_audio_param = "--language $AudioLang_1 --track-name `"$AudioTrackName_1`" --default-track $AudioTrack_1_default"
|
||||
|
||||
# # Track 2 = Audio n°2
|
||||
# # Name and language of Audio Track n°2
|
||||
# $AudioTrackName_1 = "2:English - DDP 5.1"
|
||||
# $AudioLang_1 = "2:en"
|
||||
# $AudioTrack_1_default = "2:yes"
|
||||
# # Define track order. Do not modify it unless you changed the track number in this section
|
||||
# $track_order = "1:0,0:1,0:2"
|
||||
# $MKVMerge_audio_param += "--language $AudioLang_2 --track-name `"$AudioTrackName_2`" --default-track $AudioTrack_2_default"
|
||||
|
||||
##########################################
|
||||
#### FILE 2 - MKV - Keeping only the video
|
||||
#### $file_2_options = "--no-audio --no-track-tags --no-global-tags"
|
||||
|
||||
if ( $NB_External_SUB -ne 0 ) {
|
||||
# ================== EXTERNAL SUBTITLE ==================
|
||||
# Must have the same name as MKV1
|
||||
####
|
||||
#### FILE 3 - SRT - Keeping all but the video (audio + chapters tags)
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_1 = "0:English - SRT"
|
||||
$ExtSubTrackLang_1 = "0:eng"
|
||||
$ExtSubTrack_1_default = "0:yes"
|
||||
$ExtSub_charset_1 = "0:UTF-8"
|
||||
# Define track order
|
||||
$track_order += ",2:0"
|
||||
####
|
||||
#### FILE 4 - SRT - Keeping all but the video (audio + chapters tags)
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_2 = "0:Français - SRT"
|
||||
$ExtSubTrackLang_2 = "0:fr"
|
||||
$ExtSubTrack_2_default = "0:no"
|
||||
$ExtSub_charset_2 = "0:UTF-8"
|
||||
# Define track order
|
||||
if ( $NB_External_SUB -eq 2 ) {
|
||||
$track_order += ",3:0"
|
||||
}
|
||||
}
|
||||
else {
|
||||
# ================== INTERNAL SUBTITLES ==================
|
||||
if ( $Internal_SUB -eq $true ) {
|
||||
# Track 2 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
# $SubTrackName_1 = "2:English - SRT"
|
||||
# $SubTrackLang_1 = "2:en"
|
||||
# $SubTrack_1_default = "2:yes"
|
||||
# $sub_charset_1 = "2:UTF-8"
|
||||
# # Define track order
|
||||
# $track_order += ",0:2"
|
||||
# $subtitle_tracks = "2"
|
||||
# # $MKVMerge_sub_param = '--sub-charset', "$sub_charset_1", '--language', "$SubTrackLang_1", '--track-name', "$SubTrackName_1", '--default-track', "$SubTrack_1_default"
|
||||
# $MKVMerge_sub_param = "--sub-charset $sub_charset_1 --language $SubTrackLang_1 --track-name `"$SubTrackName_1`" --default-track $SubTrack_1_default"
|
||||
|
||||
# Track 3 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_2 = "3:English SDH - SRT"
|
||||
$SubTrackLang_2 = "3:eng"
|
||||
$SubTrack_2_default = "3:yes"
|
||||
$sub_charset_2 = "3:UTF-8"
|
||||
# Define track order
|
||||
$track_order += ",0:3"
|
||||
$subtitle_tracks = "3"
|
||||
$MKVMerge_sub_param += "--sub-charset $sub_charset_2 --language $SubTrackLang_2 --track-name `"$SubTrackName_2`" --default-track $SubTrack_2_default"
|
||||
####
|
||||
}
|
||||
else {
|
||||
# No internal subtitles are to be kept...
|
||||
$MKVMerge_sub_param = ""
|
||||
}
|
||||
}
|
||||
## End of part where there is something to change !
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_2 = $sourceDirectory_2 + "\Not-Merged"
|
||||
If (!(test-path $Path_Folder_NotMerged_2)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged_2 -Verbose
|
||||
}
|
||||
else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_1 = $sourceDirectory_1 + "\Not-Merged"
|
||||
If (!(test-path $Path_Folder_NotMerged_1)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged_1 -Verbose
|
||||
}
|
||||
else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
#Process
|
||||
$MKV_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1 = $MKV_1_List.count
|
||||
Write-Host "$Count_1 MKV's to be processed in $sourceDirectory_1."
|
||||
|
||||
$MKV_2_List = Get-ChildItem $sourceDirectory_2 -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2 = $MKV_2_List.count
|
||||
Write-Host "$Count_2 MKV's to be processed in $sourceDirectory_2."
|
||||
|
||||
# #########################
|
||||
# Check if there is the same number of .srt files as .mkv files
|
||||
if ( $NB_External_SUB -ne 0 ) {
|
||||
if ( $NB_External_SUB -ge 1 ) {
|
||||
# If $NB_External_SUB >= 1 (include =1 and =2)
|
||||
$SRT_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_1" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1_SRT = $SRT_1_List.count
|
||||
Write-Host "$Count_1 MKV's to be processed and $Count_1_SRT SRT's to be processed in $sourceDirectory_1."
|
||||
if ($Count_1 -eq $Count_1_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°1 files in this folder. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV and SRT n°1 files isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
if ( $NB_External_SUB -eq 2 ) {
|
||||
# Only if $NB_External_SUB = 2
|
||||
$SRT_2_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_2" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2_SRT = $SRT_2_List.count
|
||||
if ($Count_1 -eq $Count_2_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°2 files in this folder. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV and SRT n°2 files isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
}
|
||||
# #########################
|
||||
|
||||
# #########################
|
||||
# Check if there is the same .mkv files in both source directory
|
||||
if ($Count_1 -eq $Count_2) {
|
||||
Write-Host "There is the same number of MKV in the two sources folders. Let's continue."
|
||||
}
|
||||
else {
|
||||
Write-Host "The number of MKV in the two sources folders isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
# if (!($Count_1 -eq ($filename_ep_final - $filename_ep_start + 1))) {
|
||||
# Write-Host "The number of episodes set in the script isn't the same as the number of files in the folders... EXITING NOW !" -foreground "red"
|
||||
# Exit
|
||||
# }
|
||||
# #########################
|
||||
$compteur = 1
|
||||
|
||||
# for ($i = $filename_ep_start; $i -lt $filename_ep_final+1; $i++) {
|
||||
Foreach ($MKV_1 in $MKV_1_List) {
|
||||
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "Traitement du fichier n° $compteur / $Count_1..." -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
# Genreating Files Name & Video Title
|
||||
# format = filename_1_part_1 + S + filename_season + E + i_counter + filename_1_part_2 + .mkv
|
||||
# format = filename_2_part_1 + S + filename_season + E + i_counter + filename_2_part_2 + .mkv
|
||||
$FormatName_1 = (Get-Item $MKV_1).Basename
|
||||
$MKV_1_name = $FormatName_1.ToString()
|
||||
|
||||
$MKV_2_file = get-ChildItem $sourceDirectory_2 -recurse | where { $_.name -like "*$MKV_1_name*" } | select name
|
||||
|
||||
# Faire test si count = 1 -> ok Sinon soucis !
|
||||
|
||||
$FormatName_2 = $MKV_2_file.Name.ToString()
|
||||
$MKV_2_name = $FormatName_2.Substring(0, $FormatName_2.Length - ($MkvExtension.Length + 1))
|
||||
$MKV_2 = $sourceDirectory_2 + "\" + $MKV_2_name + ".$MkvExtension"
|
||||
|
||||
# Title for the video track and for the destination file
|
||||
$VideoTrackName = $MKV_1_name
|
||||
if ( $set_year_with_brackets -eq $true ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '(\d{4}(?=.*S\d{2}E\d{2}))', '($1)'
|
||||
}
|
||||
if ( $remove_dots -eq $true ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '\.(?=.*S\d{2}E\d{2})', ' '
|
||||
}
|
||||
$VideoTrackName = $VideoTrackName -replace $chain_to_search, $chain__to_replace
|
||||
$VideoTrackName = "$VideoTrackName"
|
||||
Write-Host "`tThe Video Track Name will be : `r`n`t`t $VideoTrackName" -ForegroundColor "green"
|
||||
if ( $compteur -le 3 ) {
|
||||
# Will prompt for a key to be pressed for the 3 first names
|
||||
Write-Host "`tFor the 3 first file, this will show up, and pause for 10s" -ForegroundColor "yellow";
|
||||
Start-Sleep -Seconds 10
|
||||
}
|
||||
|
||||
#########################################################
|
||||
# Exceptions for some files with other than 2 SRT inside
|
||||
# You must copy paste the default entries set in the begining of this script in the Default section
|
||||
switch ($MKV_1_name) {
|
||||
"MY_FILE_WITH_EXCEPTION" {
|
||||
# # ================== AUDIO ==================
|
||||
# # Track 1 = Audio n°1
|
||||
# # Name and language of Audio Track n°1
|
||||
# $AudioTrackName_1 = "1:English - DDP 5.1"
|
||||
# $AudioLang_1 = "1:en"
|
||||
# $AudioTrack_1_default = "1:yes"
|
||||
|
||||
# # Only One subtitle track : n°2
|
||||
# $SubTrackName_1 = "3:English SDH - SRT"
|
||||
# $SubTrackLang_1 = "3:en"
|
||||
# $SubTrack_1_default = "3:yes"
|
||||
# $sub_charset_1 = "3:UTF-8"
|
||||
# # Define track order
|
||||
# $track_order = "1:0,0:1,0:3"
|
||||
# # Define subtitles track to keep
|
||||
# $subtitle_tracks = "3"
|
||||
|
||||
$VideoTrackName = "Defiance - S03E01-E02 - 720p.HDTV.x265-10bits-DIMENSION--Reencoded"
|
||||
break
|
||||
}
|
||||
"MY_FILE_WITH_EXCEPTION_2" {
|
||||
# # Track 1 = Audio n°1
|
||||
# # Name and language of Audio Track n°1
|
||||
# $AudioTrackName_1 = "1:English - AAC 2.0"
|
||||
# $AudioLang_1 = "1:en"
|
||||
# $AudioTrack_1_default = "1:yes"
|
||||
|
||||
# # Only One subtitle track : n°2
|
||||
# $SubTrackName_1 = "2:English - SRT"
|
||||
# $SubTrackLang_1 = "2:en"
|
||||
# $SubTrack_1_default = "2:yes"
|
||||
# $sub_charset_1 = "2:UTF-8"
|
||||
# # Define track order
|
||||
# $track_order = "1:0,0:1,0:2"
|
||||
# # Define subtitles track to keep
|
||||
# $subtitle_tracks = "2"
|
||||
|
||||
$VideoTrackName = "Defiance - S02S02E12-E13 - PROPER.720p.HDTV.x265-10bits-KILLERS--Reencoded"
|
||||
|
||||
break
|
||||
}
|
||||
#Default state
|
||||
Default {
|
||||
# If not an exception, we don't want to modify the variables
|
||||
# $SubTrackName_1 = "3:English SDH - SRT"
|
||||
# $SubTrackLang_1 = "3:eng"
|
||||
# $SubTrack_1_default = "3:yes"
|
||||
# $sub_charset_1 = "3:UTF-8"
|
||||
# # Define track order
|
||||
# $track_order = "1:0,0:1,0:3"
|
||||
# # Define subtitles track to keep
|
||||
# $subtitle_tracks = "3"
|
||||
break
|
||||
}
|
||||
}
|
||||
#########################################################
|
||||
|
||||
# Set Output File Name
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
}
|
||||
elseif ($merged_SUFFIX_name -eq "False") {
|
||||
# $Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
$Output = "$destinationDirectory" + "\" + "$VideoTrackName" + ".mkv"
|
||||
}
|
||||
else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -ForegroundColor "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -ForegroundColor "white"
|
||||
Exit
|
||||
}
|
||||
# write-host "Output file will be :" -ForegroundColor "white"
|
||||
# write-host "$Output" -ForegroundColor "white"
|
||||
# write-host "--" -ForegroundColor "white"
|
||||
|
||||
if ( $NB_External_SUB -ne 0 ) {
|
||||
|
||||
# First external SRT to include
|
||||
$SRT_1_Name = $MKV_1_name + ".$SubExtension_1"
|
||||
$SRT_1 = $sourceDirectory_1 + "\" + $SRT_1_name
|
||||
|
||||
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --no-video --no-subtitles"
|
||||
if ( $no_attachements -eq $true ) {
|
||||
$MKVMerge_param_start += " --no-attachments"
|
||||
}
|
||||
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param `"$MKV_1`""
|
||||
$MKVMerge_param_mkv2 = "--no-audio --no-track-tags --no-global-tags --language 0:en --track-name `"0:$VideoTrackName`" --default-track 0:yes --no-subtitles --no-audio `"$MKV_2`""
|
||||
|
||||
$MKVMerge_param_srt1 = "--sub-charset $Extsub_charset_1 --language $ExtSubTrackLang_1 --track-name `"$ExtSubTrackName_1`" --default-track $ExtSubTrack_1_default `"$SRT_1`""
|
||||
|
||||
$MKVMerge_param_srt_all = "$MKVMerge_param_srt1"
|
||||
|
||||
if ( $NB_External_SUB -eq 2 ) {
|
||||
# Second external SRT to include
|
||||
$SRT_2_Name = $MKV_1_name + ".$SubExtension_2"
|
||||
$SRT_2 = $sourceDirectory_1 + "\" + $SRT_2_name
|
||||
|
||||
$MKVMerge_param_srt2 = "--sub-charset $Extsub_charset_2 --language $ExtSubTrackLang_2 --track-name `"$ExtSubTrackName_2`" --default-track $ExtSubTrack_2_default `"$SRT_2`""
|
||||
$MKVMerge_param_srt_all += " $MKVMerge_param_srt2"
|
||||
}
|
||||
|
||||
$MKVMerge_param_all = "$MKVMerge_param_start $MKVMerge_param_mkv1 $MKVMerge_param_mkv2 $MKVMerge_param_srt_all"
|
||||
|
||||
}
|
||||
else {
|
||||
# INTERNAL SUB to keep
|
||||
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --subtitle-tracks $subtitle_tracks --no-video"
|
||||
if ( $Internal_SUB -eq $true ) {
|
||||
# There is some internal subtitles to keep
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param $MKVMerge_sub_param `"$MKV_1`""
|
||||
}
|
||||
else {
|
||||
# There is no internal subtitles to keep
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param `"$MKV_1`""
|
||||
}
|
||||
$MKVMerge_param_mkv2 = "--no-audio --no-track-tags --no-global-tags --language 0:en --track-name `"0:$VideoTrackName`" --default-track 0:yes --no-subtitles --no-audio `"$MKV_2`""
|
||||
|
||||
$MKVMerge_param_all = "$MKVMerge_param_start $MKVMerge_param_mkv1 $MKVMerge_param_mkv2"
|
||||
|
||||
# ##################
|
||||
# Debug
|
||||
# Write-Host "$MKVMerge_param_start" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "$MKVMerge_audio_param" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "$MKVMerge_sub_param" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "$MKVMerge_param_mkv2" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "$MKVMerge_param_all" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# Write-Host "Commande qui sera lancée :" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
|
||||
# Write-Host "& $MKVMerge" "$MKVMerge_param_all" -ForegroundColor "black" -BackgroundColor "DarkGray"
|
||||
# ##################
|
||||
}
|
||||
|
||||
# Last step to command construction
|
||||
$command = "& $MKVMerge $MKVMerge_param_all"
|
||||
# Launch begin...
|
||||
Invoke-Expression $command
|
||||
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "Fin du traitement du fichier n° $compteur / $Count_1." -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
if ( $move_mkv1_after_merge -eq $true ) {
|
||||
Move-Item -Path $MKV_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $NB_External_SUB -ne 0 ) {
|
||||
Move-Item -Path $SRT_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $NB_External_SUB -eq 2 ) {
|
||||
Move-Item -Path $SRT_2 -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $move_mkv2_after_merge -eq $true ) {
|
||||
Move-Item -Path $MKV_2 -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
}
|
||||
}
|
||||
Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
$compteur++
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ##############################
|
||||
# Command History
|
||||
#
|
||||
# internal Subtitles :
|
||||
# two subtiles to keep :
|
||||
#& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" --subtitle-tracks "$subtitle_tracks" -o "$Output" --no-video --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default" "$MKV_1" --no-audio --no-track-tags --no-global-tags --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --no-subtitles --no-audio "$MKV_2"
|
||||
|
||||
# Only one subtitles to keep
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" --subtitle-tracks "$subtitle_tracks" -o "$Output" --no-video --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" "$MKV_1" --no-audio --no-track-tags --no-global-tags --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --no-subtitles --no-audio "$MKV_2"
|
||||
#
|
||||
#
|
||||
# External Subtitles
|
||||
# # 1 SRT
|
||||
# & $MKVMerge --output "$Output" --title "$VideoTrackName" --track-order "$track_order" --no-video --no-subtitles --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" "$MKV_1" --no-audio --no-track-tags --no-global-tags --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" "$MKV_2" --sub-charset "$Extsub_charset_1" --language "$ExtSubTrackLang_1" --track-name "$ExtSubTrackName_1" --default-track "$ExtSubTrack_1_default" "$SRT_1"
|
||||
#
|
||||
# # 2 SRTs
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --no-video --no-subtitles --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" "$MKV_1" --no-audio --no-track-tags --no-global-tags --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" "$MKV_2" --sub-charset "$ExtSub_charset_1" --language "$ExtSubTrackLang_1" --track-name "$ExtSubTrackName_1" --default-track "$ExtSubTrack_1_default" "$SRT_1" --sub-charset "$ExtSub_charset_2" --language "$ExtSubTrackLang_2" --track-name "$ExtSubTrackName_2" --default-track "$ExtSubTrack_2_default" "$SRT_2"
|
||||
|
||||
}
|
332
Scripts-Divers/Batch Remove Sub but all selected.ps1
Normal file
@ -0,0 +1,332 @@
|
||||
# ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
# │ Powershell Script │
|
||||
# │ │
|
||||
# │ Objective : to keep up to 2 internal subtiles form a MKV and adding 1 or 2 external SRT. │
|
||||
# │ │
|
||||
# │ Configure : │
|
||||
# │ - the Audio_ variables │
|
||||
# │ - the ExtSubTrack_ variables │
|
||||
# │ - All variables before the function Get-SubID │
|
||||
# │ - The Track ID in the function Get-SubID + the filename for those track ID │
|
||||
# └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
Clear-Host
|
||||
|
||||
# Set MKVMerge.exe Path
|
||||
$MKVMerge = "`"H:\z_MKV\mkvtoolnix\mkvmerge.exe`""
|
||||
# For the parameters to pass to MKVMerge executable, will be construct
|
||||
|
||||
$sourceDirectory_1 = "PATH_TO_SOURCE_1"
|
||||
$destinationDirectory = "PATH_TO_DESTINATION"
|
||||
|
||||
# Remove dots before the season or the resolution ?
|
||||
$remove_dots = $true
|
||||
# If there is the year in the title, set it to $true
|
||||
$set_year_with_brackets = $false
|
||||
# $chain_to_search = ''
|
||||
# $chain__to_replace = ''
|
||||
$chain_to_search = '(.*) S(\d{2})E(\d{2}).(.*)'
|
||||
$chain__to_replace = '$1 - S$2E$3 - $4--Custom'
|
||||
|
||||
# Move MKV1 (and SRT) to Not-Merged folder ? Set to $false or $true
|
||||
$move_mkv1_after_merge = $true
|
||||
|
||||
# ================== AUDIO ================== Common for all videos
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Japonais - AAC 2.0"
|
||||
$AudioLang_1 = "1:ja" # en for english / fr for french / ja for japanese
|
||||
$AudioTrack_1_default = "1:yes"
|
||||
# Define track order. Do not modify it unless you changed the track number in this section
|
||||
$track_order = "0:0,0:1"
|
||||
|
||||
# ================================================================
|
||||
|
||||
# To keep or not internal subtitles
|
||||
$keep_internal_Sub = $false
|
||||
# NOTE : Internal SUB always came first in the track order !
|
||||
|
||||
# ===========================================
|
||||
# ================== Internal SUB ? =========
|
||||
$Internal_SUB_Number = 2 # Works only if $External_SUB = $true
|
||||
# Max 2 Internal SRT is configured in the script.
|
||||
# If set to 2, must be 2 SRT configured
|
||||
$SubTrackName_1 = "Français - SRT"
|
||||
$SubTrackLang_1 = "fr" # en for english / fr for french / jp for japanese
|
||||
$SubTrack_1_default = "yes"
|
||||
$sub_charset_1 = "UTF-8"
|
||||
|
||||
$SubTrackName_2 = "English SDH - SRT"
|
||||
$SubTrackLang_2 = "en" # en for english / fr for french / jp for japanese
|
||||
$SubTrack_2_default = "no"
|
||||
$sub_charset_2 = "UTF-8"
|
||||
|
||||
# ===========================================
|
||||
|
||||
|
||||
# ===========================================
|
||||
# ================== External SUB ? =========
|
||||
# Must have the same name as MKV1
|
||||
$External_SUB = $true
|
||||
$External_SUB_Number = 1 # Works only if $External_SUB = $true
|
||||
# Max 2 External SRT is configured in the script.
|
||||
# If set to 2, must be 2 SRT configured
|
||||
# Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension_1 = 'fre.srt'
|
||||
$SubExtension_2 = 'fre.srt'
|
||||
|
||||
#### FILE 2 - SRT_1 - Keeping all but the video (audio + chapters tags)
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_1 = "0:Français - SRT"
|
||||
$ExtSubTrackLang_1 = "0:fr"
|
||||
$ExtSubTrack_1_default = "0:yes"
|
||||
$ExtSub_charset_1 = "0:UTF-8"
|
||||
|
||||
#### FILE 3 - SRT_2 - Keeping all but the video (audio + chapters tags)
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$ExtSubTrackName_2 = "0:Français - SRT"
|
||||
$ExtSubTrackLang_2 = "0:fr"
|
||||
$ExtSubTrack_2_default = "0:no"
|
||||
$ExtSub_charset_2 = "0:UTF-8"
|
||||
|
||||
# Define track order - DO NOT TOUCH
|
||||
$track_order_EXT_sub = ""
|
||||
if ( $External_SUB -eq $true ) {
|
||||
if ( $External_SUB_Number -eq 1 ) {
|
||||
$track_order_EXT_sub += ",1:0"
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
$track_order_EXT_sub += ",2:0"
|
||||
}
|
||||
}
|
||||
}
|
||||
# ===========================================
|
||||
|
||||
function Get-SubID { # FOR INTERNAL SUB !
|
||||
param ( # sub_1_id for 1st sub to keep
|
||||
$file_name # sub_2_id for 2nd sub to keep
|
||||
)
|
||||
|
||||
switch ($file_name)
|
||||
{
|
||||
"FILE1"
|
||||
{
|
||||
$sub_1_id = "4"
|
||||
$sub_2_id = "5"
|
||||
break
|
||||
}
|
||||
"FILE2"
|
||||
{
|
||||
$sub_1_id = "5"
|
||||
$sub_2_id = "6"
|
||||
break
|
||||
}
|
||||
#Default state
|
||||
Default
|
||||
{
|
||||
Write-Host "This file is not set in the script : $file_name" -ForegroundColor "red"
|
||||
Write-Host "End of script..." -ForegroundColor "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
return $sub_1_id, $sub_2_id
|
||||
}
|
||||
|
||||
#Process
|
||||
$MKV_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1 = $MKV_1_List.count
|
||||
Write-Host "$Count_1 MKV's to be processed in $sourceDirectory_1."
|
||||
|
||||
# Testing if the Done_Remerged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_1 = $sourceDirectory_1 + "\Done_Remerged"
|
||||
If(!(test-path $Path_Folder_NotMerged_1)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged_1 -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
# #########################
|
||||
# Check if there is the same number of .srt files as .mkv files
|
||||
if ( $External_SUB -eq $true ) {
|
||||
if ( $External_SUB_Number -ge 1 ) { # If $NB_External_SUB >= 1 (include =1 and =2)
|
||||
$SRT_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_1" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1_SRT = $SRT_1_List.count
|
||||
Write-Host "$Count_1_SRT SRT's ($SubExtension_1) to be processed in $sourceDirectory_1."
|
||||
if ($Count_1 -eq $Count_1_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°1 files ($SubExtension_1) in this folder. Let's continue."
|
||||
} else {
|
||||
Write-Host "The number of MKV and SRT n°1 files isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
if ( $External_SUB_Number -eq 2 ) { # Only if $External_SUB_Number = 2
|
||||
$SRT_2_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension_2" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2_SRT = $SRT_2_List.count
|
||||
Write-Host "$Count_2_SRT SRT's ($SubExtension_2) to be processed in $sourceDirectory_1."
|
||||
|
||||
if ($Count_1 -eq $Count_2_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT n°2 files ($SubExtension_2) in this folder. Let's continue."
|
||||
} else {
|
||||
Write-Host "The number of MKV and SRT n°2 files ($SubExtension_2) isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
}
|
||||
# #########################
|
||||
|
||||
$compteur = 1
|
||||
|
||||
Foreach ($MKV_1 in $MKV_1_List) {
|
||||
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "Traitement du fichier n° $compteur / $Count_1..." -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
# Clear variables
|
||||
$MKVMerge_param_start = ""
|
||||
$MKVMerge_param_mkv1 = ""
|
||||
$MKVMerge_param_srt1 = ""
|
||||
$MKVMerge_param_srt2 = ""
|
||||
$MKVMerge_param_all = ""
|
||||
$MKVMerge_sub_param = ""
|
||||
$SRT_1_Name = ""
|
||||
$SRT_2_Name = ""
|
||||
$SRT_1 = ""
|
||||
$SRT_2 = ""
|
||||
|
||||
$FormatName_1 = (Get-Item $MKV_1).Basename
|
||||
$MKV_1_name = $FormatName_1.ToString()
|
||||
|
||||
# Title for the video track and for the destination file
|
||||
$VideoTrackName = $MKV_1_name
|
||||
if ( $set_year_with_brackets -eq $true ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '(\d{4}(?=.*S\d{2}E\d{2}))', '($1)'
|
||||
}
|
||||
if ( $remove_dots -eq $true ) {
|
||||
$VideoTrackName = $VideoTrackName -replace '\.(?=.*S\d{2}E\d{2})', ' '
|
||||
}
|
||||
$VideoTrackName = $VideoTrackName -replace $chain_to_search, $chain__to_replace
|
||||
$VideoTrackName = "$VideoTrackName"
|
||||
Write-Host "`tThe Video Track Name will be : `r`n`t`t $VideoTrackName" -ForegroundColor "green"
|
||||
|
||||
$Output = "$destinationDirectory" + "\" + "$VideoTrackName" + ".mkv"
|
||||
|
||||
|
||||
# DO NOT TOUCH - Common for all files
|
||||
$MKVMerge_audio_param = "--language $AudioLang_1 --track-name `"$AudioTrackName_1`" --default-track $AudioTrack_1_default"
|
||||
|
||||
if (( $keep_internal_Sub -eq $true ) -and ( $Internal_SUB_Number -ne 0 )) {
|
||||
|
||||
$sub_1_id, $sub_2_id = Get-SubID $MKV_1_name
|
||||
|
||||
# Track 2 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = $sub_1_id + ":$SubTrackName_1"
|
||||
$SubTrackLang_1 = $sub_1_id + ":$SubTrackLang_1"
|
||||
$SubTrack_1_default = $sub_1_id + ":$SubTrack_1_default"
|
||||
$sub_charset_1 = $sub_1_id + ":$sub_charset_1"
|
||||
# Define track order
|
||||
$track_order += ",0:" + $sub_1_id
|
||||
$subtitle_tracks = "$sub_1_id"
|
||||
$MKVMerge_sub_param = "--sub-charset $sub_charset_1 --language $SubTrackLang_1 --track-name `"$SubTrackName_1`" --default-track $SubTrack_1_default"
|
||||
|
||||
if ( $Internal_SUB_Number -eq 2 ) {
|
||||
# Track 3 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_2 = $sub_2_id + ":$SubTrackName_2"
|
||||
$SubTrackLang_2 = $sub_2_id + ":$SubTrackLang_2"
|
||||
$SubTrack_2_default = $sub_2_id + ":$SubTrack_2_default"
|
||||
$sub_charset_2 = $sub_2_id + ":$sub_charset_2"
|
||||
# Define track order
|
||||
$track_order += ",0:" + $sub_2_id
|
||||
$subtitle_tracks += ",$sub_2_id"
|
||||
$MKVMerge_sub_param += " --sub-charset $sub_charset_2 --language $SubTrackLang_2 --track-name `"$SubTrackName_2`" --default-track $SubTrack_2_default"
|
||||
}
|
||||
}
|
||||
elseif (( $keep_internal_Sub -eq $true ) -and ( $Internal_SUB_Number -eq 0 )) {
|
||||
write-host "Problem with `$keep_internal_Sub=$keep_internal_Sub and `$Internal_SUB_Number=$Internal_SUB_Number.`nIf `$keep_internal_Sub=true, `$Internal_SUB_Number should have a value different from 0 !" -ForegroundColor "Red"
|
||||
exit
|
||||
}
|
||||
|
||||
if ( ( $External_SUB_Number -ne 0 ) -and ( $External_SUB -eq $true ) ) {
|
||||
|
||||
# First external SRT to include
|
||||
$SRT_1_Name = $MKV_1_name + ".$SubExtension_1"
|
||||
$SRT_1 = $sourceDirectory_1 + "\" + $SRT_1_name
|
||||
|
||||
$track_order += $track_order_EXT_sub
|
||||
|
||||
$MKVMerge_param_srt1 = "--sub-charset $Extsub_charset_1 --language $ExtSubTrackLang_1 --track-name `"$ExtSubTrackName_1`" --default-track $ExtSubTrack_1_default `"$SRT_1`""
|
||||
$MKVMerge_param_srt_all = "$MKVMerge_param_srt1"
|
||||
if ( $External_SUB_Number -eq 2 ) {
|
||||
# Second external SRT to include
|
||||
$SRT_2_Name = $MKV_1_name + ".$SubExtension_2"
|
||||
$SRT_2 = $sourceDirectory_1 + "\" + $SRT_2_name
|
||||
|
||||
$MKVMerge_param_srt2 = "--sub-charset $Extsub_charset_2 --language $ExtSubTrackLang_2 --track-name `"$ExtSubTrackName_2`" --default-track $ExtSubTrack_2_default `"$SRT_2`""
|
||||
$MKVMerge_param_srt_all += " $MKVMerge_param_srt2"
|
||||
}
|
||||
|
||||
if ( $keep_internal_Sub -eq $false ) {
|
||||
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --no-subtitles --track-name `"0:$VideoTrackName`" --default-track 0:yes"
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param `"$MKV_1`""
|
||||
$MKVMerge_param_all = "$MKVMerge_param_start $MKVMerge_param_mkv1 $MKVMerge_param_srt_all"
|
||||
}
|
||||
else {
|
||||
$MKVMerge_param_start = "--output `"$Output`" --title `"$VideoTrackName`" --track-order `"$track_order`" --subtitle-tracks $subtitle_tracks --track-name `"0:$VideoTrackName`" --default-track 0:yes"
|
||||
$MKVMerge_param_mkv1 = "$MKVMerge_audio_param $MKVMerge_sub_param `"$MKV_1`""
|
||||
$MKVMerge_param_all = "$MKVMerge_param_start $MKVMerge_param_mkv1 $MKVMerge_param_srt_all"
|
||||
}
|
||||
}
|
||||
elseif (( $External_SUB_Number -eq 0 ) -and ( $External_SUB -eq $true )) {
|
||||
write-host "Problem with `$External_SUB_Number=$External_SUB_Number and `$External_SUB=$External_SUB.`nIf `$External_SUB=true, `$External_SUB_Number should have a value different from 0 !" -ForegroundColor "Red"
|
||||
exit
|
||||
}
|
||||
|
||||
# To modify a SubTrackName after previous operation... :
|
||||
# if ( $MKV_1_name -eq "BLABLA" ) {
|
||||
# $SubTrackName_2 = $sub_2_id + ":Français Québécois - SRT"
|
||||
# }
|
||||
|
||||
# Write-Host "`$MKVMerge_param_start = $MKVMerge_param_start" -ForegroundColor "White"
|
||||
# Write-Host "`$MKVMerge_param_mkv1 = $MKVMerge_param_mkv1" -ForegroundColor "White"
|
||||
# Write-Host "`$MKVMerge_param_all = $MKVMerge_param_all" -ForegroundColor "White"
|
||||
|
||||
# Last step to command construction
|
||||
$command = "& $MKVMerge $MKVMerge_param_all"
|
||||
# Launch begin...
|
||||
Invoke-Expression $command
|
||||
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "Fin du traitement du fichier n° $compteur / $Count_1." -ForegroundColor "black" -BackgroundColor "white"
|
||||
Write-Host "" -ForegroundColor "black" -BackgroundColor "white"
|
||||
|
||||
If (-Not (Test-Path $Output) ) {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
else {
|
||||
if ( $move_mkv1_after_merge -eq $true ) {
|
||||
Move-Item -Path $MKV_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $NB_External_SUB -ne 0 ) {
|
||||
Move-Item -Path $SRT_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
if ( $NB_External_SUB -eq 2 ) {
|
||||
Move-Item -Path $SRT_2 -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$compteur++
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer un MKV en ne gardant que 2 pistes de sous-titres SRT et les 2 pistes audio ##
|
||||
## en spécifiant un nom pour chaque piste et en permettant de paramétrer celles par défaut ##
|
||||
## ainsi que l'odre des pistes ##
|
||||
## Le MKV de base contient 2 ou 3 pistes SRT. On en garde que 2. ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE\2ST"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Track 0 = video
|
||||
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Français - AC3 5.1"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:no"
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name of Audio Track n°2
|
||||
$AudioTrackName_2 = "2:English - AC3 5.1"
|
||||
$AudioLang_2 = "2:en"
|
||||
$AudioTrack_2_default = "2:yes"
|
||||
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 3 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "3:FR Complet - SRT"
|
||||
$SubTrackLang_1 = "3:fr"
|
||||
$SubTrack_1_default = "3:no"
|
||||
$sub_charset_1 = "3:UTF-8"
|
||||
|
||||
# Track 4 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°2 + Sync Value
|
||||
$SubTrackName_2 = "5:ENG SDH - SRT"
|
||||
$SubTrackLang_2 = "5:en"
|
||||
$SubTrack_2_default = "5:yes"
|
||||
$sub_charset_2 = "5:UTF-8"
|
||||
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "0:0,0:2,0:1,0:5,0:3"
|
||||
# Define subtitles track to keep
|
||||
$subtitle_tracks = "3,5"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process - Grab the list of all MKV file in the folder
|
||||
$MKV_List = Get-ChildItem $sourceDirectory -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $MKV_List.count
|
||||
Write-Host "$Count MKV's to be processed in $sourceDirectory."
|
||||
|
||||
Foreach ($MKV_file in $MKV_List) {
|
||||
#Get File Name
|
||||
$FormatName = $MKV_file.ToString()
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-(4))
|
||||
$MKV = $FormatName
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = ((Get-Item $MKV).Basename).ToString()
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute : Merge SRT with MKV
|
||||
#& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
# Delete PGS subtitles in MKV keeping all the rest
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes"
|
||||
# --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default"
|
||||
# --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default"
|
||||
# --sub-charset "3:UTF-8" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default"
|
||||
# --sub-charset "4:UTF-8" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default"
|
||||
# --sub-charset "5:UTF-8" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default"
|
||||
# "$MKV"
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default" "$MKV"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
#Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer un MKV en ne gardant que 3 pistes de sous-titres SRT et les 2 pistes audio ##
|
||||
## en spécifiant un nom pour chaque piste et en permettant de paramétrer celles par défaut ##
|
||||
## ainsi que l'odre des pistes ##
|
||||
## Le MKV de base contient 3 pistes SRT. On en garde que 3. ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE\3ST"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Track 0 = video
|
||||
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Français - AC3 5.1"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:no"
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name of Audio Track n°2
|
||||
$AudioTrackName_2 = "2:English - AC3 5.1"
|
||||
$AudioLang_2 = "2:en"
|
||||
$AudioTrack_2_default = "2:yes"
|
||||
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 3 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "3:FR Forcé - SRT"
|
||||
$SubTrackLang_1 = "3:fr"
|
||||
$SubTrack_1_default = "3:no"
|
||||
$sub_charset_1 = "3:UTF-8"
|
||||
|
||||
# Track 4 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°2 + Sync Value
|
||||
$SubTrackName_2 = "4:FR Complet - SRT"
|
||||
$SubTrackLang_2 = "4:fr"
|
||||
$SubTrack_2_default = "4:no"
|
||||
$sub_charset_2 = "4:UTF-8"
|
||||
|
||||
# Track 5 = Sub n°3 to keep
|
||||
# Name and language of Subtitle Track n°3 + Sync Value
|
||||
$SubTrackName_3 = "5:ENG Full - SRT"
|
||||
$SubTrackLang_3 = "5:en"
|
||||
$SubTrack_3_default = "5:yes"
|
||||
$sub_charset_3 = "5:UTF-8"
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "0:0,0:2,0:1,0:5,0:4,0:3"
|
||||
# Define subtitles track to keep
|
||||
$subtitle_tracks = "3,4,5"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process - Grab the list of all MKV file in the folder
|
||||
$MKV_List = Get-ChildItem $sourceDirectory -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $MKV_List.count
|
||||
Write-Host "$Count MKV's to be processed in $sourceDirectory."
|
||||
|
||||
Foreach ($MKV_file in $MKV_List) {
|
||||
#Get File Name
|
||||
$FormatName = $MKV_file.ToString()
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-(4))
|
||||
$MKV = $FormatName
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = ((Get-Item $MKV).Basename).ToString()
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute : Merge SRT with MKV
|
||||
#& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
# Delete PGS subtitles in MKV keeping all the rest
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes"
|
||||
# --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default"
|
||||
# --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default"
|
||||
# --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default"
|
||||
# --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default"
|
||||
# --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default"
|
||||
# "$MKV"
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default" --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default" "$MKV"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
#Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer un MKV en ne gardant que 3 pistes de sous-titres SRT et les 2 pistes audio ##
|
||||
## en spécifiant un nom pour chaque piste et en permettant de paramétrer celles par défaut ##
|
||||
## ainsi que l'odre des pistes ##
|
||||
## Le MKV de base contient 4 pistes SRT. On en garde que 3. ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE\4ST"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Track 0 = video
|
||||
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Français - AC3 5.1"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:no"
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name of Audio Track n°2
|
||||
$AudioTrackName_2 = "2:English - AC3 5.1"
|
||||
$AudioLang_2 = "2:en"
|
||||
$AudioTrack_2_default = "2:yes"
|
||||
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 3 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "3:FR Forcé - SRT"
|
||||
$SubTrackLang_1 = "3:fr"
|
||||
$SubTrack_1_default = "3:no"
|
||||
$sub_charset_1 = "3:UTF-8"
|
||||
#$SubSYNCvalue_1 = "0000"
|
||||
|
||||
# Track 4 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°2 + Sync Value
|
||||
$SubTrackName_2 = "4:FR Complet - SRT"
|
||||
$SubTrackLang_2 = "4:fr"
|
||||
$SubTrack_2_default = "4:no"
|
||||
$sub_charset_2 = "4:UTF-8"
|
||||
#$SubSYNCvalue_2 = "0000"
|
||||
|
||||
# Track 6 = Sub n°3 to keep
|
||||
# Name and language of Subtitle Track n°3 + Sync Value
|
||||
$SubTrackName_3 = "6:ENG SDH - SRT"
|
||||
$SubTrackLang_3 = "6:en"
|
||||
$SubTrack_3_default = "6:yes"
|
||||
$sub_charset_3 = "6:UTF-8"
|
||||
#$SubSYNCvalue_3 = "0000"
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "0:0,0:2,0:1,0:6,0:3,0:4"
|
||||
# Define subtitles track to keep
|
||||
$subtitle_tracks = "3,4,6"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process - Grab the list of all MKV file in the folder
|
||||
$MKV_List = Get-ChildItem $sourceDirectory -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $MKV_List.count
|
||||
Write-Host "$Count MKV's to be processed in $sourceDirectory."
|
||||
|
||||
Foreach ($MKV_file in $MKV_List) {
|
||||
#Get File Name
|
||||
$FormatName = $MKV_file.ToString()
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-(4))
|
||||
$MKV = $FormatName
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = ((Get-Item $MKV).Basename).ToString()
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute : Merge SRT with MKV
|
||||
#& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
# Delete PGS subtitles in MKV keeping all the rest
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes"
|
||||
# --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default"
|
||||
# --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default"
|
||||
# --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default"
|
||||
# --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default"
|
||||
# --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default"
|
||||
# "$MKV"
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:und" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default" --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default" "$MKV"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
#Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
@ -0,0 +1,157 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer un MKV en ne gardant que 3 pistes de sous-titres SRT et les 2 pistes audio ##
|
||||
## en spécifiant un nom pour chaque piste et en permettant de paramétrer celles par défaut ##
|
||||
## ainsi que l'odre des pistes ##
|
||||
## Le MKV de base contient 5 pistes SRT. On en garde que 3. ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE\5ST"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Track 0 = video
|
||||
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Français - AC3 5.1"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:no"
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name of Audio Track n°2
|
||||
$AudioTrackName_2 = "2:English - AC3 5.1"
|
||||
$AudioLang_2 = "2:en"
|
||||
$AudioTrack_2_default = "2:yes"
|
||||
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 3 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "3:FR Forcé - SRT"
|
||||
$SubTrackLang_1 = "3:fr"
|
||||
$SubTrack_1_default = "3:no"
|
||||
$sub_charset_1 = "3:UTF-8"
|
||||
|
||||
# Track 4 = Sub n°2 to keep
|
||||
# Name and language of Subtitle Track n°2 + Sync Value
|
||||
$SubTrackName_2 = "4:FR Complet - SRT"
|
||||
$SubTrackLang_2 = "4:fr"
|
||||
$SubTrack_2_default = "4:no"
|
||||
$sub_charset_2 = "4:UTF-8"
|
||||
|
||||
# Track 7 = Sub n°3 to keep
|
||||
# Name and language of Subtitle Track n°3 + Sync Value
|
||||
$SubTrackName_3 = "7:ENG SDH - SRT"
|
||||
$SubTrackLang_3 = "7:en"
|
||||
$SubTrack_3_default = "7:yes"
|
||||
$sub_charset_3 = "7:UTF-8"
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "0:0,0:2,0:1,0:7,0:3,0:4"
|
||||
# Define subtitles track to keep
|
||||
$subtitle_tracks = "3,4,7"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process - Grab the list of all MKV file in the folder
|
||||
$MKV_List = Get-ChildItem $sourceDirectory -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $MKV_List.count
|
||||
Write-Host "$Count MKV's to be processed in $sourceDirectory."
|
||||
|
||||
Foreach ($MKV_file in $MKV_List) {
|
||||
#Get File Name
|
||||
$FormatName = $MKV_file.ToString()
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-(4))
|
||||
$MKV = $FormatName
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = ((Get-Item $MKV).Basename).ToString()
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute : Merge SRT with MKV
|
||||
#& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
# Delete PGS subtitles in MKV keeping all the rest
|
||||
# & $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes"
|
||||
# --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default"
|
||||
# --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default"
|
||||
# --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default"
|
||||
# --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default"
|
||||
# --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default"
|
||||
# "$MKV"
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --subtitle-tracks "$subtitle_tracks" --language "0:und" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" --language "$AudioLang_2" --track-name "$AudioTrackName_2" --default-track "$AudioTrack_2_default" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" --sub-charset "$sub_charset_2" --language "$SubTrackLang_2" --track-name "$SubTrackName_2" --default-track "$SubTrack_2_default" --sub-charset "$sub_charset_3" --language "$SubTrackLang_3" --track-name "$SubTrackName_3" --default-track "$SubTrack_3_default" "$MKV"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
#Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
120
Scripts-Divers/OLD/Batch Merge Subtitles with MKVMerge - OLD.ps1
Normal file
@ -0,0 +1,120 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "English AC3 5.1"
|
||||
$AudioLang_1 = "en"
|
||||
|
||||
# Name of Audio Track n°2
|
||||
$AudioTrackName_2 = "Français AC3 2.0"
|
||||
$AudioLang_2 = "fr"
|
||||
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "English SRT"
|
||||
$SubTrackLang_1 = "en"
|
||||
# Leave this at "0000" if no synchronisation modifier is to used, otherwise it's in ms
|
||||
# +xxxx to delay the display of subtitles of xxxx ms
|
||||
# -xxxx to advance the display of subtitles of xxxx ms
|
||||
$SubSYNCvalue_1 = "0000"
|
||||
|
||||
# Name and language of Subtitle Track n°2
|
||||
#$SubTrackName_2 = "Français SRT"
|
||||
#$SubTrackLang_2 = "fr"
|
||||
# Leave this at "0:0000" if no synchronisation modifier is to used, otherwise it's in ms :
|
||||
# 0:+xxxx to delay the display of subtitles of xxxx ms
|
||||
# 0:-xxxx to advance the display of subtitles of xxxx ms
|
||||
#$SubSYNCvalue_2 = "0:1000"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process
|
||||
$Subs = Get-ChildItem $sourceDirectory -Filter "*.$SubExtension" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $Subs.count
|
||||
Write-Host "$Count MKV's to be processed."
|
||||
|
||||
Foreach ($Sub in $Subs) {
|
||||
#Get File Name
|
||||
$FormatName = $Sub.ToString()
|
||||
#$Name = $FormatName.TrimEnd(".$SubExtension")
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-($SubExtension.Length+1))
|
||||
$MKV = $Name + '.mkv'
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = (Get-Item $MKV).Basename
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
136
Scripts-Divers/OLD/Batch Merge Subtitles with MKVMerge.ps1
Normal file
@ -0,0 +1,136 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer un MKV avec un SRT externe présent dans le même dossiers. ##
|
||||
## Il faut que ce SRT ait le même nom que le MKV, avec comme extension .eng.srt ou .fr.srt ##
|
||||
## en fonction de la langue du ST. ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory = "D:\DOSSIER_SOURCE"
|
||||
$destinationDirectory = "F:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
#$SecondSubExtension = "sub"
|
||||
|
||||
# Track 0 = video
|
||||
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:Français - AC3 5.1"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:no"
|
||||
|
||||
# Track 2 = Audio n°2
|
||||
# Name of Audio Track n°2
|
||||
# $AudioTrackName_2 = "2:English - AC3 5.1"
|
||||
# $AudioLang_2 = "2:en"
|
||||
# $AudioTrack_2_default = "2:yes"
|
||||
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 : beacause it's a SRT file
|
||||
# Name and language of Subtitle Track n°1 + Sync Value
|
||||
$SubTrackName_1 = "0:ENG SDH - SRT"
|
||||
$SubTrackLang_1 = "0:en"
|
||||
$SubTrack_1_default = "3:yes"
|
||||
$sub_charset_1 = "3:UTF-8"
|
||||
#$SubSYNCvalue_1 = "0000"
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "0:0,0:2,0:1,0:6,0:3,0:4"
|
||||
# Define subtitles track to keep
|
||||
$subtitle_tracks = "3,4,6"
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged = $sourceDirectory + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
|
||||
#Process
|
||||
$Subs = Get-ChildItem $sourceDirectory -Filter "*.$SubExtension" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count = $Subs.count
|
||||
Write-Host "$Count MKV's to be processed."
|
||||
|
||||
Foreach ($Sub in $Subs) {
|
||||
#Get File Name
|
||||
$FormatName = $Sub.ToString()
|
||||
#$Name = $FormatName.TrimEnd(".$SubExtension")
|
||||
$Name = $FormatName.Substring(0,$FormatName.Length-($SubExtension.Length+1))
|
||||
$MKV = $Name + '.mkv'
|
||||
#$OtherSub = $Name + '.' + $SecondSubExtension
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = (Get-Item $MKV).Basename
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
#Execute
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "0:0,0:1,0:2,1:0" -o "$Output" --no-subtitles --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" --language "1:$AudioLang_1" --track-name "1:$AudioTrackName_1" --default-track "1:yes" --language "2:$AudioLang_2" --track-name "2:$AudioTrackName_2" --default-track "2:no" "$MKV" --language "0:$SubTrackLang_1" --track-name "0:$SubTrackName_1" --default-track "0:yes" --sync "0:$SubSYNCvalue_1" "$Sub"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV -Destination $Path_Folder_NotMerged -Verbose
|
||||
Move-Item -Path $Sub -Destination $Path_Folder_NotMerged -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Batch Merge Subtitles with MKVMerge ##
|
||||
## By Miles ##
|
||||
## Idea from Iain McCain : https://superuser.com/a/1249870 ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Utilisation et conditions : ##
|
||||
## - Il faut que les .srt et les .mkv soient dans le même dossier. ##
|
||||
## - Il faut que les sous-titres externes .SRT aient le même nom de fichier que les .MKV. ##
|
||||
## - Il faut paramétrer l'extension des fichiers de sous-titres pour que ces derniers ##
|
||||
## reflètent la langue : eng, fre,... ##
|
||||
## - Il faudra par ailleurs modifier le code langage dans AudioLang_X et SubTrackLang_1 ##
|
||||
## Il est possible de : ##
|
||||
## - spécifier des dossiers sources et destinations identiques ou différents ##
|
||||
## - spécifier un titre de piste (pour toutes) ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Objectifs : ##
|
||||
## Remuxer deux MKV en gardant l'audio et les chapitres du premier, et seulement la vidéo ##
|
||||
## du second, en muxant en plus un SRT ayant le même nom que le 1er mkv et étant dans le même ##
|
||||
## dossier que ce 1er mkv ##
|
||||
## ##
|
||||
##==============================================================================================
|
||||
|
||||
|
||||
#Set MKVMerge.exe Path
|
||||
$MKVMerge = 'H:\z_MKV\mkvtoolnix\mkvmerge.exe'
|
||||
|
||||
#Set Source and Target directories (Don't put an \ at the end)
|
||||
$sourceDirectory_1 = "D:\DOSSIER_SOURCE-1"
|
||||
$sourceDirectory_2 = "D:\DOSSIER_SOURCE-2"
|
||||
$destinationDirectory = "G:\DOSSIER_DESTINATION"
|
||||
|
||||
#If source and destination are the same folder, set this to True, Otherwise let it to "False"
|
||||
$merged_SUFFIX_name = "False"
|
||||
|
||||
#Set Subtitle Extension (Don't add the . before the extension)
|
||||
$SubExtension = 'eng.srt'
|
||||
|
||||
#### Objective : Keep audio and subtitles and tags from FILE n°1 - Add video from FILE n°2
|
||||
|
||||
##########################################
|
||||
#### FILE 1 - MKV - Keeping all but the video (audio + chapters tags)
|
||||
# ================== AUDIO ==================
|
||||
# Track 1 = Audio n°1
|
||||
# Name and language of Audio Track n°1
|
||||
$AudioTrackName_1 = "1:English - DTS 5.1 768kb/s"
|
||||
$AudioLang_1 = "1:fr"
|
||||
$AudioTrack_1_default = "1:yes"
|
||||
$file_1_options = "--no-video"
|
||||
|
||||
##########################################
|
||||
#### FILE 2 - MKV - Keeping only the video
|
||||
$file_2_options = "--no-audio --no-track-tags --no-global-tags"
|
||||
|
||||
##########################################
|
||||
#### FILE 3 - SRT - Keeping all but the video (audio + chapters tags)
|
||||
# ================== SUBTITLES ==================
|
||||
# Track 0 = Sub n°1 to keep
|
||||
# Name and language of Subtitle Track n°0 + Sync Value
|
||||
$SubTrackName_1 = "0:English SDH - SRT"
|
||||
$SubTrackLang_1 = "0:en"
|
||||
$SubTrack_1_default = "0:yes"
|
||||
$sub_charset_1 = "0:UTF-8"
|
||||
####
|
||||
|
||||
# ================== OTHER SETTINGS ==================
|
||||
# Define track order
|
||||
$track_order = "1:0,0:1,2:0"
|
||||
# Define subtitles track to keep
|
||||
#$subtitle_tracks = "3"
|
||||
|
||||
# Files name, without .mkv :
|
||||
# format = filename_1_part_1 + S + filename_season + E + i_counter + filename_1_part_2 + .mkv
|
||||
# format = filename_2_part_1 + S + filename_season + E + i_counter + filename_2_part_2 + .mkv
|
||||
$filename_1_part_1 = "Ma série (20xx) - "
|
||||
$filename_1_part_2 = " - 1080p-h264"
|
||||
# Final name 1 = Ma série (20xx) - S01E01 - 1080p-h264
|
||||
# The SRT file must have the same name (without the extention .eng.srt)
|
||||
|
||||
$filename_2_part_1 = "Ma série (20xx) - "
|
||||
$filename_2_part_2 = " - 1080p.x265"
|
||||
# Final name 2 = Ma série (20xx) - S01E01 - 1080p.x265
|
||||
|
||||
$filename_season = "01"
|
||||
$filename_ep_start = 4
|
||||
$filename_ep_final = 4
|
||||
##==============================================================================================
|
||||
##==============================================================================================
|
||||
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_2 = $sourceDirectory_2 + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged_2)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged_2 -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
# Testing if the Not-Merged folder already exists : if yes, it will be renamed, else it will be created.
|
||||
$Path_Folder_NotMerged_1 = $sourceDirectory_1 + "\Not-Merged"
|
||||
If(!(test-path $Path_Folder_NotMerged_1)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $Path_Folder_NotMerged_1 -Verbose
|
||||
} else {
|
||||
# Don't know what's the best... TO BE IMPROVED
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
#Move-Item -Path $Path_Folder_NotMerged_2 -Destination "$sourceDirectory\Not-Merged--backup" -Verbose
|
||||
}
|
||||
|
||||
#Process
|
||||
$MKV_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$SRT_1_List = Get-ChildItem $sourceDirectory_1 -Filter "*.$SubExtension" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_1 = $MKV_1_List.count
|
||||
$Count_1_SRT = $SRT_1_List.count
|
||||
Write-Host "$Count_1 MKV's to be processed and $Count_1_SRT SRT's to be processed in $sourceDirectory_1."
|
||||
if ($Count_1 -eq $Count_1_SRT) {
|
||||
Write-Host "There is the same number of MKV and SRT file in this folder. Let's continue."
|
||||
} else {
|
||||
Write-Host "The number of MKV and SRT files isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
|
||||
$MKV_2_List = Get-ChildItem $sourceDirectory_2 -Filter "*.mkv" | ForEach-Object { $_.FullName } | Sort-Object
|
||||
$Count_2 = $MKV_2_List.count
|
||||
Write-Host "$Count_2 MKV's to be processed in $sourceDirectory_2."
|
||||
if ($Count_1 -eq $Count_2) {
|
||||
Write-Host "There is the same number of MKV in the two sources folders. Let's continue."
|
||||
} else {
|
||||
Write-Host "The number of MKV in the two sources folders isn't the same. ABORT..." -foreground "red"
|
||||
Exit
|
||||
}
|
||||
|
||||
if (!($Count_1 -eq ($filename_ep_final - $filename_ep_start + 1))) {
|
||||
Write-Host "The number of epidoes set in the script isn't the same as the number of files in the folders... EXITING NOW !" -foreground "red"
|
||||
Exit
|
||||
}
|
||||
|
||||
for ($i = $filename_ep_start; $i -lt $filename_ep_final+1; $i++) {
|
||||
|
||||
# Genreating File Name
|
||||
# format = filename_1_part_1 + S + filename_season + E + i_counter + filename_1_part_2 + .mkv
|
||||
# format = filename_2_part_1 + S + filename_season + E + i_counter + filename_2_part_2 + .mkv
|
||||
# Final name 1 = Le Bureau des Légendes (2015) - S01E01 - 1080p-h264
|
||||
# Final name 2 = Le Bureau des Légendes (2015) - S01E01 - 1080p.BDRip.x265.Aac.NoTag
|
||||
|
||||
if ($i -lt 10 ) { # i<10
|
||||
$MKV_1_name = $filename_1_part_1 + "S" + $filename_season + "E0" + $i + $filename_1_part_2
|
||||
$SRT_1_name = $MKV_1_name
|
||||
$MKV_2_name = $filename_2_part_1 + "S" + $filename_season + "E0" + $i + $filename_2_part_2
|
||||
} else { # i=10
|
||||
$MKV_1_name = $filename_1_part_1 + "S" + $filename_season + "E" + $i + $filename_1_part_2
|
||||
$SRT_1_name = $MKV_1_name
|
||||
$MKV_2_name = $filename_2_part_1 + "S" + $filename_season + "E" + $i + $filename_2_part_2
|
||||
}
|
||||
$MKV_1 = $sourceDirectory_1 + "\" + $MKV_1_name + ".mkv"
|
||||
$SRT_1 = $sourceDirectory_1 + "\" + $SRT_1_name + "." + $SubExtension
|
||||
$MKV_2 = $sourceDirectory_2 + "\" + $MKV_2_name + ".mkv"
|
||||
|
||||
# Title for the video track
|
||||
$VideoTrackName = $MKV_2_name
|
||||
|
||||
#Set Output File Name
|
||||
#$Output = $Name + '___MERGED' + '.mkv'
|
||||
If ($merged_SUFFIX_name -eq "True") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '___MERGED' + '.mkv'
|
||||
} elseif ($merged_SUFFIX_name -eq "False") {
|
||||
$Output = $destinationDirectory + "\" + $VideoTrackName + '.mkv'
|
||||
} else {
|
||||
write-host "Error in the value of the merged_SUFFIX_name variable. Current value = $merged_SUFFIX_name" -foreground "red"
|
||||
write-host "Should be set to True or False.`nScript is exiting now..." -foreground "white"
|
||||
Exit
|
||||
}
|
||||
|
||||
|
||||
#Execute
|
||||
# Keep Audio/Subtitles/tags from MKV_1 + Only video from MKV_2
|
||||
<# Command to edit
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output"
|
||||
"$file_1_options"
|
||||
--language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default"
|
||||
"$MKV_1"
|
||||
"$file_2_options"
|
||||
--language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes"
|
||||
"$MKV_2"
|
||||
--sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default"
|
||||
"$SRT_1"
|
||||
#>
|
||||
|
||||
& $MKVMerge --title "$VideoTrackName" --track-order "$track_order" -o "$Output" --no-video --language "$AudioLang_1" --track-name "$AudioTrackName_1" --default-track "$AudioTrack_1_default" "$MKV_1" --no-audio --no-track-tags --no-global-tags --language "0:en" --track-name "0:$VideoTrackName" --default-track "0:yes" "$MKV_2" --sub-charset "$sub_charset_1" --language "$SubTrackLang_1" --track-name "$SubTrackName_1" --default-track "$SubTrack_1_default" "$SRT_1"
|
||||
|
||||
If (Test-Path $Output) {
|
||||
#Clean Up
|
||||
#Remove-Item $MKV
|
||||
#Remove-Item $Sub
|
||||
#Remove-Item $OtherSub
|
||||
# Move to folder Not-Merged, this folder's existence has already been tested, and the folder is created.
|
||||
Move-Item -Path $MKV_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
Move-Item -Path $SRT_1 -Destination $Path_Folder_NotMerged_1 -Verbose
|
||||
Move-Item -Path $MKV_2 -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
#Move-Item -Path $Sub -Destination $Path_Folder_NotMerged_2 -Verbose
|
||||
|
||||
# Renaming the output file is not necessary if the output filename doesn't have __MERGED in it
|
||||
#Rename-Item -Path $Output -NewName $MKV -Verbose
|
||||
|
||||
} Else {
|
||||
write-host "File NON-EXISTANT - $Output" -foreground "red"
|
||||
"File NON-EXISTANT - $Output" | Out-File "$destinationDirectory\Errors.txt" -Append
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
# Script pour créer un certain nombre de dossiers de même nom avec un n° qui change
|
||||
|
||||
# Source : https://stackoverflow.com/questions/28631419/how-to-recursively-remove-all-empty-folders-in-powershell
|
||||
|
||||
Clear-Host
|
||||
Invoke-Command -ScriptBlock {
|
||||
$source_folder = "PATH_WHERE_TO_CREATE_FOLDERS"
|
||||
$nb_folder = 10
|
||||
# Base Name : (number will be added after with a space)
|
||||
$folder_to_create = "My Folder Base NAME"
|
||||
|
||||
function Test-Directory {
|
||||
param (
|
||||
[Parameter(Mandatory)]$path_to_verify
|
||||
)
|
||||
If (!(test-path $path_to_verify)) {
|
||||
New-Item -ItemType "Directory" -Force -Path $path_to_verify
|
||||
Write-Host "The path $path_to_verify (or one of the last subfolder) didn't exist. It has been created." -ForegroundColor "DarkBlue"
|
||||
}
|
||||
else {
|
||||
Write-Host "The path $path_to_verify already exist." -ForegroundColor "DarkBlue"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for ($i = 1 ; $i -le $nb_folder ; $i++) {
|
||||
|
||||
$folder_name = $folder_to_create + " $i"
|
||||
|
||||
# Exceptions
|
||||
if ( $folder_name -eq "My Folder Base NAME 9" ) {
|
||||
$folder_name = "My Folder Base NAME Part.1"
|
||||
}
|
||||
elseif ( $folder_name -eq "My Folder Base NAME 10" ) {
|
||||
$folder_name = "My Folder Base NAME Part.2"
|
||||
}
|
||||
|
||||
# Construction of the final folder name
|
||||
$final_folder_name = $source_folder + "\" + $folder_name
|
||||
Test-Directory $final_folder_name
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
# Script pour tester si le dossier mis en paramètre contient des dossiers vides
|
||||
# et si oui, les supprimer.
|
||||
|
||||
# Source : https://stackoverflow.com/questions/28631419/how-to-recursively-remove-all-empty-folders-in-powershell
|
||||
|
||||
Clear-Host
|
||||
Invoke-Command -ScriptBlock {
|
||||
$folder_to_check = "PATH_TO_FOLDER_CONTAINING_EMPTY_FOLDERS"
|
||||
|
||||
$dirs = Get-ChildItem $folder_to_check -Directory -Recurse | Where-Object { (Get-ChildItem $_.fullName).count -eq 0 } | Select-Object -ExpandProperty FullName
|
||||
$dirs | Foreach-Object { Write-Host "Dossier qui sera supprimer car considéré comme vide : " $_ }
|
||||
# $dirs | Foreach-Object { Remove-Item $_ }
|
||||
|
||||
}
|
141
TUTO_Git_SourceTree.md
Normal file
@ -0,0 +1,141 @@
|
||||
Tutoriel pour Git avec SourceTree <!-- omit in toc -->
|
||||
============
|
||||
Le but de ce tuto est d'expliquer comment faire des commits proprement sur le Gitea de Zoz.
|
||||
|
||||
## Table des matières <!-- omit in toc -->
|
||||
- [1. Introduction & Installation](#1-introduction-installation)
|
||||
- [1.1. Prérequis :](#1-1-prérequis)
|
||||
- [1.2. Cloner le dépôt avec SourceTree :](#1-2-cloner-le-dépôt-avec-sourcetree)
|
||||
- [1.3. Explications rapides des fonctions de SourceTree utilisées dans ce tuto](#1-3-explications-rapides-des-fonctions-de-sourcetree-utilisées-dans-ce-tuto)
|
||||
- [2. Créer une branche de travail `mon_pseudo-travail` depuis la branche `master`](#2-créer-une-branche-de-travail-mon-pseudo-travail-depuis-la-branche-master)
|
||||
- [2.1. Méthode n°1 : depuis SourceTree](#2-1-méthode-n-1-depuis-sourcetree)
|
||||
- [2.2. Méthode n°2 : depuis l'interface web de Gitea](#2-2-méthode-n-2-depuis-l-interface-web-de-gitea)
|
||||
- [3. Envoi du premier commit, et des suivants...](#3-envoi-du-premier-commit-et-des-suivants)
|
||||
- [4. Demande de fusion de notre branche `mon_pseudo-travail` avec `master`](#4-demande-de-fusion-de-notre-branche-mon-pseudo-travail-avec-master)
|
||||
|
||||
## 1. Introduction & Installation
|
||||
|
||||
Ce petit tuto va utiliser l'application SourceTree : [https://www.sourcetreeapp.com/](https://www.sourcetreeapp.com/).<br>
|
||||
J'ai essayé plusieurs clients Git pour windows et macOS, et SourceTree est le seul (parmis ceux essayés) qui offre une interface graphique assez similaire sur ces deux plateformes, et est assez facile d'utilisation. Ce tuto sera donc en partie rédigé pour utiliser cette application.
|
||||
|
||||
**Ce tuto va donc servir de guide pour contribuer au dépôt avec le moins possible de ligne de commande, voir aucune.**
|
||||
|
||||
### 1.1. Prérequis :
|
||||
|
||||
- Vous devrez aussi avoir installé Git pour windows (ou macos) : [https://git-scm.com/downloads](https://git-scm.com/downloads). Ça pourra être nécessaire si on passe par la ligne de commande.
|
||||
- Installez SourceTree. <br> Une fois Git installé, et SourceTree installé, allez dans les options de SourceTree pour vérifier que le Git utilisé est bien celui que vous venez d'installer (en externe du point de vue de SourceTree) :<br>
|
||||
[<img src="https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/SourceTree-Git-config.png" align="" height="500" />](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/SourceTree-Git-config.png)<br>
|
||||
Tous les autres paramètres étant ceux par défaut.
|
||||
|
||||
### 1.2. Cloner le dépôt avec SourceTree :
|
||||
|
||||
[<img src="https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/Capture-05.png" align="" height="500" />](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/Capture-05.png)<br>
|
||||
Une fois le dépôt cloné, on peut commencer à commiter comme un pro :D.
|
||||
Vous devriez avoir ce genre d'affichage :<br>
|
||||
[<img src="https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/Capture-06.png" align="" height="500" />](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/Tuto-Git-SourceTree/Capture-06.png)<br>
|
||||
|
||||
### 1.3. Explications rapides des fonctions de SourceTree utilisées dans ce tuto
|
||||
|
||||
Dans ce tuto, nous n'allons pas utiliser beaucoup de fonctionnalités de SourceTree, mais voilà les principales :
|
||||
|
||||
- **Bouton Valider** : permet d'afficher l'écran de validation du commit que l'on s'apprête à finaliser. On peut, et on doit, laisser un bref message indiquant sommairement ce que contient ce commit (en termes d'ajout, modification, etc...).<br>
|
||||
En ligne de commande, ce serait : `git commit -m "ma super modif"`.
|
||||
- **Bouton Récupérer** : C'est le `git pull`, ça permet de récupérer dans la branche en cours le conteneur d'une branche distante :
|
||||
- **Bouton Envoyer** : C'est le `git push`, ça permet d'envoyer les modifications locales sur le dépôt distant. En général, je préfère utiliser la case à cocher "Envoyer les modifications vers origin/ma-brancheblabla" à l'étape de validation du commit (voir plus bas).
|
||||
- **Bouton Rapatrier** : Je l'utilise lorsque je suis sur la branche `master` pour récupérer les données et enlever de SourceTree les branches distantes qui ont été supprimées.
|
||||
- **Bouton Changer de branche** : C'est avec ce bouton que je crée une nouvelle branche depuis la de départ `master`.
|
||||
|
||||
|
||||
## 2. Créer une branche de travail `mon_pseudo-travail` depuis la branche `master`
|
||||
|
||||
#### 2.1. Méthode n°1 : depuis SourceTree
|
||||
|
||||
- Il faut tout d'abord se placer sur la branche master en double cliquant dessus.<br>
|
||||

|
||||
- Ensuite, toujours choisir "Parent de la copie de travail" avant de créer la branche :<br>
|
||||

|
||||
|
||||
On est maintenant prêt à faire nos commit :<br>
|
||||

|
||||
|
||||
#### 2.2. Méthode n°2 : depuis l'interface web de Gitea
|
||||
|
||||
<br><br>
|
||||
<br><br>
|
||||
<br><br>
|
||||

|
||||
|
||||
Si vous créez votre branche depuis Gitea, il faudra l'importer dans SourceTree.
|
||||
- Pour ce faire :
|
||||
- soit vous double-cliquez sur la branche distance à rapatrier,
|
||||
- soit vous faites un clic droit dessus :<br>
|
||||

|
||||
|
||||
- Ensuite vous cochez bien la case indiquée, et laissez le nom qui s'affiche pour la branche locale, puis validez par OK :<br>
|
||||

|
||||
<br><br><br>
|
||||
|
||||
**Une fois la branche créée, vérifiez bien que cette dernière est bien sélectionnée !**
|
||||
|
||||

|
||||
|
||||
## 3. Envoi du premier commit, et des suivants...
|
||||
|
||||
Vous pouvez maintenant créer vos dossiers/fichiers, faire les modifications sur les fichiers/dossiers existants.
|
||||
|
||||
Une fois que vous arrivez à une étape clé, ou bien pour être sûr que votre travail soit "sauvegardé" sur le serveur, vous pouvez faire votre 1er commit.
|
||||
|
||||
- Cliquez sur le bouton + :<br>
|
||||

|
||||
- Puis choisissez les élements à indexer :<br>
|
||||

|
||||
- Puis pensez bien à écrire un commentaire et à cocher la case en bas pour que le commit soit envoyé sur le dépôt distant.<br>
|
||||
Cette case est l'équivalent d'un `git push`.<br>
|
||||

|
||||
|
||||
Pour la rédaction de ce tuto, j'ai fait pas mal de commits ^^. Voilà çe que ça donne avec une vue :
|
||||
|
||||

|
||||
|
||||
On voit même une branche (MilesTEG) que j'ai supprimé en cours de route... (ça rendait trop complexe la gestion des branches).
|
||||
|
||||
## 4. Demande de fusion de notre branche `mon_pseudo-travail` avec `master`
|
||||
|
||||
Une fois qu'on a fini de travailler sur notre branche, dernier commit fait, ou bien pour soumettre le travail fait à la relecture par les autres membres, on peut faire une demande de fusion.
|
||||
|
||||
Je vais illustrer cela maintenant, même si au moment où je fais la capture, le tuto n'est pas entièrement terminé.
|
||||
|
||||
- Pour faire cette demande de fusion, le plus simple est d'aller là [aller sur la page web des branches](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/branches) puis de cliquer sur le bouton "**Nouvelle demande de fusion**" de notre branche (il se peut que ce bouton s'intitule juste "**Demande de fusion**"):<br>
|
||||

|
||||
<br>
|
||||
(On voit que j'ai 12 commits dans cette branche, je ne sais pas à quoi correspond le 0...)
|
||||
|
||||
- Ensuite, on vérifie bien qu'on a la bonne branche de destination `master` (à gauche) et notre branche source `mon_pseudo-travail` :<br>
|
||||

|
||||
|
||||
- Étape suivante : (lisez le texte dans la capture)<br>
|
||||

|
||||
<br><br>
|
||||
|
||||
Si vous faites encore des commits avant de fusionner, vous les verrez apparaître à la suite des précédents et des modifications apportées à la demande de fusion (message, ajout d'étiquette, etc...):<br>
|
||||

|
||||
|
||||
- Dernière étape : Sélectionnez quelques relecteurs dans la liste<br>
|
||||

|
||||
|
||||
- Si jamais vous avez cliquez sur WIP, quand vous aurez terminé vos modifications, il faudra cliquer sur le bouton "**Enlever le préfixe WIP**" pour fusionner votre branche avec `master`.
|
||||

|
||||
<br><br>
|
||||
|
||||
Il ne vous reste plus qu'à attendre la validation par un relecteur, et qu'il fusionne votre branche avec la branche `master`.
|
||||
|
||||
À l'issue de cette fusion, votre branche sera supprimée. Si vous vouliez continuer à travailler dessus, mettez-là en statut WIP, en postant un message indiquant votre intention.
|
||||
|
||||
> :pencil2: **Note :** Si jamais vous envoyiez un nouveau commit (ou plusieurs) après que la fusion ait été faite, mais avant que la branche soit supprimée, il faudra refaire une demande de fusion.<br>
|
||||
|
||||
___
|
||||
Ça y est, c'est la fin du tutoriel :D
|
||||
|
||||
Merci d'avoir tout lu et tout suivi ;)
|
||||
|
||||
Votre avis, conseils et idées d'amélioration sont les bienvenues. Vous pouvez faire ue branche et commiter dessus ^^ ou bien me demander directement sur Discord.
|
BIN
Tuto-Git-SourceTree/Capture-01.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
Tuto-Git-SourceTree/Capture-02.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
Tuto-Git-SourceTree/Capture-03.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
Tuto-Git-SourceTree/Capture-04.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
Tuto-Git-SourceTree/Capture-05.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
Tuto-Git-SourceTree/Capture-06.png
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
Tuto-Git-SourceTree/Capture-07.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
Tuto-Git-SourceTree/Capture-08.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
Tuto-Git-SourceTree/Capture-10.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
Tuto-Git-SourceTree/Capture-11.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
Tuto-Git-SourceTree/Capture-12.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
Tuto-Git-SourceTree/Capture-14.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
Tuto-Git-SourceTree/Capture-16.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
Tuto-Git-SourceTree/Capture-17.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
Tuto-Git-SourceTree/Capture-18.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
Tuto-Git-SourceTree/Capture-19.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
Tuto-Git-SourceTree/Capture-20.png
Normal file
After Width: | Height: | Size: 132 KiB |
BIN
Tuto-Git-SourceTree/Capture-21.png
Normal file
After Width: | Height: | Size: 127 KiB |
BIN
Tuto-Git-SourceTree/Capture-22.png
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
Tuto-Git-SourceTree/Capture-23.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
Tuto-Git-SourceTree/Capture-24.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
Tuto-Git-SourceTree/SourceTree-Git-config.png
Normal file
After Width: | Height: | Size: 34 KiB |
@ -1,50 +1,65 @@
|
||||
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/mobile.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/smarttv.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/nomsdata.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/gamefake.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/jbfake.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/fakenewsde.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/adobeblock.txt
|
||||
https://raw.githubusercontent.com/Akamaru/Pi-Hole-Lists/master/other.txt
|
||||
https://justdomains.github.io/blocklists/lists/easylist-justdomains.txt
|
||||
https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/black.list
|
||||
https://www.github.developerdan.com/hosts/lists/amp-hosts-extended.txt
|
||||
https://www.github.developerdan.com/hosts/lists/tracking-aggressive-extended.txt
|
||||
https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt
|
||||
https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts
|
||||
https://v.firebog.net/hosts/static/w3kbl.txt
|
||||
https://adaway.org/hosts.txt
|
||||
https://v.firebog.net/hosts/AdguardDNS.txt
|
||||
https://www.github.developerdan.com/hosts/lists/amp-hosts-extended.txt
|
||||
https://www.github.developerdan.com/hosts/lists/tracking-aggressive-extended.txt
|
||||
https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt
|
||||
https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts
|
||||
https://v.firebog.net/hosts/static/w3kbl.txt
|
||||
https://adaway.org/hosts.txt
|
||||
https://v.firebog.net/hosts/AdguardDNS.txt
|
||||
https://v.firebog.net/hosts/Admiral.txt
|
||||
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
|
||||
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
|
||||
https://v.firebog.net/hosts/Easylist.txt
|
||||
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts
|
||||
https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts
|
||||
https://v.firebog.net/hosts/Easyprivacy.txt
|
||||
https://v.firebog.net/hosts/Prigent-Ads.txt
|
||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
|
||||
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
|
||||
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
|
||||
https://v.firebog.net/hosts/Easylist.txt
|
||||
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts
|
||||
https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts
|
||||
https://v.firebog.net/hosts/Easyprivacy.txt
|
||||
https://v.firebog.net/hosts/Prigent-Ads.txt
|
||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts
|
||||
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
|
||||
https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
|
||||
https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser
|
||||
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
|
||||
https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
|
||||
https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser
|
||||
https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt
|
||||
https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt
|
||||
https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
|
||||
https://mirror1.malwaredomains.com/files/justdomains
|
||||
https://v.firebog.net/hosts/Prigent-Crypto.txt
|
||||
https://mirror.cedia.org.ec/malwaredomains/immortal_domains.txt
|
||||
https://www.malwaredomainlist.com/hostslist/hosts.txt
|
||||
https://bitbucket.org/ethanr/dns-blacklists/raw/8575c9f96e5b4a1308f2f12394abd86d0927a4a0/bad_lists/Mandiant_APT1_Report_Appendix_D.txt
|
||||
https://phishing.army/download/phishing_army_blocklist_extended.txt
|
||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
|
||||
https://v.firebog.net/hosts/Shalla-mal.txt
|
||||
https://raw.githubusercontent.com/Spam404/lists/master/main-blacklist.txt
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts
|
||||
https://urlhaus.abuse.ch/downloads/hostfile/
|
||||
https://emmanuel-lecoq.fr/wp-content/uploads/2020/02/Pi-hole-list.txt
|
||||
https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt
|
||||
https://gitlab.com/ZeroDot1/CoinBlockerLists/raw/master/list.txt
|
||||
https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt
|
||||
https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
|
||||
https://v.firebog.net/hosts/Prigent-Crypto.txt
|
||||
https://bitbucket.org/ethanr/dns-blacklists/raw/8575c9f96e5b4a1308f2f12394abd86d0927a4a0/bad_lists/Mandiant_APT1_Report_Appendix_D.txt
|
||||
https://phishing.army/download/phishing_army_blocklist_extended.txt
|
||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
|
||||
https://v.firebog.net/hosts/Shalla-mal.txt
|
||||
https://raw.githubusercontent.com/Spam404/lists/master/main-blacklist.txt
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts
|
||||
https://urlhaus.abuse.ch/downloads/hostfile/
|
||||
https://gitlab.com/ZeroDot1/CoinBlockerLists/raw/master/list.txt
|
||||
http://sysctl.org/cameleon/hosts
|
||||
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
|
||||
https://gist.githubusercontent.com/anudeepND/adac7982307fec6ee23605e281a57f1a/raw/5b8582b906a9497624c3f3187a49ebc23a9cf2fb/Test.txt
|
||||
https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt
|
||||
https://v.firebog.net/hosts/Kowabit.txt
|
||||
http://forcet.fr/shared/pihole/Samsung-TV.txt
|
||||
https://raw.githubusercontent.com/neodevpro/neodevhost/master/host
|
||||
https://raw.githubusercontent.com/durablenapkin/scamblocklist/master/hosts.txt
|
||||
https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt
|
||||
https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt
|
||||
https://someonewhocares.org/hosts/zero/hosts
|
||||
https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts
|
||||
https://winhelp2002.mvps.org/hosts.txt
|
||||
https://v.firebog.net/hosts/neohostsbasic.txt
|
||||
https://raw.githubusercontent.com/RooneyMcNibNug/pihole-stuff/master/SNAFU.txt
|
||||
https://paulgb.github.io/BarbBlock/blacklists/hosts-file.txt
|
||||
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/mobile.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/smarttv.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/adobeblock.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/nintendoblock.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/nomsdata.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/gamefake.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/fakenewsde.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/cryptomine.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/other.txt
|
||||
https://git.ponywave.de/Akamaru/Pi-Hole-Lists/raw/branch/master/unsorted.txt
|
||||
https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt
|
||||
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
|
@ -1,3 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Fichier docker-compose.yml pour Adguard-Home en macvlan ##
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: '3.3'
|
||||
services:
|
||||
adguardhome:
|
||||
|
@ -1,21 +0,0 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
bitwarden:
|
||||
image: bitwardenrs/server
|
||||
restart: unless-stopped
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
ports:
|
||||
- 80:80 # WebUI
|
||||
volumes:
|
||||
- /volume1/docker/bitwarden/bw-data:/data
|
||||
environment:
|
||||
- WEBSOCKET_ENABLED: 'true' # Necessaire pour utiliser websockets
|
||||
- SIGNUPS_ALLOWED: 'true' # Mettre faux une fois le 1er utilisateur creer et redemarrer le conteneur
|
||||
# Network conseillé de ne pas utiliser host (pas de redirection de port) ni default_bridge car limité a 16 ip
|
||||
network_mode: 'bitwardenrs_network'
|
||||
|
27
docker-compose/dashy/docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
|
||||
version: "3.8"
|
||||
services:
|
||||
dashy:
|
||||
container_name: Dashy
|
||||
image: lissy93/dashy
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
volumes:
|
||||
- /volume1/docker/dashy/conf.yml:/app/public/conf.yml
|
||||
- /volume1/docker/dashy/item-icons:/app/public/item-icons
|
||||
ports:
|
||||
- 4000:80
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- UID=1000
|
||||
- GID=1000
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ['CMD', 'node', '/app/services/healthcheck']
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
33
docker-compose/dashy/readme.md
Normal file
@ -0,0 +1,33 @@
|
||||
Dashy
|
||||
============
|
||||
|
||||
Dashy vous aide à organiser vos services auto-hébergés, en les rendant tous accessibles à partir d'un seul endroit
|
||||
|
||||
<p align="center">
|
||||
<img width="220" src="https://i.ibb.co/yhbt6CY/dashy.png" />
|
||||
</p>
|
||||
|
||||
## Caractéristiques
|
||||
|
||||
* Recherche instantanée par nom, domaine et tags - commencez simplement à taper
|
||||
* Raccourcis clavier entièrement personnalisables pour la navigation, le filtrage et le lancement d'applications
|
||||
* Plusieurs thèmes de couleurs intégrés, avec éditeur de couleurs d'interface utilisateur et prise en charge du CSS personnalisé
|
||||
* Disposition personnalisable, tailles, texte, visibilité des composants, comportement et couleurs, etc.
|
||||
* De nombreuses options pour les icônes, y compris la prise en charge de Font-Awesome, le favicon à récupération automatique, les images et les emojis
|
||||
* Possibilité d'afficher l'état du service pour chacune de vos applications/liens, pour une surveillance de base de la disponibilité et de la disponibilité
|
||||
* Choisissez comment lancer les applications, que ce soit dans votre navigateur, une vue modale contextuelle ou un espace de travail
|
||||
* Option pour l'image d'arrière-plan en plein écran, les liens de barre de navigation personnalisés, le pied de page html, le titre, etc.
|
||||
* Fonctionnalité de sauvegarde et de restauration en nuage cryptée en option disponible
|
||||
* Authentification facultative avec prise en charge multi-utilisateurs et privilèges configurables pour protéger votre tableau de bord
|
||||
* La petite taille de l'ensemble, l'interface utilisateur et la PWA entièrement réactives rendent l'application facile à utiliser sur n'importe quel appareil
|
||||
* Facile à configurer avec Docker, ou sur bare metal, ou avec un déploiement cloud en un clic
|
||||
* Prise en charge multilingue, avec plus de langues ajoutées régulièrement
|
||||
* Configuration simple basée sur YAML à fichier unique, ou configuration de l'application directement via l'interface utilisateur
|
||||
* Fort accent sur la confidentialité
|
||||
* Et bien plus encore...
|
||||
|
||||
## Demo ⚡
|
||||
|
||||
[Demo 1](https://dashy-demo-1.as93.net) ┆ [Demo 2](https://dashy-demo-2.as93.net) ┆ [Demo 3](https://dashy-demo-3.as93.net)
|
||||
|
||||
Lien du Github : https://github.com/Lissy93/dashy
|
19
docker-compose/deluge/docker-compose.yml
Normal file
@ -0,0 +1,19 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
|
||||
version: "2.1"
|
||||
services:
|
||||
deluge:
|
||||
image: ghcr.io/linuxserver/deluge:latest
|
||||
container_name: deluge
|
||||
environment:
|
||||
- PUID=1000 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
- PGID=1000 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
ports:
|
||||
- 8112:8112 # Port de gauche à modifier si nécessaire
|
||||
volumes:
|
||||
- /volume1/docker/deluge/config:/config # Chemin des fichiers de configuration de Deluge
|
||||
- /volume1/torrent:/downloads # Chemin où Deluge dépose les téléchargements
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- com.centurylinklabs.watchtower.enable=true # Ce label permet à Watchtower de faire les mises à jour automatiquement
|
22
docker-compose/docker-compose.yml
Normal file
@ -0,0 +1,22 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-09-18
|
||||
##
|
||||
## Pour une aide à l'installation, consulter le README
|
||||
##
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
unifi-controller:
|
||||
image: ghcr.io/linuxserver/unifi-controller
|
||||
container_name: unifi-controller
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
network_mode: host
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- MEM_LIMIT=1024M
|
||||
- MEM_STARTUP=1024M
|
||||
volumes:
|
||||
- /volume1/docker/unifi/config:/config
|
||||
restart: unless-stopped
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-03-03
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: '3.3'
|
||||
services:
|
||||
linuxserver:
|
||||
|
43
docker-compose/ghost-mysql/docker-compose.yml
Normal file
@ -0,0 +1,43 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2022-08-21
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
ghost:
|
||||
container_name: blog_ghost
|
||||
image: ghost:5-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 2368:2368
|
||||
volumes:
|
||||
- ./ghost_content:/var/lib/ghost/content
|
||||
environment:
|
||||
url: https://blog.ndd.fr # LIEN DU BLOG, peut être http://IP_LOCAL:2368 si utilisation local uniquement
|
||||
database__client: mysql
|
||||
database__connection__host: db
|
||||
database__connection__user: root
|
||||
database__connection__password: PASSWORD_SUPER_FORT # CHOISIR UN MOT DE PASSE
|
||||
database__connection__database: ghost
|
||||
# - DEBUT - CONFIGURATION MAIL - NON OBLIGATOIRE #
|
||||
# mail__transport: SMTP
|
||||
# mail__from: monmail@ndd.fr
|
||||
# mail__options__service: SMTP
|
||||
# mail__options__host: serveur.smtp.net
|
||||
# mail__options__port: <PORT_SMTP>
|
||||
# mail__options__auth__user: nom_utilisateur
|
||||
# mail__options__auth__pass: mon_mot_de_passe
|
||||
# - FIN - CONFIGURATION MAIL - NON OBLIGATOIRE #
|
||||
depends_on:
|
||||
- db
|
||||
mem_limit: 512m
|
||||
|
||||
db:
|
||||
container_name: blog_db
|
||||
image: mysql:8-debian
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: PASSWORD_SUPER_FORT # RE-UTILISER LE MOT DE PASSE CHOISI DANS LES VARIABLES DE GHOST
|
||||
volumes:
|
||||
- ./ghost_db:/var/lib/mysql
|
||||
mem_limit: 768m
|
||||
|
@ -1,26 +1,26 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-04-20
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
ghost:
|
||||
container_name: ghost
|
||||
image: ghost:4-alpine
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- ghost-network
|
||||
restart: always
|
||||
ports:
|
||||
- 2368:2368
|
||||
volumes:
|
||||
- /mnt/volume1/docker/ghost/content:/var/lib/ghost/content
|
||||
environment:
|
||||
url : http://192.168.1.10:2368
|
||||
|
||||
networks:
|
||||
ghost-network:
|
||||
external:
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
ghost:
|
||||
container_name: ghost
|
||||
image: ghost:4-alpine
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- ghost-network
|
||||
restart: always
|
||||
ports:
|
||||
- 2368:2368
|
||||
volumes:
|
||||
- /mnt/volume1/docker/ghost/content:/var/lib/ghost/content
|
||||
environment:
|
||||
url : http://192.168.1.10:2368
|
||||
|
||||
networks:
|
||||
ghost-network:
|
||||
external:
|
||||
name: ghost-network
|
@ -1,99 +1,118 @@
|
||||
Changer le thème de Gitea <!-- omit in toc -->
|
||||
============
|
||||
---
|
||||
> :pencil2: **Mise à jour :** Ajout de la possibilité de changer le style dans le menu `Configuration / Comptes / Sélectionner le thème par défaut` pour les thèmes Gitea de [theme.park](https://github.com/gilbN/theme.park/wiki/Gitea). <br>
|
||||
*Voir* [§ 2. Ajouter les différents thèmes en laissant le choix à l'utilisateur](#2-ajouter-les-différents-thèmes-en-laissant-le-choix-à-l-utilisateur)
|
||||
> :pencil2: **Mise à jour v3.1 :** Suppression du `header.tmpl` au profit de `body_outer_pre.tmpl` suite à la MAJ par theme-park ([voir ici](https://github.com/GilbN/theme.park/issues/293#issuecomment-972038142)). Suppression de l'ancienne méthode.<br>
|
||||
> :pencil2: **Mise à jour v3.0 :** Gros changement `header.tmpl` suite à la MAJ par theme-park. Suppression de l'ancienne méthode.<br>
|
||||
> :pencil2: **Mise à jour v2.1 :** Petit changement du `header.tmpl` suite à la MAJ 1.15 de Gitea.<br>
|
||||
> :pencil2: **Mise à jour :** De nouveaux thèmes sont disponibles. Il faut re-télécharger les fichiers CSS. <br>
|
||||
*Voir* [§ 1. Ajouter les différents thèmes en laissant le choix à l'utilisateur](#1-ajouter-les-différents-thèmes-en-laissant-le-choix-à-lutilisateur)
|
||||
---
|
||||
|
||||
:arrow_forward: Vous pouvez trouver quelques thèmes ici : https://gitea.com/gitea/awesome-gitea#themes
|
||||
|
||||
:book: Dans la suite de ce tuto, on ne parlera que des thèmes Gitea de [theme.park](https://github.com/gilbN/theme.park/wiki/Gitea).
|
||||
:book: Dans la suite de ce tuto, on ne parlera que des thèmes Gitea de [theme.park](https://docs.theme-park.dev/themes/gitea/).
|
||||
|
||||
## Table des matières <!-- omit in toc -->
|
||||
- [1. Modifier le thème sans laisser le choix à l'utilisateur](#1-modifier-le-thème-sans-laisser-le-choix-à-l-utilisateur)
|
||||
- [1.1. Installer le thème](#1-1-installer-le-thème)
|
||||
- [1.2. Exemple avec le dernier lien du dépôt donnée précédemment](#1-2-exemple-avec-le-dernier-lien-du-dépôt-donnée-précédemment)
|
||||
- [1.2.1. Installer le thème (imposé pour tous)](#1-2-1-installer-le-thème-imposé-pour-tous)
|
||||
- [1.2.2. Changer le thème](#1-2-2-changer-le-thème)
|
||||
- [2. Ajouter les différents thèmes en laissant le choix à l'utilisateur](#2-ajouter-les-différents-thèmes-en-laissant-le-choix-à-l-utilisateur)
|
||||
- [1. Ajouter les différents thèmes en laissant le choix à l'utilisateur](#1-ajouter-les-différents-thèmes-en-laissant-le-choix-à-l-utilisateur)
|
||||
- [1.1. Création des dossiers dans `/volume1/docker/gitea/data/`](#1-1-création-des-dossiers-dans-volume1-docker-gitea-data)
|
||||
- [1.2. Création du fichier `body_outer_pre.tmpl` -- MAJ v3.1](#1-2-création-du-fichier-body-outer-pre-tmpl-maj-v3-1)
|
||||
- [1.3. Modification du fichier `/data/gitea/conf/app.ini`](#1-3-modification-du-fichier-data-gitea-conf-app-ini)
|
||||
- [1.3.1. Point info sur la modification de ce fichier](#1-3-1-point-info-sur-la-modification-de-ce-fichier)
|
||||
- [1.3.2. Ce qu'il faut ajouter au fichier `/data/gitea/conf/app.ini`](#1-3-2-ce-qu-il-faut-ajouter-au-fichier-data-gitea-conf-app-ini)
|
||||
- [2.4.3. Redémarrer le conteneur](#2-4-3-redémarrer-le-conteneur)
|
||||
- [2.5. Choisir son thème dans l'interface graphique de Gitea](#2-5-choisir-son-thème-dans-l-interface-graphique-de-gitea)
|
||||
- [2. Méthode précédente - Ajouter les différents thèmes en laissant le choix à l'utilisateur (Laissée pour la postérité)](#2-méthode-précédente-ajouter-les-différents-thèmes-en-laissant-le-choix-à-l-utilisateur-laissée-pour-la-postérité)
|
||||
- [2.1. Création des dossiers dans `/volume1/docker/gitea/data/`](#2-1-création-des-dossiers-dans-volume1-docker-gitea-data)
|
||||
- [2.2. Télécharger les différents css](#2-2-télécharger-les-différents-css)
|
||||
- [2.3. Création du fichier `header.tmpl`](#2-3-création-du-fichier-header-tmpl)
|
||||
- [2.3. Création du fichier `header.tmpl` -- MAJ v2.1](#2-3-création-du-fichier-header-tmpl-maj-v2-1)
|
||||
- [2.4. Modification du fichier `/data/gitea/conf/app.ini`](#2-4-modification-du-fichier-data-gitea-conf-app-ini)
|
||||
- [2.4.1. Point info sur la modification de ce fichier](#2-4-1-point-info-sur-la-modification-de-ce-fichier)
|
||||
- [2.4.2. Ce qu'il faut ajouter au fichier `/data/gitea/conf/app.ini`](#2-4-2-ce-qu-il-faut-ajouter-au-fichier-data-gitea-conf-app-ini)
|
||||
- [2.4.3. Redémarrer le conteneur](#2-4-3-redémarrer-le-conteneur)
|
||||
- [2.5. Choisir son thème dans l'interface graphique de Gitea](#2-5-choisir-son-thème-dans-l-interface-graphique-de-gitea)
|
||||
- [2.4.3. Redémarrer le conteneur](#2-4-3-redémarrer-le-conteneur-1)
|
||||
- [2.5. Choisir son thème dans l'interface graphique de Gitea](#2-5-choisir-son-thème-dans-l-interface-graphique-de-gitea-1)
|
||||
|
||||
# 1. Modifier le thème sans laisser le choix à l'utilisateur
|
||||
|
||||
## 1.1. Installer le thème
|
||||
---
|
||||
|
||||
Il faut vérifier si la variable GITEA_CUSTOM a été paramétrée. En temps normal, ce n'est pas le cas.
|
||||
# 1. Ajouter les différents thèmes en laissant le choix à l'utilisateur
|
||||
|
||||
Si ce n'est pas le cas, on peut aller vérifier le chemin qui est paramétré pour le dossier dit CUSTOM de gitea. Pour celà, il faut aller ici : <br>
|
||||
> :memo: Cette partie devrait être compatible avec d'autres thèmes qui n'apportent qu'un seul fichier `.css`. ***À confirmer...***
|
||||
|
||||
## 1.1. Création des dossiers dans `/volume1/docker/gitea/data/`
|
||||
|
||||
- Il faut vérifier si la variable GITEA_CUSTOM a été paramétrée. En temps normal, ce n'est pas le cas.
|
||||
|
||||
- Si ce n'est pas le cas, on peut aller vérifier le chemin qui est paramétré pour le dossier dit CUSTOM de gitea. Pour celà, il faut aller ici :
|
||||
`https://url-de-votre-gitea.tlds/admin/config`
|
||||
|
||||
Puis chercher la ligne `GITEA_CUSTOM` où apparaîtra le chemin d'accès : `/data/gitea`.
|
||||
- Puis chercher la ligne `GITEA_CUSTOM` où apparaîtra le chemin d'accès : `/data/gitea`.
|
||||
|
||||
Dans le cas d'une installation Docker, ça donnerait ceci : `/docker/gitea/data/gitea`
|
||||
- Dans le cas d'une installation Docker, ça donnerait ceci : `/docker/gitea/data/gitea`
|
||||
<br>(voir le fichier **docker-compose.yml** pour le chemin d'accès avant le `/data/gitea`)
|
||||
|
||||
Il faudra alors créer les dossiers suivants :
|
||||
- Il faudra alors créer les dossiers suivants :
|
||||
|
||||
- `public`
|
||||
- `templates`
|
||||
- `templates/custom`
|
||||
- `public`
|
||||
- `public/css`
|
||||
- `templates`
|
||||
- `templates/custom`
|
||||
|
||||
Puis il faudra suivre les instructions du thème choisi. Pour ceux qui n'auraient pas d'instructions, le fichier `styles.css` devra se trouver dans le dossier `public`.
|
||||
## 1.2. Création du fichier `body_outer_pre.tmpl` -- MAJ v3.1
|
||||
|
||||
## 1.2. Exemple avec le dernier lien du dépôt donnée précédemment
|
||||
|
||||
### 1.2.1. Installer le thème (imposé pour tous)
|
||||
|
||||
Je vais prendre le dernier lien présent dans le dépôt donné avant la table des matières.
|
||||
|
||||
> - [theme.park](https://github.com/gilbN/theme.park/wiki/Gitea) - A theme suite for Gitea.
|
||||
|
||||
Dans ce nouveau dépôt ( https://github.com/gilbN/theme.park/wiki/Gitea ) vous trouverez plusieurs thèmes.
|
||||
|
||||
Je trouve les thèmes plex, dark et space-gray relativement sympas.
|
||||
Des captures sont présentes plus bas dans la page : https://github.com/gilbN/theme.park/wiki/Gitea#screenshots
|
||||
|
||||
Il faut créer deux fichiers :
|
||||
|
||||
- `public/styles.css` qui contient (avec des commentaires perso) :
|
||||
```css
|
||||
/* Source : https://github.com/gilbN/theme.park/wiki/Gitea
|
||||
Possibilités : https://gilbn.github.io/theme.park/CSS/themes/gitea/XXX.css
|
||||
aquamarine.css <--- pas terrible
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP
|
||||
organizr-dark.css
|
||||
*/
|
||||
@import url("https://gilbn.github.io/theme.park/CSS/themes/gitea/plex.css");
|
||||
- Supprimer le fichier `header.tmpl` du le dossier `.../templates/custom/` s'il est présent (créé lors d'une méthode précédente dépréciée).
|
||||
- Créer le fichier `body_outer_pre.tmpl` et l'enregistrer dans le dossier `.../templates/custom/` créé précédemment.
|
||||
```go
|
||||
<!-- Voir : https://docs.theme-park.dev/themes/gitea/#adding-the-themes-in-gitea -->
|
||||
{{ if .IsSigned }}
|
||||
{{ if and (ne .SignedUser.Theme "gitea") (ne .SignedUser.Theme "arc-green") }}
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{.SignedUser.Theme}}.css">
|
||||
{{end}}
|
||||
{{ else if and (ne DefaultTheme "gitea") (ne DefaultTheme "arc-green") }}
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{DefaultTheme}}.css">
|
||||
{{end}}
|
||||
```
|
||||
- Vous pouvez aussi récupérer le fichier tout prêt [dans dossier `data--gitea/public/template/custom/` de ce dépôt](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/gitea/data--gitea/templates/custom/body_outer_pre.tmpl). Il contient en commentaires quelques détails.
|
||||
|
||||
- `templates/custom/header.tmpl` qui contient :
|
||||
```html
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/styles.css">
|
||||
## 1.3. Modification du fichier `/data/gitea/conf/app.ini`
|
||||
|
||||
### 1.3.1. Point info sur la modification de ce fichier
|
||||
|
||||
Pour modifier ce fichier, il se peut que vous n'ayez pas les permissions d'enregistrer les modifications apportées... Il faudra alors le copier ailleurs, faire les modifications et sauvegarder, puis re-copier dans l'autre sens le fichier dans son dossier d'origine.
|
||||
|
||||
C'est ce que je dois faire. Depuis une ligne de commande SSH, je fais :
|
||||
- Je copie le fichier dans un dossier où mon utilisateur Admin à les droits en écriture (je ne me logue pas avec l'utilisateur choisir pour Gitea) : <br>`cp /volume1/docker/gitea/data/gitea/conf/app.ini /volume1/docker/gitea/`
|
||||
- Je modifie et sauvegarde mon fichier...
|
||||
- puis je copie en retour le fichier modifier : `cp /volume1/docker/gitea/app.ini /volume1/docker/gitea/data/gitea/conf/`
|
||||
- Il faut ensuite relancer le conteneur Gitea avec Portainer/DSM ou en CLI : `docker restart gitea`
|
||||
|
||||
### 1.3.2. Ce qu'il faut ajouter au fichier `/data/gitea/conf/app.ini`
|
||||
|
||||
Il faut ajouter ceci au fichier `app.ini` :
|
||||
|
||||
```ini
|
||||
[ui]
|
||||
THEMES = gitea,arc-green,dracula,plex,dark,aquamarine,hotline,hotpink,nord,organizr,overseerr,space-gray,onedark,blackberry-abyss,blackberry-amethyst,blackberry-carol,blackberry-dreamscape,blackberry-flamingo,blackberry-hearth,blackberry-martian,blackberry-pumpkin,blackberry-royal,blackberry-shadow,blackberry-solar,blackberry-vanta
|
||||
DEFAULT_THEME = dracula
|
||||
```
|
||||
Une fois les fichiers créés et placés dans ces dossiers (faire attention aux permissions), il suffit de redémarrer Gitea (ou le conteneur si installation en Docker).
|
||||
> :memo: Note 1 : Il se peut que la section `[ui]` soit déjà présente dans votre `app.ini`, il faudra alors modifier la ligne `THEMES`.
|
||||
> :memo: Note 2 : **Le thème par défaut n'a plus besoin d'être obligatoirement "gitea".**
|
||||
|
||||
### 1.2.2. Changer le thème
|
||||
### 2.4.3. Redémarrer le conteneur
|
||||
|
||||
Pour changer le thème, il suffit de :
|
||||
Il faut bien penser à redémarrer le conteneur une fois le app.ini modifié et copié dans `/data/gitea/conf/`.
|
||||
|
||||
- modifier le `public/styles.css` avec le nom du css désiré ;
|
||||
- redémarrer Gitea ;
|
||||
- ne pas oublier de vider le cache du navigateur... sinon le nouveau thème ne sera pas visible... (ça m'a pris 15 minutes d'essais et au bout de ce temps l'utilisation d'un autre navigateur pour le comprendre...).
|
||||
## 2.5. Choisir son thème dans l'interface graphique de Gitea
|
||||
|
||||
---
|
||||
---
|
||||

|
||||
|
||||
# 2. Ajouter les différents thèmes en laissant le choix à l'utilisateur
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
# 2. Méthode précédente - Ajouter les différents thèmes en laissant le choix à l'utilisateur (Laissée pour la postérité)
|
||||
|
||||
> :memo: Cette partie devrait être compatible avec d'autres thèmes qui n'apportent qu'un seul fichier `.css`. ***À confirmer...***
|
||||
|
||||
@ -118,17 +137,23 @@ Pour changer le thème, il suffit de :
|
||||
|
||||
## 2.2. Télécharger les différents css
|
||||
|
||||
- Télécharger les différents thèmes .css ici : https://github.com/gilbN/theme.park/tree/master/CSS/themes/gitea.
|
||||
- Télécharger les différents fichiers .css [du dossier `data--gitea/public/css/` de ce dépôt](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/gitea/data--gitea/public/css).
|
||||
*(Ne pas les renommer.)*
|
||||
- Placer ces fichiers dans le dossier `...public/css` créé précédemment.
|
||||
|
||||
## 2.3. Création du fichier `header.tmpl`
|
||||
## 2.3. Création du fichier `header.tmpl` -- MAJ v2.1
|
||||
|
||||
- Créer le fichier `header.tmpl` et l'enregistrer dans le dossier `.../templates/custom/` créé précédemment.
|
||||
```html
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/{{DefaultTheme}}.css">
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/{{.SignedUser.Theme}}.css">
|
||||
{{if .IsSigned }}
|
||||
{{ if ne .SignedUser.Theme "gitea" }}
|
||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/{{.SignedUser.Theme}}.css?v={{MD5 AppVer}}">
|
||||
{{end}}
|
||||
{{else if ne DefaultTheme "gitea"}}
|
||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{DefaultTheme}}.css?v={{MD5 AppVer}}">
|
||||
{{end}}
|
||||
```
|
||||
- Vous pouvez aussi récupérer le fichier tout prêt [dans dossier `data--gitea/public/template/custom/` de ce dépôt](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/gitea/data--gitea/templates/custom/header.tmpl). Il contient en commentaires quelques détails.
|
||||
|
||||
## 2.4. Modification du fichier `/data/gitea/conf/app.ini`
|
||||
|
||||
@ -148,14 +173,15 @@ Il faut ajouter ceci au fichier `app.ini` :
|
||||
|
||||
```ini
|
||||
[ui]
|
||||
THEMES = gitea,arc-green,plex,aquamarine,dark,hotline,organizr-dark,space-gray
|
||||
DEFAULT_THEME = arc-green
|
||||
THEMES = gitea,arc-green,dracula,dracula-test,plex,dark,aquamarine,hotline,hotpink,nord,organizr,overseerr,space-gray,onedark,blackberry-abyss,blackberry-amethyst,blackberry-carol,blackberry-dreamscape,blackberry-flamingo,blackberry-hearth,blackberry-martian,blackberry-pumpkin,blackberry-royal,blackberry-shadow,blackberry-solar,blackberry-vanta
|
||||
DEFAULT_THEME = gitea
|
||||
```
|
||||
> :memo: Note : Il se peut que la section `[ui]` soit déjà présente dans votre `app.ini`, il faudra alors modifier la ligne `THEMES`.
|
||||
> :memo: Note 1 : Il se peut que la section `[ui]` soit déjà présente dans votre `app.ini`, il faudra alors modifier la ligne `THEMES`.
|
||||
> :memo: Note 2 : **Il faut que le thème par défaut soit "gitea" car les nouveaux thèmes de theme.park se base sur celui-là.**
|
||||
|
||||
### 2.4.3. Redémarrer le conteneur
|
||||
|
||||
Il faut bien penser à redémarrer le conteneur.
|
||||
Il faut bien penser à redémarrer le conteneur une fois le app.ini modifié et copié dans `/data/gitea/conf/`.
|
||||
|
||||
## 2.5. Choisir son thème dans l'interface graphique de Gitea
|
||||
|
||||
@ -168,4 +194,6 @@ Il faut bien penser à redémarrer le conteneur.
|
||||
|
||||
---
|
||||
|
||||
Voilà, c'est la fin :D
|
||||
Voilà, c'est la fin :D
|
||||
|
||||
---
|
||||
|
@ -5,19 +5,43 @@
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/aquamarine.css");
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/aquamarine.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-abyss.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-amethyst.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-carol.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-dreamscape.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-flamingo.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-hearth.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-martian.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-pumpkin.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-royal.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-shadow.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-solar.css";
|
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/blackberry-vanta.css";
|
@ -5,19 +5,43 @@
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/dark.css");
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/dark.css";
|
47
docker-compose/gitea/data--gitea/public/css/dracula-test.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/dracula.css";
|
47
docker-compose/gitea/data--gitea/public/css/dracula.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/dracula.css";
|
@ -5,19 +5,43 @@
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/hotline.css");
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/hotline.css";
|
47
docker-compose/gitea/data--gitea/public/css/hotpink.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/hotpink.css";
|
47
docker-compose/gitea/data--gitea/public/css/nord.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/nord.css";
|
59
docker-compose/gitea/data--gitea/public/css/onedark.css
Normal file
@ -0,0 +1,59 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
blackberry-abyss.css
|
||||
blackberry-amethyst.css
|
||||
blackberry-carol.css
|
||||
blackberry-dreamscape.css
|
||||
blackberry-flamingo.css
|
||||
blackberry-hearth.css
|
||||
blackberry-martian.css
|
||||
blackberry-pumpkin.css
|
||||
blackberry-royal.css
|
||||
blackberry-shadow.css
|
||||
blackberry-solar.css
|
||||
blackberry-vanta.css
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/onedark.css";
|
@ -1,23 +0,0 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/organizr-dark.css");
|
47
docker-compose/gitea/data--gitea/public/css/organizr.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/organizr.css";
|
47
docker-compose/gitea/data--gitea/public/css/overseerr.css
Normal file
@ -0,0 +1,47 @@
|
||||
/* dP dP dP */
|
||||
/* 88 88 88 */
|
||||
/* d8888P 88d888b. .d8888b. 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88d888b. 88 .dP */
|
||||
/* 88 88' `88 88ooood8 88'`88'`88 88ooood8 88' `88 88' `88 88' `88 88888" */
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/overseerr.css";
|
@ -5,19 +5,43 @@
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/plex.css");
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/plex.css";
|
@ -5,19 +5,43 @@
|
||||
/* 88 88 88 88. ... 88 88 88 88. ... 88. .88 88. .88 88 88 `8b. */
|
||||
/* dP dP dP `88888P' dP dP dP `88888P' 88 88Y888P' `88888P8 dP dP `YP */
|
||||
/* 88 */
|
||||
/* dP */
|
||||
/* dP */
|
||||
|
||||
/* Made by @gilbN */
|
||||
/* Made by @gilbN */
|
||||
/* https://github.com/gilbN/theme.park */
|
||||
|
||||
/* Source : https://docs.theme-park.dev/themes/gitea/
|
||||
Possibilités : https://theme-park.dev/CSS/themes/gitea/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
/* https://docs.theme-park.dev/setup/#stylus-method
|
||||
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/theme-options/THEME.css";
|
||||
aquamarine.css
|
||||
dark.css
|
||||
dracula.css
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
hotpink.css
|
||||
nord.css
|
||||
organizr.css
|
||||
overseerr.css
|
||||
plex.css
|
||||
space-gray.css
|
||||
|
||||
Nouveaux thèmes avec :
|
||||
@import "https://theme-park.dev/css/base/<APP_NAME>/<APP_NAME>-base.css";
|
||||
@import "https://theme-park.dev/css/community-theme-options/THEME.css";
|
||||
mind.css
|
||||
onedark.css
|
||||
power.css
|
||||
reality.css
|
||||
soul.css
|
||||
space.css
|
||||
time.css
|
||||
... voir ici la liste -> https://github.com/GilbN/theme.park/tree/master/css/community-theme-options
|
||||
*/
|
||||
|
||||
@import url("https://theme-park.dev/CSS/themes/gitea/space-gray.css");
|
||||
@import "https://theme-park.dev/css/base/gitea/gitea-base.css";
|
||||
@import "https://theme-park.dev/css/base/gitea/chroma.css";
|
||||
@import "https://theme-park.dev/css/theme-options/space-gray.css";
|
@ -1,10 +0,0 @@
|
||||
/* Source : https://github.com/gilbN/theme.park/wiki/Gitea
|
||||
Possibilités : https://gilbn.github.io/theme.park/CSS/themes/gitea/XXX.css
|
||||
aquamarine.css <--- Pas mal celui là.
|
||||
hotline.css
|
||||
plex.css <--- TOP
|
||||
dark.css <--- TOP
|
||||
space-gray.css <--- TOP, mon préféré !
|
||||
organizr-dark.css
|
||||
*/
|
||||
@import url("https://gilbn.github.io/theme.park/CSS/themes/gitea/space-gray.css");
|
@ -0,0 +1,16 @@
|
||||
<!-- Voir : https://docs.theme-park.dev/themes/gitea/#adding-the-themes-in-gitea -->
|
||||
<!-- Pensez à supprimer le fichier header.tmpl du serveur Gitea ! -->
|
||||
|
||||
{{ if .IsSigned }}
|
||||
{{ if and (ne .SignedUser.Theme "gitea") (ne .SignedUser.Theme "arc-green") }}
|
||||
{{ if (eq .SignedUser.Theme "dracula-test") }}
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/gitea-base.css">
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/chroma.css">
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/theme-options/dracula.css">
|
||||
{{else}}
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{.SignedUser.Theme}}.css">
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{ else if and (ne DefaultTheme "gitea") (ne DefaultTheme "arc-green") }}
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{DefaultTheme}}.css">
|
||||
{{end}}
|
@ -1,6 +1,23 @@
|
||||
<!--
|
||||
// Copie de la méthode d'installation qui ne laisse aucun choix à l'utilisateur
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/styles.css">
|
||||
-->
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/{{DefaultTheme}}.css">
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/{{.SignedUser.Theme}}.css">
|
||||
<!-- NE PLUS UTILISER CE FICHIER, voir tuto pour utiliser body_outer_pre.tmpl -->
|
||||
<!-- IL FAUT SUPPRIMER CE FICHIER du serveur Gitea... (il peut rester dans le dépôt) -->
|
||||
|
||||
<!-- Voir : https://docs.theme-park.dev/themes/gitea/#adding-the-themes-in-gitea -->
|
||||
|
||||
{{ if .IsSigned }}
|
||||
{{ if and (ne .SignedUser.Theme "gitea") (ne .SignedUser.Theme "arc-green") }}
|
||||
<!-- <link rel="stylesheet" href="/styles.css"> -->
|
||||
<!-- <link rel="stylesheet" href="/css/gitea.css"> -->
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/gitea-base.css">
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/chroma.css">
|
||||
|
||||
<!-- <link rel="stylesheet" href="https://theme-park.dev/css/theme-options/{{.SignedUser.Theme}}.css"> -->
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{.SignedUser.Theme}}.css">
|
||||
{{end}}
|
||||
|
||||
{{ else if and (ne DefaultTheme "gitea") (ne DefaultTheme "arc-green") }}
|
||||
<!-- <link rel="stylesheet" href="/styles.css"> -->
|
||||
<!-- <link rel="stylesheet" href="/css/gitea.css"> -->
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/gitea-base.css">
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/chroma.css">
|
||||
<link rel="stylesheet" href="https://theme-park.dev/css/base/gitea/{{DefaultTheme}}.css">
|
||||
{{end}}
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-04-19
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
##==============================================================================================
|
||||
## ##
|
||||
## Fichier docker-compose.yml pour Gitea ##
|
||||
|
23
docker-compose/gotify/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: "2.1"
|
||||
services:
|
||||
gotify:
|
||||
image: gotify/server
|
||||
container_name: gotify
|
||||
labels:
|
||||
- "autoheal=true" # Voir autoheal pour relance automatique de container instable
|
||||
- com.centurylinklabs.watchtower.enable=true # Le label ci-dessous permet à Watchtower de faire les mises à jour automatiquement
|
||||
ports:
|
||||
- 2222:80 # Choisir un port (de gauche) de connexion libre sur votre machine, ce sera le port de connexion
|
||||
environment:
|
||||
- GOTIFY_DEFAULTUSER_PASS=custom
|
||||
- GOTIFY_DATABASE_DIALECT=sqlite3
|
||||
- GOTIFY_DATABASE_CONNECTION=data/gotify.db
|
||||
- GOTIFY_DEFAULTUSER_NAME=admin
|
||||
- GOTIFY_DEFAULTUSER_PASS=admin
|
||||
- GOTIFY_PASSSTRENGTH=10
|
||||
- GOTIFY_UPLOADEDIMAGESDIR=data/images
|
||||
- GOTIFY_PLUGINSDIR=data/plugins
|
||||
volumes:
|
||||
- /volume1/docker/gotify/data:/app/data # chemin des fichiers de config de Gotify
|
29
docker-compose/grocy/docker-compose.yml
Normal file
@ -0,0 +1,29 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-09-18
|
||||
##
|
||||
## Pour une aide à l'installation, consulter le README
|
||||
##
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
grocy:
|
||||
image: ghcr.io/linuxserver/grocy
|
||||
container_name: grocy
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- grocy-network
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- /volume1/docker/grocy/config:/config
|
||||
ports:
|
||||
- 9283:80
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
grocy-network:
|
||||
external:
|
||||
name: grocy-network
|
97
docker-compose/grocy/readme.md
Normal file
@ -0,0 +1,97 @@
|
||||
Installation de Grocy
|
||||
============
|
||||
|
||||
Bienvenue sur mon nouveau tutoriel. Celui-ci, je l'espere va vous apprendre à installer Grocy.
|
||||
|
||||
**Grocy, c'est quoi ?**
|
||||
Grocy est une solution de gestion d'épicerie et de ménage auto-hébergée sur le Web pour votre maison.
|
||||
|
||||
## Table des matières
|
||||
- 1. [Prérequis](#1-prérequis)
|
||||
- 1.a [Création des dossiers](#1-a-création-des-dossiers)
|
||||
- 1.b [Modifications du .env](#1-b-modifications-du-env)
|
||||
- 1.c [Transfert des fichiers dans /edition-videos](#1-c-transfert-des-fichiers-dans-edition-videos)
|
||||
- 2. [Création des conteneurs](#2-création-des-conteneurs)
|
||||
- 2.a [Création du réseau](#2-a-création-du-réseau)
|
||||
- 2.b [Création des conteneurs](#2-b-création-des-conteneurs)
|
||||
- 3. [Les Bases](#3-les-bases)
|
||||
- 3.a [Commandes de bases ( Docker )](#3-a-commandes-de-bases-docker)
|
||||
- 3.b [Accès aux interfaces ( WebUI )](#3-b-accès-aux-interfaces-webui)
|
||||
- 4. Dépannage ( Ce construira au fur et a mesure des questions )
|
||||
|
||||
## 1. Prérequis
|
||||
|
||||
- Dans le paragraphe 1.a nous allons les créer avec une ligne de commande, et dans le paragraphe 1.b nous allons modifier le .env afin qu'il utilise bien ces dossiers ( en fonction de leurs localisation sur votre machine ).
|
||||
|
||||
### 1.a. Création des dossiers
|
||||
|
||||
- Avec `cd` aller dans le dossier de votre choix, par exemple "docker".
|
||||
Exemple : Si votre dossier "docker" ce trouve dans /volume1, alors la commande sera :
|
||||
`cd /volume1/docker`
|
||||
|
||||
- Maintenant que nous sommes dans le bon dossier, nous allons executer la commande suivante pour créer le dossier grocy qui contiendra la configuration de grocy :
|
||||
|
||||
`mkdir -p grocy/config`
|
||||
|
||||
### 1.b. Modifications des .env
|
||||
- Récupérer sur votre machine le fichier [docker-compose.yml](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/grocy/docker-compose.yml).
|
||||
|
||||
> Vous pouvez faire un clic droit - Enregistrer sous ... sur les liens ci-dessus pour télécharger les fichiers.
|
||||
|
||||
- Dans le fichier `docker-compose.yml` vous allez devoir modifier plusieurs chose :
|
||||
|
||||
**PUID et PGID** devront correspondre aux ID de votre utilisateurs, plus d'info ici : [Connaitre le PUID / PGID d'un utilisateur](https://www.forum-nas.fr/viewtopic.php?f=56&t=13213)
|
||||
|
||||
Dans la ligne `/volume1/docker/grocy/config:/config`, la partie `/volume1/docker/grocy/config` doit correspondre au chemin vers le dossier grocy/config créé a l'étape 1.a.
|
||||
Dans ce cas, c'est : `/volume1/docker/grocy/config`
|
||||
|
||||
### 1.c Transfert des fichiers dans /edition-videos
|
||||
- Une fois les modifications effectuées, il faut transfert le fichier ( docker-compose.yml ) dans le dossier `/grocy` précédemment créé ! Par exemple, avec FileZilla.
|
||||
|
||||
## 2. Création des conteneurs
|
||||
### 2.a Création du réseau
|
||||
- On créé le reseau `grocy-network` necesaire au fonctionnement du conteneur :
|
||||
|
||||
```
|
||||
docker network create grocy-network
|
||||
```
|
||||
|
||||
### 2.b Création des conteneurs
|
||||
Maintenant que votre "stack" est prete rendez-vous dans le dossier `grocy`, dans mon cas `/volume1/docker/grocy` :
|
||||
```
|
||||
cd /volume1/docker/grocy/config
|
||||
```
|
||||
|
||||
## 3. Les Bases
|
||||
Il est possible d'utilise n'importe qu'elle interface de gestion de conteneur*, ou SSH.
|
||||
|
||||
Voici quelques commandes de base :
|
||||
|
||||
**[Portainer](https://www.forum-nas.fr/viewtopic.php?f=56&t=14030) par exemple.*
|
||||
|
||||
### 3.a Commandes de bases ( Docker )
|
||||
- Arreter un conteneur : `docker stop <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **grocy** : `docker stop grocy`
|
||||
|
||||
- Redémarrer un conteneur : `docker restart <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **grocy** : `docker restart grocy`
|
||||
|
||||
- Démarrer un conteneur : `docker start <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **grocy** : `docker start grocy`
|
||||
|
||||
- Supprimer un conteneur : `docker rm <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **grocy** : `docker rm grocy`
|
||||
|
||||
- Créer le conteneur : `docker-compose up -d`
|
||||
Cette commande permet de créer ou re-créer le conteneur présent dans le fichier docker-compose.yml.
|
||||
> Note : Vous devez etre dans la dossier contenant le fichier docker-compose.yml pour que cette commande fonctionne.
|
||||
|
||||
### 3.b Accès aux interfaces ( WebUI )
|
||||
|
||||
- L'acces à chaque service se fait via une WebUI ( Interface Web ), sur un port quil lui est propre.
|
||||
- Pour Grocy, c'est le port `9283`. Donc l'adresse sera sous la forme : `http://IP_DE_LA_MACHINE:9283`
|
||||
Exemple : Si l'adresse IP de votre machine est `192.168.1.10`, alors l'adresse d'accès sera : `http://192.168.1.10:9283`
|
||||
|
||||
## 4. Aller plus loin
|
||||
|
||||
A VENIR ...
|
@ -0,0 +1,9 @@
|
||||
PUID=1000
|
||||
GUID=100
|
||||
TZ=Europe/Paris
|
||||
|
||||
DISPLAY_WIDTH=1280
|
||||
DISPLAY_HEIGHT=768
|
||||
|
||||
RACINE=/volume1/docker/edition-videos
|
||||
STORAGE=/storage
|
@ -0,0 +1,115 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
##
|
||||
## Pour une aide à l'installation, consulter le README
|
||||
##
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
handbrake:
|
||||
image: jlesage/handbrake:latest
|
||||
container_name: edition-video_handbrake
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- edition-videos-network
|
||||
environment:
|
||||
- USER_ID=${PUID}
|
||||
- GROUP_ID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
|
||||
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
|
||||
ports:
|
||||
- "6800:5800"
|
||||
volumes:
|
||||
- "${RACINE}/handbrake/config:/config:rw"
|
||||
- "${RACINE}/handbrake/watch:/watch:rw"
|
||||
- "${RACINE}/handbrake/output:/output:rw"
|
||||
- "${STORAGE}:/storage:ro"
|
||||
restart: unless-stopped
|
||||
|
||||
mediainfo:
|
||||
image: jlesage/mediainfo:latest
|
||||
container_name: edition-video_mediainfo
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- edition-videos-network
|
||||
environment:
|
||||
- USER_ID=${PUID}
|
||||
- GROUP_ID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
|
||||
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
|
||||
ports:
|
||||
- 6801:5800
|
||||
volumes:
|
||||
- "${RACINE}/mediainfo/config:/config:rw"
|
||||
- "${STORAGE}:/storage:ro"
|
||||
restart: unless-stopped
|
||||
|
||||
avidemux:
|
||||
image: jlesage/avidemux:latest
|
||||
container_name: edition-video_avidemux
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- edition-videos-network
|
||||
environment:
|
||||
- USER_ID=${PUID}
|
||||
- GROUP_ID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
|
||||
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
|
||||
ports:
|
||||
- 6802:5800
|
||||
volumes:
|
||||
- "${RACINE}/avidemux/config:/config:rw"
|
||||
- "${STORAGE}:/storage:rw"
|
||||
restart: unless-stopped
|
||||
|
||||
makemkv:
|
||||
image: jlesage/makemkv:latest
|
||||
container_name: edition-video_makemkv
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- edition-videos-network
|
||||
environment:
|
||||
- USER_ID=${PUID}
|
||||
- GROUP_ID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
|
||||
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
|
||||
ports:
|
||||
- 6803:5800
|
||||
volumes:
|
||||
- "${RACINE}/makemkv/config:/config:rw"
|
||||
- "${RACINE}/makemkv/output:/output:rw"
|
||||
- "${STORAGE}:/storage:ro"
|
||||
restart: unless-stopped
|
||||
|
||||
mkvtoolnix:
|
||||
image: jlesage/mkvtoolnix:latest
|
||||
container_name: edition-video_mkvtoolnix
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
networks:
|
||||
- edition-videos-network
|
||||
environment:
|
||||
- USER_ID=${PUID}
|
||||
- GROUP_ID=${PGID}
|
||||
- TZ=${TZ}
|
||||
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
|
||||
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
|
||||
ports:
|
||||
- 6804:5800
|
||||
volumes:
|
||||
- "${RACINE}/makemkv/config:/config:rw"
|
||||
- "${STORAGE}:/storage:ro"
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
edition-videos-network:
|
||||
external:
|
||||
name: edition-videos-network
|
@ -0,0 +1,135 @@
|
||||
Installation de la stack "Édition-Vidéos"
|
||||
============
|
||||
|
||||
Bienvenue sur mon nouveau tutoriel. Celui-ci, je l'espere va vous apprendre à installer Handbrake, Mediainfo, Avidemux, MakeMKV et MKVToolNix simplement via docker.
|
||||
|
||||
Cette stack docker-compose contient les logiciels suivants :
|
||||
| Nom du service | Site Officiel | Dépot utilisé* |
|
||||
| ------ | ------ | ------ |
|
||||
| Handbrake | [Handbrake.fr](https://handbrake.fr/) | [jlesage](https://github.com/jlesage/docker-handbrake) |
|
||||
| Mediainfo | [MediaArea](https://mediaarea.net/fr/MediaInfo) | [jlesage](https://github.com/jlesage/docker-mediainfo) |
|
||||
| Avidemux | [Fixounet](http://fixounet.free.fr/avidemux/) | [jlesage](https://github.com/jlesage/docker-avidemux) |
|
||||
| MakeMKV | [GuinpinSoft](http://makemkv.com/) | [jlesage](https://github.com/jlesage/docker-makemkv) |
|
||||
| MKVToolNix | [Moritz Bunkus](https://mkvtoolnix.download/) | [jlesage](https://github.com/jlesage/docker-mkvtoolnix) |
|
||||
|
||||
## Table des matières
|
||||
- 1. [Prérequis](#1-prérequis)
|
||||
- 1.a [Création des dossiers](#1-a-création-des-dossiers)
|
||||
- 1.b [Modifications du .env](#1-b-modifications-du-env)
|
||||
- 1.c [Transfert des fichiers dans /edition-videos](#1-c-transfert-des-fichiers-dans-edition-videos)
|
||||
- 2. [Création des conteneurs](#2-création-des-conteneurs)
|
||||
- 2.a [Création du réseau](#2-a-création-du-réseau)
|
||||
- 2.b [Création des conteneurs](#2-b-création-des-conteneurs)
|
||||
- 3. [Les Bases](#3-les-bases)
|
||||
- 3.a [Commandes de bases ( Docker )](#3-a-commandes-de-bases-docker)
|
||||
- 3.b [Accès aux interfaces ( WebUI )](#3-b-accès-aux-interfaces-webui)
|
||||
- 4. Dépannage ( Ce construira au fur et a mesure des questions )
|
||||
|
||||
## 1. Prérequis
|
||||
|
||||
- Cette stack est concu pour fonctionner dans un dossier `edition-videos`, avec l'architecture suivante :
|
||||
```
|
||||
edition-videos ---- handbrake ------- config
|
||||
| |_ watch
|
||||
| |_ output
|
||||
|
|
||||
|-- mediainfo ------ config
|
||||
|
|
||||
|-- avidemux ------- config
|
||||
|
|
||||
|-- makemkv -------- config
|
||||
| |_ output
|
||||
|
|
||||
|-- mkvtoolnix ----- config
|
||||
```
|
||||
|
||||
- Dans le paragraphe 1.a nous allons les créer avec une ligne de commande, et dans le paragraphe 1.b nous allons modifier le .env afin qu'il utilise bien ces dossiers ( en fonction de leurs localisation sur votre machine ).
|
||||
|
||||
### 1.a. Création des dossiers
|
||||
|
||||
- Avec `cd` aller dans le dossier de votre choix, par exemple "docker".
|
||||
Exemple : Si votre dossier "docker" ce trouve dans /volume1, alors la commande sera :
|
||||
`cd /volume1/docker`
|
||||
|
||||
- Maintenant que nous sommes dans le bon dossier, nous allons executer la commande suivante pour créer d'un coup, toute l'architecture nécessaire :
|
||||
|
||||
`mkdir -p edition-videos/handbrake/{config,watch,output} edition-videos/mediainfo/config edition-videos/avidemux/config edition-videos/makemkv/{config,output} edition-videos/mkvtoolnix/config`
|
||||
|
||||
### 1.b. Modifications des .env
|
||||
- Récupérer sur votre machine les fichiers [.env](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/handbrake-mediainfo-avidemux-makemkv-mkvtoolnix/.env) et [docker-compose.yml](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/src/branch/master/docker-compose/handbrake-mediainfo-avidemux-makemkv-mkvtoolnix/docker-compose.yml).
|
||||
|
||||
> Vous pouvez faire un clic droit - Enregistrer sous ... sur les liens ci-dessus pour télécharger les fichiers.
|
||||
|
||||
- Dans le fichier `.env` vous allez devoir modifier plusieurs chose :
|
||||
|
||||
**PUID et PGID** devront correspondre aux ID de votre utilisateurs, plus d'info ici : [Connaitre le PUID / PGID d'un utilisateur](https://www.forum-nas.fr/viewtopic.php?f=56&t=13213)
|
||||
|
||||
**RACINE** correspond au chemin vers le dossier edition-videos créé a l'étape 1.a.
|
||||
Dans ce cas, c'est : `/volume1/docker/edition-videos`
|
||||
|
||||
**RACINE** correspond au chemin vers votre dossiers de médias.
|
||||
Dans ce cas, c'est : `/storage`
|
||||
|
||||
|
||||
### 1.c Transfert des fichiers dans /edition-videos
|
||||
- Une fois les modifications effectuées, il faut transfert tous les fichiers ( .env et docker-compose.yml ) dans le dossier `/edition-videos` précédemment créé ! Par exemple, avec FileZilla.
|
||||
|
||||
## 2. Création des conteneurs
|
||||
### 2.a Création du réseau
|
||||
- On créé le reseau `edition-videos-network` necesaire au fonctionnement du conteneurs VPN :
|
||||
|
||||
```
|
||||
docker network create edition-videos-network
|
||||
```
|
||||
|
||||
### 2.b Création des conteneurs
|
||||
Maintenant que votre "stack" est prete rendez-vous dans le dossier `edition-videos`, dans mon cas `/volume1/docker/edition-videos` :
|
||||
```
|
||||
cd /volume1/docker/edition-videos
|
||||
```
|
||||
|
||||
## 3. Les Bases
|
||||
Il est possible d'utilise n'importe qu'elle interface de gestion de conteneur*, ou SSH.
|
||||
|
||||
Voici quelques commandes de base :
|
||||
|
||||
**[Portainer](https://www.forum-nas.fr/viewtopic.php?f=56&t=14030) par exemple.*
|
||||
|
||||
### 3.a Commandes de bases ( Docker )
|
||||
- Arreter un conteneur : `docker stop <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **edition-video_handbrake** : `docker stop edition-video_handbrake`
|
||||
|
||||
- Redémarrer un conteneur : `docker restart <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **edition-video_handbrake** : `docker restart edition-video_handbrake`
|
||||
|
||||
- Démarrer un conteneur : `docker start <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **edition-video_handbrake** : `docker start edition-video_handbrake`
|
||||
|
||||
- Supprimer un conteneur : `docker rm <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **edition-video_handbrake** : `docker rm edition-video_handbrake`
|
||||
|
||||
- Créer / Mettre à jour la "stack" : `docker-compose up -d`
|
||||
Cette commande permet de créer la stack présent dans le fichier docker-compose.yml, les conteneurs non-existant seront créés, les modifiés seront mis à jour.
|
||||
> Note : Vous devez etre dans la dossier contenant le fichier docker-compose.yml pour que cette commande fonctionne.
|
||||
|
||||
### 3.b Accès aux interfaces ( WebUI )
|
||||
|
||||
- L'acces à chaque service se fait via une WebUI ( Interface Web ), sur un port quil lui est propre.
|
||||
- Pour Handbrake, c'est le port `6800`. Donc l'adresse sera sous la forme : `http://IP_DE_LA_MACHINE:6800`
|
||||
Exemple : Si l'adresse IP de votre machine est `192.168.1.10`, alors l'adresse d'accès sera : `http://192.168.1.10:6800`
|
||||
|
||||
- Ci-dessus la liste des ports des interfaces de chaque service :
|
||||
| Service | Port |
|
||||
| ------ | ------ |
|
||||
| Handbrake | 6800 |
|
||||
| Mediainfo | 6801 |
|
||||
| Avidemux | 6802 |
|
||||
| MakeMKV | 6803 |
|
||||
| MKVToolNix | 6804 |
|
||||
|
||||
## 6. Aller plus loin
|
||||
- Retrouvez ici des astuces pour aller "un peu plus loin" dans la configurations de vos conteneurs, avec par exemple, la méthode pour rajouter des montages ( dossier de votre serveur dans le conteneur ), ou régler la mise à jour automatique de vos conteneurs.
|
||||
|
||||
/!\ Depuis l'interface SSH, les commandes ci-dessous sont à executer en étant à la racine de votre dossier `edition-videos`.
|
||||
|
||||
A VENIR ...
|
21
docker-compose/hasty-paste/docker-compose.yml
Normal file
@ -0,0 +1,21 @@
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2022-09-25
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
paste-bin:
|
||||
container_name: paste-bin
|
||||
image: ghcr.io/enchant97/hasty-paste:1
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- "NEW_AT_INDEX=True"
|
||||
- "UI_DEFAULT__USE_LONG_ID=True"
|
||||
- "UI_DEFAULT__EXPIRE_TIME__ENABLE=True"
|
||||
- "UI_DEFAULT__EXPIRE_TIME__MINUTES=0"
|
||||
- "UI_DEFAULT__EXPIRE_TIME__HOURS=0"
|
||||
- "UI_DEFAULT__EXPIRE_TIME__DAYS=31"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
ports:
|
||||
- 8000:8000
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: '3.3'
|
||||
services:
|
||||
heimdall:
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-03-13
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: "2.1"
|
||||
services:
|
||||
jackett:
|
||||
|
6
docker-compose/jellyfin-embystat/.env
Normal file
@ -0,0 +1,6 @@
|
||||
PUID=1000
|
||||
PGID=100
|
||||
TZ=Europe/Paris
|
||||
|
||||
RACINE=/volume1/docker
|
||||
DATA=/volume1/data
|
@ -1,56 +1,46 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-29
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
jellyfin:
|
||||
image: ghcr.io/linuxserver/jellyfin
|
||||
container_name: jellyfin
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
environment:
|
||||
- PUID=1000 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
- PGID=100 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
- TZ=Europe/Paris
|
||||
# Utiliser la commande suivant pour limiter l'usage de la RAM
|
||||
# mem_limit: 4096M
|
||||
# Decommenter les 2 lignes suivantes pour activer le transcodage matériel iGPU( si NAS/serveur compatible )
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
# devices:
|
||||
# - /dev/dri:/dev/dri
|
||||
# Network conseillé de ne pas utiliser host (pas de redirection de port) ni default_bridge car limité a 16 ip
|
||||
networks:
|
||||
- 'jellyfin_network' #si modification changer la ligne 45
|
||||
- jellyfin_embystat_network
|
||||
ports:
|
||||
- 8096:8096 # WebUI
|
||||
- 8096:8096
|
||||
volumes:
|
||||
- /volume1/docker/jellyfin/config:/config
|
||||
- /volume1/media/music:/data/music
|
||||
- /volume1/media/movies:/data/movies
|
||||
- /volume1/media/tvshow:/data/tvshow
|
||||
- ${RACINE}/jellyfin/config:/config
|
||||
- ${DATA}/jellyfin/config:/data
|
||||
restart: unless-stopped
|
||||
|
||||
embystat:
|
||||
image: ghcr.io/linuxserver/embystat
|
||||
container_name: embystat
|
||||
# Decommenter les 2 lignes suivantes pour que watchtower surveille ce conteneur
|
||||
# labels:
|
||||
# - com.centurylinklabs.watchtower.enable=true
|
||||
environment:
|
||||
- PUID=1000 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
- PGID=100 # Utiliser la commande (en SSH) : id NOM_UTILISATEUR
|
||||
- TZ=Europe/Paris
|
||||
# Network conseillé de ne pas utiliser host (pas de redirection de port) ni default_bridge car limité a 16 ip
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
- TZ=${TZ}
|
||||
networks:
|
||||
- 'jellyfin_network' #si modification de la ligne 23
|
||||
- jellyfin_embystat_network
|
||||
volumes:
|
||||
- /volume1/docker/embystat/config:/config
|
||||
- ${RACINE}/embystat/config:/config
|
||||
ports:
|
||||
- 6555:6555 # WebUI
|
||||
- 6555:6555
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
jellyfin_network:
|
||||
jellyfin_embystat_network:
|
||||
external:
|
||||
# Network conseillé de ne pas utiliser host (pas de redirection de port) ni default_bridge car limité a 16 ip
|
||||
name: 'jellyfin_network' #si modification de la ligne 23 et 45
|
||||
name: jellyfin_embystat_network
|
117
docker-compose/jellyfin-embystat/readme.md
Normal file
@ -0,0 +1,117 @@
|
||||
Installation de la stack "Jellyfin-EmbyStat"
|
||||
============
|
||||
|
||||
Bienvenue sur mon nouveau tutoriel. Celui-ci, je l'espere va vous apprendre à installer Jellyfin et EmbyStat simplement via docker.
|
||||
|
||||
Cette stack docker-compose contient les logiciels suivants :
|
||||
| Nom du service | Site Officiel | Dépot utilisé* |
|
||||
| ------ | ------ | ------ |
|
||||
| Jellyfin | [Jellyfin](https://jellyfin.org/) | [Linuxserver](https://github.com/linuxserver/docker-jellyfin) |
|
||||
| EmbyStat | [EmbyStat](https://github.com/mregni/EmbyStat) | [Linuxserver](https://github.com/linuxserver/docker-embystat) |
|
||||
|
||||
## Table des matières
|
||||
- 1. [Prérequis](#1-prérequis)
|
||||
- 1.a [Création des dossiers](#1-a-création-des-dossiers)
|
||||
- 1.b [Modifications du .env](#1-b-modifications-du-env)
|
||||
- 1.c [Transfert des fichiers dans /jellyfin_embystat](#1-c-transfert-des-fichiers-dans-jellyfin-embystat)
|
||||
- 2. [Création des conteneurs](#2-création-des-conteneurs)
|
||||
- 2.a [Création du réseau](#2-a-création-du-réseau)
|
||||
- 2.b [Création des conteneurs](#2-b-création-des-conteneurs)
|
||||
- 3. [Les Bases](#3-les-bases)
|
||||
- 3.a [Commandes de bases ( Docker )](#3-a-commandes-de-bases-docker)
|
||||
- 3.b [Accès aux interfaces ( WebUI )](#3-b-accès-aux-interfaces-webui)
|
||||
- 4. Dépannage ( Ce construira au fur et a mesure des questions )
|
||||
|
||||
## 1. Prérequis
|
||||
|
||||
- Cette stack est concu pour fonctionner dans un dossier `jellyfin_embystat`, avec l'architecture suivante :
|
||||
```
|
||||
jellyfin_embystat ---- jellyfin ------- config
|
||||
|
|
||||
|-- embystat ------- config
|
||||
```
|
||||
|
||||
- Dans le paragraphe 1.a nous allons les créer avec une ligne de commande, et dans le paragraphe 1.b nous allons modifier le .env afin qu'il utilise bien ces dossiers ( en fonction de leurs localisation sur votre machine ).
|
||||
|
||||
### 1.a. Création des dossiers
|
||||
|
||||
- Avec `cd` aller dans le dossier de votre choix, par exemple "docker".
|
||||
Exemple : Si votre dossier "docker" ce trouve dans /volume1, alors la commande sera :
|
||||
`cd /volume1/docker`
|
||||
|
||||
- Maintenant que nous sommes dans le bon dossier, nous allons executer la commande suivante pour créer d'un coup, toute l'architecture nécessaire :
|
||||
|
||||
`mkdir -p jellyfin_embystat/jellyfin/config jellyfin_embystat/embystat/config`
|
||||
|
||||
### 1.b. Modifications des .env
|
||||
- Récupérer sur votre machine les fichiers [.env](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/docker-compose/jellyfin-embystat/.env) et [docker-compose.yml](https://gitea.zoz-serv.org/Zoz/plex_fr_discord_repo/raw/branch/master/docker-compose/jellyfin-embystat/docker-compose.yml).
|
||||
|
||||
> Vous pouvez faire un clic droit - Enregistrer sous ... sur les liens ci-dessus pour télécharger les fichiers.
|
||||
|
||||
- Dans le fichier `.env` vous allez devoir modifier plusieurs chose :
|
||||
|
||||
**PUID et PGID** devront correspondre aux ID de votre utilisateurs, plus d'info ici : [Connaitre le PUID / PGID d'un utilisateur](https://www.forum-nas.fr/viewtopic.php?f=56&t=13213)
|
||||
|
||||
**RACINE** correspond au chemin vers le dossier jellyfin_embystat créé a l'étape 1.a.
|
||||
Dans ce cas, c'est : `/volume1/docker/jellyfin_embystat`
|
||||
|
||||
**DATA** correspond au chemin vers votre dossiers de médias.
|
||||
Dans ce cas, c'est : `/volume1/data`
|
||||
|
||||
|
||||
### 1.c Transfert des fichiers dans /jellyfin_embystat
|
||||
- Une fois les modifications effectuées, il faut transfert tous les fichiers ( .env et docker-compose.yml ) dans le dossier `/jellyfin_embystat` précédemment créé ! Par exemple, avec FileZilla.
|
||||
|
||||
## 2. Création des conteneurs
|
||||
### 2.a Création du réseau
|
||||
- On créé le reseau `jellyfin_embystat_network` necesaire au fonctionnement du conteneurs VPN :
|
||||
|
||||
```
|
||||
docker network create jellyfin_embystat_network
|
||||
```
|
||||
|
||||
### 2.b Création des conteneurs
|
||||
Maintenant que votre "stack" est prete rendez-vous dans le dossier `jellyfin_embystat`, dans mon cas `/volume1/docker/jellyfin_embystat` :
|
||||
```
|
||||
cd /volume1/docker/jellyfin_embystat
|
||||
```
|
||||
|
||||
## 3. Les Bases
|
||||
Il est possible d'utilise n'importe qu'elle interface de gestion de conteneur*, ou SSH.
|
||||
|
||||
Voici quelques commandes de base :
|
||||
|
||||
**[Portainer](https://www.forum-nas.fr/viewtopic.php?f=56&t=14030) par exemple.*
|
||||
|
||||
### 3.a Commandes de bases ( Docker )
|
||||
- Arreter un conteneur : `docker stop <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **jellyfin** : `docker stop jellyfin`
|
||||
|
||||
- Redémarrer un conteneur : `docker restart <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **jellyfin** : `docker restart jellyfin`
|
||||
|
||||
- Démarrer un conteneur : `docker start <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **jellyfin** : `docker start jellyfin`
|
||||
|
||||
- Supprimer un conteneur : `docker rm <nom_du_conteneur>`
|
||||
Exemple pour le conteneur **jellyfin** : `docker rm jellyfin`
|
||||
|
||||
- Créer / Mettre à jour la "stack" : `docker-compose up -d`
|
||||
Cette commande permet de créer la stack présent dans le fichier docker-compose.yml, les conteneurs non-existant seront créés, les modifiés seront mis à jour.
|
||||
> Note : Vous devez etre dans la dossier contenant le fichier docker-compose.yml pour que cette commande fonctionne.
|
||||
|
||||
### 3.b Accès aux interfaces ( WebUI )
|
||||
|
||||
- L'acces à chaque service se fait via une WebUI ( Interface Web ), sur un port quil lui est propre.
|
||||
- Pour Jellyfin, c'est le port `8096`. Donc l'adresse sera sous la forme : `http://IP_DE_LA_MACHINE:8096`
|
||||
Exemple : Si l'adresse IP de votre machine est `192.168.1.10`, alors l'adresse d'accès sera : `http://192.168.1.10:8096`
|
||||
|
||||
- Ci-dessus la liste des ports des interfaces de chaque service :
|
||||
| Service | Port |
|
||||
| ------ | ------ |
|
||||
| Jellyfin | 8096 |
|
||||
| EmbyStat | 6555 |
|
||||
|
||||
## 6. Dépannage
|
||||
A VENIR ...
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-03-13
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: "2.1"
|
||||
services:
|
||||
lidarr:
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-03-05
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
|
@ -1,5 +1,5 @@
|
||||
## Discord Plex FR : https://discord.gg/ERpYMqS
|
||||
## Version 2021-02-26
|
||||
## Discord Plex FR : https://discord.gg/3gtABCH
|
||||
## Version 2021-08-23
|
||||
version: '3.3'
|
||||
services:
|
||||
linuxserver:
|
||||
|
@ -1,5 +0,0 @@
|
||||
RT_DHT_PORT=6881
|
||||
XMLRPC_PORT=8000
|
||||
RUTORRENT_PORT=8080
|
||||
WEBDAV_PORT=9000
|
||||
RT_INC_PORT=50000
|