<?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[Join lines from clipboard data]]></title><description><![CDATA[<p dir="auto">So I’m not really sure if this is possible, but if someone knows a way it would make my life much easier.</p>
<p dir="auto">Essentially I have to copy lots of data from PDFs to write the data into JSON format. Unfortunately copying the text from the PDF introduces many unnecessary line breaks. My solution, and workflow that I’d like to cut down on goes like this:</p>
<p dir="auto">Copy lines from PDF<br />
Paste into separate Notepad++ file<br />
Ctrl+J to join the lines<br />
Re-select everything and cut<br />
Paste the data where it needs to go in the JSON</p>
<p dir="auto">Ultimately this process is very tedious. What I’d like to do is be able to copy the lines from the PDF I want,  and then be able to join the lines in the clipboard data and paste it in the JSON in one go. Is this possible at all? Thank you very much in advance.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/20656/join-lines-from-clipboard-data</link><generator>RSS for Node</generator><lastBuildDate>Sat, 16 May 2026 07:52:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/20656.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Jan 2021 21:32:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 21:22:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said in <a href="/post/62384">Join lines from clipboard data</a>:</p>
<blockquote>
<p dir="auto">it seems better to always use raw strings. I mean… when using regexes, of course</p>
</blockquote>
<p dir="auto">I would say this is true.</p>
<p dir="auto">Probably most normal Pythoners don’t use a lot of backslashes in their strings, so the simple <code>"..."</code> syntax works fine.</p>
<p dir="auto">And you certainly <em>can</em> use <code>"..."</code> with regex as well, but just remember to “double up” every backslash if you do.  (But that can make your regexes a nightmare to look at).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62386</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62386</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 21:22:25 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 21:05:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah, very <strong>interesting</strong> insight, indeed ;-))</p>
<p dir="auto">Yes, it’s not sometimes <strong>easy</strong> to know <em>when</em> characters are <strong>interpreted</strong>, if different <strong>nested</strong> processes are involved !</p>
<p dir="auto">So, globally, in <strong>most</strong> situations, it seems better to <strong>always</strong> use <strong>raw</strong> strings. I mean… when using <strong>regexes</strong>, of course</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62384</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62384</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 31 Jan 2021 21:05:41 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 20:32:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<p dir="auto">So back to your examples.<br />
It all <em>does</em> make sense.<br />
Here’s how:</p>
<p dir="auto">The first example is <code>'(\x40?\w)+'</code>.</p>
<p dir="auto">What happens here is that Python encodes <code>\x40</code> as a single character and passes it to the <code>research</code> function.  Because <code>\x40</code> is <code>@</code> it works.</p>
<p dir="auto">Had you done, <code>r'(\x40?\w)+'</code> instead, Python would NOT have touched the <code>\x40</code> part, and would have passed it as 4 distinct characters.  The <code>research</code> function would have passed these same 4 characters into the Boost regex engine, and inside there it would have seen the notation <code>\x40</code> and converted 4 characters into one, equivalent to <code>@</code>.  So the difference is WHERE the encoding of the four characters is done.</p>
<p dir="auto">Thus, for the first example, it is successful either way, with a normal Python string or a raw string.  It just gets there by different routes.</p>
<p dir="auto">The second example is <code>'(\x00?\w)+'</code>.  What happens here is that the <code>\x00</code> gets encoded into a single NUL byte at Python decode time, and because (often) C strings are NUL-terminated, meaning the NUL signals the end of the string, what happens is that only a single <code>(</code> – what comes before the NUL in your string – is seen by the regex engine.  The regex engine returns that that is clearly a badly formed regex, and says:</p>
<p dir="auto"><code>RuntimeError: Unmatched marking parenthesis ( or \(.</code></p>
<p dir="auto">When we move to the third example (related to the second), specifically: <code>r'(\x00?\w)+'</code>, you are again shifting the decoding to late in the game – when Boost gets hold of it.  Thus, here Boost sees <code>(\x00?\w)+</code> – each individual character in that – and things work.  The string won’t get NUL-terminated early.  Boost gets a chance at the whole string.</p>
<p dir="auto">Hopefully this makes sense.</p>
<p dir="auto">The bottom line is that Python will use some of the same “escape sequences” that regex will use, if you give it a chance to.  By “give it a chance to”, I mean by using a plain string with the syntax <code>"..."</code> (note, no little <strong>r</strong> preceding).</p>
<p dir="auto">If you want Python to leave your strings alone, so that they are passed fully as typed, to something else, e.g., the regex engine, wrap them as a raw string, i.e., <code>r"..."</code>.</p>
<p dir="auto">So, what happens to the <code>\w</code> in the first example, when Python sees it?  There is no <strong>r</strong> out front, so Python scans the string and can do things to it.  Well, the answer is that Python does not know what <code>\w</code> is, so that it sends it on as 2 characters, <code>\</code> and <code>w</code>.  Thus this goes on to Boost just as intended.</p>
<p dir="auto">There’s yet another caveat.  In a <code>r"..."</code> string, normally any <code>\</code> are just literal characters, but if you want your final character in the string to be a backslash, you must double it!  Thus if you type <code>a=r'abc\'</code> at the console, you’ll get an error:</p>
<p dir="auto"><code>SyntaxError: EOL while scanning string literal</code></p>
<p dir="auto">so you’d need to do:</p>
<p dir="auto"><code>a = r'abc\\'</code></p>
<p dir="auto">instead.  This most often comes up when specifying a directory, example:</p>
<p dir="auto"><code>mydir = r"c:\mydir1\mysubdir2\\"</code></p>
<p dir="auto">So just some explanation about this; hopefully it helps in some way.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62381</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62381</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 20:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 17:39:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<p dir="auto">Without looking into your specific examples just now – I’ll do that later, after my own “Cheers!” moments – I’ll say:</p>
<p dir="auto">If you follow the rules, you get what is expected.  If you don’t follow the rules, you get “unexpected” behavior – which could sometimes be what you expect, or often not!</p>
<p dir="auto">The approximate rules are:</p>
<ul>
<li>
<p dir="auto">If you are going to use a regular string, i.e., <code>"..."</code> and that string is going to contain a literal backslash, you must double that backslash (to escape it).</p>
</li>
<li>
<p dir="auto">If you are going to use a “raw” string, i.e., <code>r"..."</code>, then you do NOT (typically!) double any backslashes.  This would be the preferred way to do it for someone that writes a lot of literal paths in their source code, or someone that works heavily with regex.</p>
</li>
</ul>
<p dir="auto">Of course, there’s a bit more to the story, but that will come in a later posting…</p>
<p dir="auto">There’s also “byte strings” and “unicode strings”, denoted <code>b"..."</code> and <code>u"..."</code> respectively, but these are mainly (but not always) Python3 things, and Python3 for PythonScript is still in beta, so we won’t really discuss them.</p>
<p dir="auto">Also note that we aren’t going too far off the topic of N++ with this, just enough for scriptwriters – definitely “on-topic”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62378</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62378</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 17:39:57 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 17:21:46 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>,</p>
<p dir="auto">As you just spoke about <strong>normal</strong> and <strong>raw</strong> strings, this made me remember of something <strong>weird</strong> in <strong>Python</strong> world !</p>
<p dir="auto">I used your script, below, to test the <strong>statistics</strong> of some files, included <strong><code>.exe</code></strong> ones</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/61801">https://community.notepad-plus-plus.org/post/61801</a></p>
<p dir="auto">In the <strong>initial</strong> script, the <strong>search</strong> regex is simply <strong><code>'\w+'</code></strong>. But I needed this regex <strong><code>'(\x00?[A-Za-z0-9_])+'</code></strong> and it did <strong>not</strong> work. I had to use <strong>raw</strong> string, so the regex <strong><code>r'(\x00?[A-Za-z0-9_])+'</code></strong> !</p>
<hr />
<p dir="auto">For instance,</p>
<ul>
<li>
<p dir="auto">In a <strong>new</strong> tab, type the simple string <strong><code>@ABCDE</code></strong></p>
</li>
<li>
<p dir="auto">Run the <strong>tiny</strong> script, below, executed from the <strong>console</strong> ( May be, <strong>Alan</strong>, it’s not a <strong>good Python</strong> construction but it works !! )</p>
</li>
</ul>
<pre><code class="language-py">console.clear() ; editor.research ('(\x40?\w)+', lambda m: console.write (m.group(0)))
</code></pre>
<p dir="auto">It correctly write the string <strong><code>@ABCDE</code></strong> on the console</p>
<ul>
<li>
<p dir="auto">Now, change the <strong><code>@</code></strong> char with the <strong><code>NUL</code></strong> char, with the help of the <strong><code>Character Panel</code></strong></p>
</li>
<li>
<p dir="auto">Run this <strong>similar</strong> script :</p>
</li>
</ul>
<pre><code class="language-py">console.clear() ; editor.research ('(\x00?\w)+', lambda m: console.write (m.group(0)))
</code></pre>
<p dir="auto">This time, we get an <strong>error</strong> !</p>
<p dir="auto">Then, run this <strong>third</strong> try, using a <strong>raw</strong> string :</p>
<pre><code class="language-py">console.clear() ; editor.research (r'(\x00?\w)+', lambda m: console.write (m.group(0)))
</code></pre>
<p dir="auto">Wow ! It works as <strong>expected</strong> and displays the <strong><code>NUL</code></strong> char followed with the string <strong><code>ABCDE</code></strong>, on the <strong>console</strong></p>
<p dir="auto">I hope, I’m <strong>not</strong> disturbing you too much ;-))</p>
<p dir="auto">See you later,</p>
<p dir="auto">Cheers ( almost the <strong>right</strong> moment, in France ! )</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62375</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62375</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 31 Jan 2021 17:21:46 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 15:54:34 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">I used a plain string above, with ‘\r\n’, which encodes a CR and a LF (because the backslash is an “escape”)</p>
</blockquote>
<p dir="auto">Probably that was a bad example, to illustrate my point about raw strings versus not, in Python.  Why?</p>
<p dir="auto">Because <code>editor.rereplace('\r\n'), ' '</code> and <code>editor.rereplace(r'\r\n', ' ')</code> will do exactly the same thing (for different reasons) when run.</p>
<p dir="auto">In the first case, without the <em><strong>r</strong></em>, the literal characters for carriage-return and line-feed will be searched for; in the second case, they are first interpreted – as regular expression <code>\r</code> and <code>\n</code>, respectively.  In the end it is the same effect, but…bad example for illustrating the point.</p>
<p dir="auto">Also, I probably should have used <code>r'\R'</code>, anyway – and that one is really obvious that we are handing over interpretation to the regex engine, because there is no such <code>\R</code> character!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62373</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62373</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 15:54:34 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 14:50:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<p dir="auto">:-)</p>
<p dir="auto">Perhaps this <code>editor3h</code> technique could help you with the regex stuff you do.  A short script is a probably easier to work with than macros (for those cases where you are building up several regex replacements in a row).  The above script seems to contain all the examples you’d need.</p>
<p dir="auto">One thing to be careful of is, when using Python strings to contain regexes:  Sometimes you want “raw” strings, and sometimes plain strings.  I used a plain string above, with <code>'\r\n'</code>, which encodes a CR and a LF (because the backslash is an “escape”).  Often with regexes, though, you want backslashes to actually <em>be</em> themselves, in which case you do your string with an <em><strong>r</strong></em> out front, e.g. <code>r'...'</code> or <code>r"..."</code>.</p>
<p dir="auto">These should be equivalent, but which one is easier to read when you’d rather be thinking about regex content, rather than proper backslashing?:</p>
<pre><code class="language-z">myregex1 = "\\(.*?\\)"  # find literal ( followed by some chars followed by literal )
myregex2 = r"\(.*?\)"  # same, but easier to read and think about
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/62372</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62372</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 14:50:30 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 14:17:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-kilborn">@<bdi>Alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">My God ! Of course, I didn’t think about <strong>successive</strong> runs ! And it’s quite logical :</p>
<ul>
<li>
<p dir="auto">The <strong><code>editor3h.selectAll()</code></strong> command, first, <strong>select all</strong> contents of <strong><code>editor3h</code></strong>, if <strong>any</strong></p>
</li>
<li>
<p dir="auto">The <strong><code>editor3h.paste()</code></strong> command replaces this <strong>possible</strong> selection with the <strong>clipboard</strong>’s contents and <strong>paste</strong> it in <strong><code>editor3h</code></strong></p>
</li>
</ul>
<p dir="auto">Thanks,also, for your <strong>additional</strong> information :</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62371</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62371</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 31 Jan 2021 14:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 13:27:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said in <a href="/post/62363">Join lines from clipboard data</a>:</p>
<blockquote>
<p dir="auto">Do you mean that editor3h is an object which represents a virtual document, where you can perform any manipulation, independently from editor1 representing the main view document and editor2 representing the secondary view document ?</p>
</blockquote>
<p dir="auto">Short answer to long question:<br />
Yes.  :-)</p>
<blockquote>
<p dir="auto">I don’t see the purpose of the first editor3h.selectAll() command</p>
</blockquote>
<blockquote>
<p dir="auto">To my mind, the editor3h.paste() command, … should be enough !?</p>
</blockquote>
<p dir="auto">You are probably only thinking about the <em>first</em> time the script is run.<br />
On first running, <code>editor3h</code> does not exist, so it is created.<br />
At that point there is no text in its document, so the select-all does effectively nothing.<br />
On second and further runs of the script, <code>editor3h</code> already exists – we don’t need to have N++ go thru the overhead of create a new one each time, we can just reuse the old one.<br />
But in this case, there is already text in the document (from the previous run).<br />
Selecting all of the text and then doing a paste effectively causes editor3h to then only contain the data from the paste.<br />
I could have done it in other ways, e.g., <code>editor3h.setText("")</code> as well.</p>
<p dir="auto">BTW, I could have dispensed with the <code>editor3h</code> technique altogether and  just pasted into the user’s current document and manipulated from there.  There are a lot of ways to do things (TMTOWTDI).  But that way tends to get a bit messier because when you do an <code>editor.paste()</code> and you need to manipulate what you pasted, the <em>size</em> of what you pasted – so you know where to find the data in the doc – is not provided automatically and takes some effort to calculate.  Now if text remained selected upon pasting, it <em>would</em> be easy.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62368</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62368</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 31 Jan 2021 13:27:40 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 12:27:52 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I was <strong>intrigued</strong> with the statement :</p>
<pre><code class="language-py">    editor3h  # third editor, hidden
</code></pre>
<p dir="auto">Do you mean that <strong><code>editor3h</code></strong> is an object which represents a <strong>virtual</strong> document, where you can perform any <strong>manipulation</strong>, independently from <strong><code>editor1</code></strong> representing the <strong>main</strong> view document and <strong><code>editor2</code></strong> representing the <strong>secondary</strong> view document ?</p>
<p dir="auto">Now , I have no problem with the commands below, because it’s obvious that, <strong>after</strong> an S/R, <strong>wherever</strong> this data is located, you need to <strong>select</strong> the <strong>modified</strong> results, <strong>copy</strong> them in the clipboard and <strong>paste</strong> them somewhere ( At the insertion point of the <strong><code>JSON</code></strong> file in this <strong>specific</strong> example )</p>
<pre><code class="language-py">    editor3h.rereplace('\r\n', ' ')
    editor3h.selectAll()
    editor3h.copy()
    editor.paste()
