mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Formatting (whitespace only)
This commit is contained in:
parent
5b312d4a3a
commit
251f0378af
@ -2110,6 +2110,7 @@ can edit in same subtitle file (collaboration)",
|
||||
AdjustSetStartTimeKeepDuration = "Set start time, keep duration",
|
||||
AdjustSetEndAndOffsetTheRest = "Set end, offset the rest",
|
||||
AdjustSetEndAndOffsetTheRestAndGoToNext = "Set end, offset the rest and go to next",
|
||||
AdjustExtendCurrentSubtitle = "Extend current line to next subtitle or max duration",
|
||||
MainCreateStartDownEndUp = "Create new at key-down, set end time at key-up",
|
||||
MergeDialog = "Merge dialog (insert dashes)",
|
||||
GoToNext = "Go to next line",
|
||||
@ -2117,7 +2118,6 @@ can edit in same subtitle file (collaboration)",
|
||||
GoToCurrentSubtitleStart = "Go to current line start",
|
||||
GoToCurrentSubtitleEnd = "Go to current line end",
|
||||
GoToNextSubtitleAndFocusVideo = "Go to next line and set video position",
|
||||
AdjustExtendCurrentSubtitle = "Extend current line to next subtitle or max duration",
|
||||
ToggleFocus = "Toggle focus between list view and subtitle text box",
|
||||
ToggleDialogDashes = "Toggle dialog dashes",
|
||||
Alignment = "Alignment (selected lines)",
|
||||
|
@ -2495,7 +2495,6 @@
|
||||
public string RemoveSceneChange { get; set; }
|
||||
public string GuessTimeCodes { get; set; }
|
||||
public string SeekSilence { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class WaveformGenerateTimeCodes
|
||||
|
@ -33,125 +33,125 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
const string xmpTemplate = @"<?xml version='1.0' encoding='UNICODE'?>
|
||||
<MediaTransData Version='1'>
|
||||
<Settings Version='1'>
|
||||
<Type></Type>
|
||||
<Description Version='1'>
|
||||
<Count>2</Count>
|
||||
<Item1>For editing SDTV video</Item1>
|
||||
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
||||
</Description>
|
||||
<General Version='1'>
|
||||
<EditingMode>SDTV</EditingMode>
|
||||
<Timebase>25.00 fps</Timebase>
|
||||
<DropFrame>True</DropFrame>
|
||||
<Horizontal>720</Horizontal>
|
||||
<Vertical>400</Vertical>
|
||||
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
||||
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
||||
<Editor>
|
||||
<LineSeparator>|</LineSeparator>
|
||||
</Editor>
|
||||
</General>
|
||||
<Render Version='1'>
|
||||
<Location>Default</Location>
|
||||
<Name>Default</Name>
|
||||
<Type>24Bit PNG</Type>
|
||||
<Index>0001</Index>
|
||||
<ExportPartial>False</ExportPartial>
|
||||
<ServerData Version='1'>
|
||||
<Track>0</Track>
|
||||
<Field>1</Field>
|
||||
<PAC>False</PAC>
|
||||
<Category>Default</Category>
|
||||
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
||||
<Timecode>Default</Timecode>
|
||||
<NBJ>False</NBJ>
|
||||
</ServerData>
|
||||
</Render>
|
||||
<TimecodeBase Version='1'>
|
||||
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
||||
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
||||
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
||||
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
||||
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
||||
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
||||
</TimecodeBase>
|
||||
</Settings>
|
||||
<Movie Version='1'>
|
||||
<Name>C:\Project\uknown.mpg</Name>
|
||||
<Format>29.97DF</Format>
|
||||
</Movie>
|
||||
<Tracks Version='1'>
|
||||
<Count>1</Count>
|
||||
<Track1 Version='1'>
|
||||
<Owner></Owner>
|
||||
<Name>Track 1</Name>
|
||||
<Enabled>True</Enabled>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<Columns Version='1'>
|
||||
<Count>7</Count>
|
||||
<Column1>
|
||||
<Name>No</Name>
|
||||
<Length>40</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column1>
|
||||
<Column2>
|
||||
<Name>In</Name>
|
||||
<Length>64</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column2>
|
||||
<Column3>
|
||||
<Name>Out</Name>
|
||||
<Length>66</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column3>
|
||||
<Column4>
|
||||
<Name>Style</Name>
|
||||
<Length>15</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column4>
|
||||
<Column5>
|
||||
<Name>StyleEx</Name>
|
||||
<Length>96</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column5>
|
||||
<Column6>
|
||||
<Name>Comment</Name>
|
||||
<Length>77</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column6>
|
||||
<Column7>
|
||||
<Name>Language 01</Name>
|
||||
<Length>349</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column7>
|
||||
</Columns>
|
||||
<Rows Version='1'>
|
||||
<Count>4096</Count>
|
||||
</Rows>
|
||||
<Data Version='1'>
|
||||
<Count>[COUNT]</Count>
|
||||
</Data>
|
||||
<Highlights Version='1'>
|
||||
<Count>0</Count>
|
||||
</Highlights>
|
||||
</Track1>
|
||||
</Tracks>
|
||||
<Settings Version='1'>
|
||||
<Type></Type>
|
||||
<Description Version='1'>
|
||||
<Count>2</Count>
|
||||
<Item1>For editing SDTV video</Item1>
|
||||
<Item2>Standard PAL video (4:3interlaced)</Item2>
|
||||
</Description>
|
||||
<General Version='1'>
|
||||
<EditingMode>SDTV</EditingMode>
|
||||
<Timebase>25.00 fps</Timebase>
|
||||
<DropFrame>True</DropFrame>
|
||||
<Horizontal>720</Horizontal>
|
||||
<Vertical>400</Vertical>
|
||||
<ScreenAspectRatio>720/400</ScreenAspectRatio>
|
||||
<PixelAspectRatio>D1/DV PAL (1.067)</PixelAspectRatio>
|
||||
<Editor>
|
||||
<LineSeparator>|</LineSeparator>
|
||||
</Editor>
|
||||
</General>
|
||||
<Render Version='1'>
|
||||
<Location>Default</Location>
|
||||
<Name>Default</Name>
|
||||
<Type>24Bit PNG</Type>
|
||||
<Index>0001</Index>
|
||||
<ExportPartial>False</ExportPartial>
|
||||
<ServerData Version='1'>
|
||||
<Track>0</Track>
|
||||
<Field>1</Field>
|
||||
<PAC>False</PAC>
|
||||
<Category>Default</Category>
|
||||
<Subtitle>FOX-HD-Malaysia</Subtitle>
|
||||
<Timecode>Default</Timecode>
|
||||
<NBJ>False</NBJ>
|
||||
</ServerData>
|
||||
</Render>
|
||||
<TimecodeBase Version='1'>
|
||||
<FramesPerSecTimesOneHundred>2500</FramesPerSecTimesOneHundred>
|
||||
<UseTimecodeBaseOfFile>FALSE</UseTimecodeBaseOfFile>
|
||||
<TimecodeBaseOfFile>00:00:00:00</TimecodeBaseOfFile>
|
||||
<RepeatOfTimecodeBaseOfFile>1</RepeatOfTimecodeBaseOfFile>
|
||||
<TimecodeBaseUserSupplied>09:59:35:00</TimecodeBaseUserSupplied>
|
||||
<RepeatOfTimecodeBaseUserSupplied>1</RepeatOfTimecodeBaseUserSupplied>
|
||||
</TimecodeBase>
|
||||
</Settings>
|
||||
<Movie Version='1'>
|
||||
<Name>C:\Project\uknown.mpg</Name>
|
||||
<Format>29.97DF</Format>
|
||||
</Movie>
|
||||
<Tracks Version='1'>
|
||||
<Count>1</Count>
|
||||
<Track1 Version='1'>
|
||||
<Owner></Owner>
|
||||
<Name>Track 1</Name>
|
||||
<Enabled>True</Enabled>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<Columns Version='1'>
|
||||
<Count>7</Count>
|
||||
<Column1>
|
||||
<Name>No</Name>
|
||||
<Length>40</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column1>
|
||||
<Column2>
|
||||
<Name>In</Name>
|
||||
<Length>64</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column2>
|
||||
<Column3>
|
||||
<Name>Out</Name>
|
||||
<Length>66</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column3>
|
||||
<Column4>
|
||||
<Name>Style</Name>
|
||||
<Length>15</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column4>
|
||||
<Column5>
|
||||
<Name>StyleEx</Name>
|
||||
<Length>96</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column5>
|
||||
<Column6>
|
||||
<Name>Comment</Name>
|
||||
<Length>77</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column6>
|
||||
<Column7>
|
||||
<Name>Language 01</Name>
|
||||
<Length>349</Length>
|
||||
<Locked>False</Locked>
|
||||
<Password></Password>
|
||||
<NonText>False</NonText>
|
||||
</Column7>
|
||||
</Columns>
|
||||
<Rows Version='1'>
|
||||
<Count>4096</Count>
|
||||
</Rows>
|
||||
<Data Version='1'>
|
||||
<Count>[COUNT]</Count>
|
||||
</Data>
|
||||
<Highlights Version='1'>
|
||||
<Count>0</Count>
|
||||
</Highlights>
|
||||
</Track1>
|
||||
</Tracks>
|
||||
</MediaTransData>";
|
||||
|
||||
const string paragraphTemplate = @"
|
||||
@ -161,14 +161,14 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
<StyleEx></StyleEx>
|
||||
<Comment></Comment>
|
||||
<Fields Version=""2"">
|
||||
<Field1>
|
||||
<Type>Text</Type>
|
||||
<Data>Line1|Line2</Data>
|
||||
</Field1>
|
||||
<Field1>
|
||||
<Type>Text</Type>
|
||||
<Data>Line1|Line2</Data>
|
||||
</Field1>
|
||||
</Fields>";
|
||||
|
||||
var xml = new XmlDocument();
|
||||
xml.LoadXml(xmpTemplate.Replace('\'', '"').Replace("[COUNT]", subtitle.Paragraphs.Count.ToString()));
|
||||
xml.LoadXml(xmpTemplate.Replace("[COUNT]", subtitle.Paragraphs.Count.ToString()));
|
||||
var paragraphInsertNode = xml.DocumentElement.SelectSingleNode("Tracks/Track1/Data");
|
||||
int count = 1;
|
||||
foreach (Paragraph p in subtitle.Paragraphs)
|
||||
|
@ -107,8 +107,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
nsmgr.AddNamespace("tts", "http://www.w3.org/ns/10/ttml#style");
|
||||
nsmgr.AddNamespace("ttm", "http://www.w3.org/ns/10/ttml#metadata");
|
||||
|
||||
string xmlStructure =
|
||||
@"<?xml version='1.0' encoding='utf -8' ?>
|
||||
const string xmlStructure = @"<?xml version='1.0' encoding='utf-8'?>
|
||||
<tt xmlns='http://www.w3.org/ns/ttml' xmlns:ttm='http://www.w3.org/ns/ttml#metadata' xmlns:tts='http://www.w3.org/ns/ttml#styling' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
||||
<head>
|
||||
<metadata>
|
||||
@ -123,10 +122,9 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
</layout>
|
||||
</head>
|
||||
<body>
|
||||
<div style='s1' xml:id='d1'>
|
||||
</div>
|
||||
<div style='s1' xml:id='d1'></div>
|
||||
</body>
|
||||
</tt>".Replace("'", "\"");
|
||||
</tt>";
|
||||
xml.LoadXml(xmlStructure);
|
||||
if (!string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
@ -308,7 +306,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
get
|
||||
{
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
var timeCodes = line.Substring(line.IndexOf(")", StringComparison.Ordinal) + 1, line.IndexOf("Durée", StringComparison.Ordinal) - 2).Trim().Split(" \t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
p = new Paragraph(string.Empty, TimeCode.ParseHHMMSSFFToMilliseconds(timeCodes[0]), TimeCode.ParseHHMMSSFFToMilliseconds(timeCodes[1]));
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
@ -522,7 +522,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (pos > 0 && pos < Width)
|
||||
{
|
||||
if (Math.Abs(currentPositionPos - pos) < 0.01)
|
||||
{ // scene change and current pos is the save - draw 2 pixels + current pos dotted
|
||||
{ // scene change and current pos are the same - draw 2 pixels + current pos dotted
|
||||
currentPosDone = true;
|
||||
using (var p = new Pen(Color.AntiqueWhite, 2))
|
||||
graphics.DrawLine(p, pos, 0, pos, Height);
|
||||
|
@ -911,10 +911,10 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
Configuration.Settings.Tools.ExportTextShowTimeCodes,
|
||||
string.Empty,
|
||||
Configuration.Settings.Tools.ExportTextRemoveStyling,
|
||||
Configuration.Settings.Tools.ExportTextFormatText == "Unbreak",
|
||||
Configuration.Settings.Tools.ExportTextFormatText == "Unbreak",
|
||||
Configuration.Settings.Tools.ExportTextNewLineAfterText,
|
||||
Configuration.Settings.Tools.ExportTextNewLineBetweenSubtitles,
|
||||
Configuration.Settings.Tools.ExportTextFormatText == "MergeAll"), targetEncoding);
|
||||
Configuration.Settings.Tools.ExportTextFormatText == "MergeAll"), targetEncoding);
|
||||
Console.WriteLine(" done.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user