ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2014

N.A.N.Y. 2014 Release: Text Inspection & Manipulation Utility

<< < (22/27) > >>

poyan:
Hi, seems to work as you intended.


I suggest to go also the last step: return the results.
If the text has come from the clipboard send the manipulated text back to the clipboard. 
If it has come from the command line, return it by stdout.
If it has come from a file, write the text to a file. Let the user decide whether he would prefer to overwrite the old file, to use a new filename, or to archive the old file and to save the new file with the original filename. Or just offer the first option, but keep the original text for a possible go back.
On demand, open the program gui, but enable a quiet run.

Any idea for using multiple functions on the text?
Just some proposals from a lazy user who tries to reduce the number of unnecessary keystrokes / mouseclicks.

lanux128:
@phitsc: i have a feature request if it is not already possible. i would like to take a list and add a punctuation-like chars at the end of each line but aligned to the longest item on the list.

i pasted the sample list in the pastebin link below.

• http://pastebin.com/JLKbat9h

ConstanceJill:
Is it aligned using tabulations, and assuming a monospace font?
I'd guess you'll need to specify how many spaces a tabulation equals then (for how many are required to get to the end of the longest line from a shorter one would depend on that).

DyNama:
Fab, phitsc, love "Remove characters" and command line options! I had Replaced spaces with commas, then Delete to Tag entering a comma, now all I have to do is Remove characters -p 45!

Oddly enuf, I had requested a function to remove padding, while lanux128 is wanting a function to add padding, which I can see could be very useful, since I am editing text tables too. I played with lanux128's text for a while in TIMU, i could not figure out a way to pad all the lines to a certain length.

I had been pasting the output from TIMU into a spreadsheet just to add up the numeric values, then I got a macro to Sum All Values in the clipboard, but this would also be a good trick for TIMU! Sum the values of every line in input that starts with a number, ignoring any characters in each line after a number+delimiter, the output would be the input unchanged, with just an additional line at the bottom with the total.

TIMU is a fabulous utility! Thanx, phitsc!

DyNama:
Here's something else TIMU could help me with. Occasionally i want to edit a greasemonkey javascript so i open it in notepad, and it looks like this:


--- Code: Javascript ---// ==UserScript==// @name        Mouseover Popup Image Viewer// @namespace   http://w9p.co/userscripts/// @description Shows images and videos behind links and thumbnails.// @version     2015.10.11.1// @author      kuehlschrank// @homepage    http://w9p.co/userscripts/mpiv/// @icon        https://w9p.co/userscripts/mpiv/icon.png// @grant       GM_getValue// @grant       GM_setValue// @grant       GM_xmlhttpRequest// @grant       GM_openInTab// @grant       GM_registerMenuCommand// @grant       GM_setClipboard// ==/UserScript==
but if i paste it into TIMU input box, it looks like this without any editing:


--- Code: Javascript ---// ==UserScript==// @name        Mouseover Popup Image Viewer// @namespace   http://w9p.co/userscripts/// @description Shows images and videos behind links and thumbnails.// @version     2015.10.11.1// @author      kuehlschrank// @homepage    http://w9p.co/userscripts/mpiv/// @icon        https://w9p.co/userscripts/mpiv/icon.png// @grant       GM_getValue// @grant       GM_setValue// @grant       GM_xmlhttpRequest// @grant       GM_openInTab// @grant       GM_registerMenuCommand// @grant       GM_setClipboard// ==/UserScript==
It would seem in notepad carriage returns aren't being interpreted as carriage return+linefeed. if without edit, i press the output box Copy to Clipboard, the copy will still not have linefeeds when i paste it back into notepad.

But if i manually select the text in the output box with my mouse, it will have linefeeds! Pasted back into notepad, it will look like the latter!

I have a macro that works on the text in the clipboard, it simply replaces all the carriage returns with carriage return+linefeeds:


--- Code: C ---using System; public static class ClipboardFusionHelper{    public static string ProcessText(string text)    {        return text.Replace("\n","\r\n");    }}
i copy the "unformatted" javascript in notepad to clipboard, run the macro, paste it right back into notepad, and the text is now "formatted." Perhaps TIMU could do that too.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version