</code></pre>
<p dir="auto">But, as you said that the <strong>first</strong> step was to copy <strong><code>PDF</code></strong> file contents ( …in the clipboard ), I don’t see the purpose of the <strong>first</strong> <strong><code>editor3h.selectAll()</code></strong> command. To my mind, the <strong><code>editor3h.paste()</code></strong> command, which would copy the <strong><code>PDF</code></strong> contents of the clipboard to the <strong>virtual</strong> editor document, should be enough !?</p>
<p dir="auto">From a <strong><code>Python</code></strong> <strong>beginner</strong> ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62363</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62363</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 31 Jan 2021 12:27:52 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sun, 31 Jan 2021 02:57:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> This was EXACTLY what I was looking for! Thank you so much.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62359</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62359</guid><dc:creator><![CDATA[Jonathan Wendt]]></dc:creator><pubDate>Sun, 31 Jan 2021 02:57:41 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sat, 30 Jan 2021 23:57:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonathan-wendt" aria-label="Profile: Jonathan-Wendt">@<bdi>Jonathan-Wendt</bdi></a> said in <a href="/post/62343">Join lines from clipboard data</a>:</p>
<blockquote>
<p dir="auto">Copy lines from PDF<br />
Paste into separate Notepad++ file<br />
Ctrl+J to join the lines<br />
Re-select everything and cut<br />
Paste the data where it needs to go in the JSON</p>
</blockquote>
<p dir="auto">Why not just paste it where you want it, and do the join there?  That cuts out 2 of the 5 steps.</p>
<p dir="auto">But it can be done with a script using a plugin like PythonScript… which I was working on when <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> posted his.  I guess I was too slow.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/62347</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62347</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sat, 30 Jan 2021 23:57:19 GMT</pubDate></item><item><title><![CDATA[Reply to Join lines from clipboard data on Sat, 30 Jan 2021 23:53:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonathan-wendt" aria-label="Profile: Jonathan-Wendt">@<bdi>Jonathan-Wendt</bdi></a></p>
<p dir="auto">If you’re willing to install and use the PythonScript plugin for Notepad++, then a shorter workflow is possible.  That workflow would be:</p>
<ul>
<li>Copy lines from PDF</li>
<li>Move caret to insertion point in the JSON file in its Notepad++ tab</li>
<li>Run the script (could be tied to a key-combination for easy-running)</li>
</ul>
<p dir="auto">The script would look like this:</p>
<pre><code class="language-z"># -*- coding: utf-8 -*-

from Npp import notepad, editor

try:
    editor3h  # third editor, hidden
except NameError:
    editor3h = notepad.createScintilla()

if editor.canPaste() and editor3h.canPaste():
    editor3h.selectAll()
    editor3h.paste()
    editor3h.rereplace('\r\n', ' ')
    editor3h.selectAll()
    editor3h.copy()
    editor.paste()
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/62346</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/62346</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 30 Jan 2021 23:53:19 GMT</pubDate></item></channel></rss>