<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Synchronzied scrolling with timestamp]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I’ve got two log files. Each line has a timestamp, both using the same format. Can I configure the synchronized scrolling to sync with the according timestamp? Is there an Addon?<br />
Example of line:<br />
2023/01/19 10:44:58.362 {STRING}</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24036/synchronzied-scrolling-with-timestamp</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 19:11:14 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24036.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Jan 2023 08:17:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Synchronzied scrolling with timestamp on Fri, 20 Jan 2023 19:35:02 GMT]]></title><description><![CDATA[<p dir="auto">And, for completeness, to go back the other way:</p>
<pre><code class="language-py">def custom_replace_func2(m):
    secs_as_str = m.group(0)[0:10]
    msecs_as_str = m.group(0)[10:13]
    secs_as_float = float(secs_as_str) + (float(msecs_as_str) / 1000.0)
    dt_from_utc_epoch = dt.utcfromtimestamp(secs_as_float)
    return dt_from_utc_epoch.strftime('%Y/%m/%d %H:%M:%S.%f')[:-3]

editor.rereplace(r'^\d{13}(?=A)', custom_replace_func2)
</code></pre>
<p dir="auto">Will take:</p>
<pre><code class="language-txt">1674125098362A
1674125099365A
1674125105998A
1674125217380A
1674207312267A
1674207863334A
</code></pre>
<p dir="auto">and produce:</p>
<pre><code class="language-txt">2023/01/19 10:44:58.362A
2023/01/19 10:44:59.365A
2023/01/19 10:45:05.998A
2023/01/19 10:46:57.038A
2023/01/20 09:35:12.267A
2023/01/20 09:44:23.334A
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/83473</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83473</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 20 Jan 2023 19:35:02 GMT</pubDate></item><item><title><![CDATA[Reply to Synchronzied scrolling with timestamp on Fri, 20 Jan 2023 13:55:09 GMT]]></title><description><![CDATA[<p dir="auto">As a kickstarter down the solution path from my earlier idea, here’s probably the most difficult scripting piece:</p>
<pre><code class="language-py">from datetime import datetime as dt

def custom_replace_func(m):
    dt_matched_time = dt.strptime(m.group(0), '%Y/%m/%d %H:%M:%S.%f')
    epoch_diff = dt_matched_time - dt(1970, 1, 1)
    epoch_secs_as_str = str(int(epoch_diff.total_seconds()))
    msecs_as_str = str(epoch_diff.microseconds)[0:3]
    return epoch_secs_as_str + msecs_as_str + 'A'

editor.rereplace(r'^\d{4}/\d\d/\d\d \d\d:\d\d:\d\d\.\d{3}', custom_replace_func)
</code></pre>
<p dir="auto">That script will take text data like this in the active file tab:</p>
<pre><code class="language-txt">2023/01/19 10:44:58.362
2023/01/19 10:44:59.365
2023/01/19 10:45:05.998
2023/01/19 10:46:57.038
2023/01/20 09:35:12.267
2023/01/20 09:44:23.334
</code></pre>
<p dir="auto">And convert it to this:</p>
<pre><code class="language-txt">1674125098362A
1674125099365A
1674125105998A
1674125217380A
1674207312267A
1674207863334A
</code></pre>
<p dir="auto">This has its roots in the FAQ about customized replacement via script, see <a href="https://community.notepad-plus-plus.org/topic/23170/faq-desk-can-i-do-a-mathematical-replacement">HERE</a> for more details about that type of thing.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83468</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83468</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 20 Jan 2023 13:55:09 GMT</pubDate></item><item><title><![CDATA[Reply to Synchronzied scrolling with timestamp on Thu, 19 Jan 2023 18:54:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/basti-klein" aria-label="Profile: Basti-Klein">@<bdi>Basti-Klein</bdi></a></p>
<p dir="auto">Not at all an answer to your direct question, but in the spirit of possibly “getting your task done”…</p>
<p dir="auto">You might try a script conversion on your data that changes the leading timestamp on a line to a number of epoch milliseconds.  Then for file “A” append an <code>A</code> to the time value, for file “B” append a <code>B</code>.  Then combine all the data into one (temporary) file and sort it.</p>
<p dir="auto">So as an example of what it might look like after the sorting might be:</p>
<pre><code class="language-txt">1674125098362A foo
1674125098369B bar
</code></pre>
<p dir="auto">etc.</p>
<p dir="auto">Then I suppose convert the epoch milliseconds value back into a readable time (leaving the <code>A</code> and <code>B</code> in place and you can browse all data in one file, in order of time.</p>
<p dir="auto">Sounds like a lot of work, but, depending on your need it may be worth it?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83450</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83450</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 19 Jan 2023 18:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to Synchronzied scrolling with timestamp on Thu, 19 Jan 2023 14:02:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/basti-klein" aria-label="Profile: Basti-Klein">@<bdi>Basti-Klein</bdi></a> said in <a href="/post/83441">Synchronzied scrolling with timestamp</a>:</p>
<blockquote>
<p dir="auto">Can I configure the synchronized scrolling to sync with the according timestamp?</p>
</blockquote>
<p dir="auto">No. Wherever the two views are showing when you select <strong>View &gt; Synchronize Vertical Scrolling</strong> will become the point at which the two files are synchronized.</p>
<blockquote>
<p dir="auto">Is there an Addon?</p>
</blockquote>
<p dir="auto">There is not a plugin (that I know of) whose primary purpose is synchronizing two files based on timestamp (or based on a regex, or some such).  Though depending on your needs, ComparePlus (which has an internal algorithm to try to align partially-matching files) <em>might</em> be able to sync things up the way you want, depending on how the other lines in your data compare.  If I were you, that would be my first try.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/83446</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/83446</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 19 Jan 2023 14:02:27 GMT</pubDate></item></channel></rss>