Thursday, September 27, 2018

Convert Excel Files to CSV in batch via context menu : Convert Many Excel files to CSV in 1 click

RunDTech.XLStoCSV.ReadMe

Summary: Convert xls and xlsx files to csv via a batch menu
Code: C#


1. Copy this folder to C:\Temp\DTech.XLStoCSV\
2. you should see this in C:\Temp\DTech.XLStoCSV\ http://prntscr.com/kzn325
3. Run reg file RunDTech.XLStoCS.reg
4. Right click on the "C:\Temp\DTech.XLStoCSV\Test" folder (if any issues copy test folder to C:\Temp\Test
5. You should see http://prntscr.com/kzn372
6. Click the XLStoCSV menu.
7. You should see the below output


     C:\Temp\DTech.XLStoCSV>"C:\Temp\DTech.XLStoCSV\RunDTech.XLStoCSV.bat" C:\Temp\Te
     st
      ******* Start DTech.XLStoCSV.64.exe C:\Temp\Test  Thu 09/27/2018 23:55:19.84
     DTech.XLStoCSV START
     START CSV  C:\Temp\Test\1.xlsx
     DONE CSV  C:\Temp\Test\1.xlsx
     START CSV  C:\Temp\Test\2.xls
     DONE CSV  C:\Temp\Test\2.xls
     DTech.XLStoCSV DONE
      ******* Start DTech.XLStoCSV.32.exe C:\Temp\Test  Thu 09/27/2018 23:55:19.93
     DTech.XLStoCSV START
     START CSV  C:\Temp\Test\1.xlsx
     DONE CSV  C:\Temp\Test\1.xlsx
     START CSV  C:\Temp\Test\2.xls
     DONE CSV  C:\Temp\Test\2.xls
     DTech.XLStoCSV DONE
     ****************DONE  Thu 09/27/2018 23:55:19.98 synch
    
     8. If you encounter any error try downloading MS Access Redist kit
https://www.microsoft.com/en-us/download/details.aspx?id=13255

9. I wrote this code in 1 night, tested on over 50 xls and xlsx files


Download Here

Wednesday, September 26, 2018

Chrome Extensions to improve Data Entry Productivity:

Chrome Extensions to improve Data Entry Productivity:

These tools make the difference between 30 minutes checking checking boxes or spending 1 minute on a form and the other 29 min doing what U want.Save TIME!!

Anyone needing assistance feel free to contact me, if U think there is a task that is repetitive then most likely there is a tool to make your life easier!! Whether it be eBay forms or filling out a PO or entering data into SalesForce, if u are entering data into web based forms, there is an Extension to speed up ur work productivity. (or we can write code if there isn’t one.)

Access your chrome extensions here

Forms Productivity:

1. Checkbox checker, this allows user to check many checkboxes on a form using mouse point,simply left click and drag over the checkboxes,

Online Tutorial

2. Auto Expander: this is so awesome!! use this to create macros for text you write over and over again, such as signatures, descriptions, names ect ect. This known as text expansion, basically its a macro tool to help to input data into forms QUICKLY!!

Online Tutorial

This is how I setup my Auto Expander (also see Figure 1 below)

3. AutoFill: Use this to create advanced Auto Filling of forms, this combined with Auto Expander helps fill any UI.

Online Tutorial

This is how I setup AutoFill and used it with Auto Expander

4. Fillr: Use for auto fill of name, address, emails, personal data. Good for shopping.

** Sandbox Test Forms , to experiment: Contact Form Example and a Survey Form Example


Email + Other Extension,

Boomerang : Schedule email in the future

Batch Multi Forward: Forward MULTIPLE emails to a recipient in 1 click,

Copy All Urls : BOOM copy / paste hundreds of urls in 1 click!!!!!!!

Auto Refresh tabs, use this to refresh screen every Thumbs down seconds


Figure 1:Auto Text Expander

image

Figure 2: AutoFillOptions:

image

Figure 3: AutoFill Profile

image

ShareX hotKeys compatible with Lightshot Hotkeys

ShareX hotKeys compatible with Lightshot Hotkeys

Use below settings top ensure that you can use both apps at same time, use keyboard keys to capture screen shots + recordings reliably.

The main thing we want is to ensure that Lightshot Printscreen does not interfere with ShareX Print screen, we can do this by creating mutually exclusive hotkeys.

Lightshot:

PrintScr key: used for lightshot since lightshot is great for capture / sharing and annotating screen image captures.

ShareX:

Shift + Print :I use Shift + Print screen to capture images for ShareX and combinations of

Shift + F7 and CTRL+Shift+F7 for screen recording.

Then only keys u have to remember is: Capture Screen: PrintScr Record Screen: Shift+F7 (or Ctrl+Shift+F7)

Set the hotkeys

See this video tutorial here

*** Remember that uploaded screen recordings can be viewed as a Video by simply adding a v to url:

https://i.imgur.com/IqtkYYz.gif

https://i.imgur.com/IqtkYYz.gifv


Lightshot:

1.Open lightshot

2. Select Option

3. Hotkeys tab

4. DeSelect the “Auto save…” item

5. Set the main Hotkey to PrintScr

6. End result:

clip_image002

ShareX:

1. RightClick ShareX in Notification area

2. Set Options see Figure 1 below

3. Select Hotkey settings, See Figure 2 below

4. Set hotkeys as follows:

Figure 1:

clip_image004

Figure 2:

clip_image006

Tuesday, September 25, 2018

Text Replace Trick and Tips

TextPad: Add Line Breaks at ], characters

  1. Click Ctrl + h or Search -> Replace on the top menu
  2. Under the Search Mode group, select Regular expression
  3. In the Find what text field, type ],\s*
  4. In the Replace with text field, type ],\n
  5. Click Replace All


TextPad: How to Add extra Line breaks at end of each line

You can quickly do this by using a feature called "Regular Expressions" to find and add empty lines.

  1. Open up the Find/Replace (Search menu > Replace)
  2. In the "Find what" field, type the following: (^.+$)\n(^.+$)
  3. In the "Replace with" field, type the following: \1\n\n\2
  4. Tick the "Regular expression" checkbox
  5. Click the Replace All button at least twice, but perhaps 3 times, until you get the message Cannot find the Regular Expression
  6. Untick the "Regular expression" checkbox
  7. Close the Replace dialog
  8. Confirm the file is formatted as you are expecting
  9. Save the file.

TextPad: Replace Line Break with a comma

Here is an example document with random words:

document with words in multiple lines

And you fire the replace operation by hitting F8.
Find What: type \n
Replace with: type , (or whatever character you need)

Check "Regular Expression" box before you search / replace

And it will be all merged on to the same line. This looks simple while for an user trying to do this on a several hundred line file, would give big sigh of relief after learning this.

Final result after the replace operation

TextPad: How to Remove All Lines Except the Ones Containing a Pattern

Similar to NotePad,[1] you can remove all lines except the ones containing a pattern in TextPad.[2,3] There is an easy way to achieve this. Basically, you need to perform 3 steps:

  1. Bookmark all lines containing a pattern
  2. Inverse bookmark
  3. Delete all bookmarked lines

Bookmark All Lines Containing a Pattern


For this demonstration, we want to remove all lines except the ones containing the following pattern:
  • "concurrent-mark-end"
To bookmark all lines containing a pattern:
  1. Go to Menu "Search" and select "Find..."  
  2. Specify the pattern in "Find what:" and select "Regular expression"
  3. Hit Button "Mark All"

Inverse Bookmark


To inverse bookmark, do:
  • Go to Menu "Search" and select "Inverse Bookmarks"
You should see some lines are marked and some not.

Delete All Bookmarked Lines


To delete all bookmarked lines, do:
  1. Go to Menu "Edit" and select "Delete > Bookmarked Lines"
and you should see the final results below:


RegEx Summary


Summary of regular expressions:
Default Operator: POSIX Operator: Description:
. . Any single character. Example: h.t matches hat, hit, hot and hut.
[ ] [ ] Any one of the characters in the brackets, or any of a range of characters separated by a hyphen (-), or a character class operator (see below). Examples: h[aeiou][a-z] matches hat, hip, hit, hop, and hut; [A-Za-z] matches any single letter; x[0-9] matches x0, x1, …, x9.
[^] [^] Any characters except for those after the caret "^". Example: h[^u]t matches hat, hit, and hot, but not hut.
^ ^ The start of a line (column 1).
$ $ The end of a line (not the line break characters). Use this for restricting matches to characters at the end of a line. Example: end$ only matches "end" when it's the last word on a line, and ^end only matches "end" when it's the first word on a line.
\< \< The start of a word.
\> \> The end of a word.
\t \t The tab character.
\f \f The page break (form feed) character.
\n \n A new line character, for matching expressions that span line boundaries. This cannot be followed by operators '*', '+' or {}. Do not use this for constraining matches to the end of a line. It's much more efficient to use "$".
\xdd \xdd "dd" is the two-digit hexadecimal code for any character.
\( \) ( ) Groups a tagged expression to use in replacement expressions. An RE can have up to 9 tagged expressions, numbered according to their order in the RE. The corresponding replacement expression is \x, for x in the range 1-9. Example: If \([a-z]+\) \([a-z]+\) matches "way wrong", \2 \1 would replace it with "wrong way".
* * Matches zero or more of the preceding characters or expressions. Example: ho*p matches hp, hop and hoop.
? ? Matches zero or one of the preceding characters or expressions. Example: ho?p matches hp, and hop, but not hoop.
+ + Matches one or more of the preceding characters or expressions. Example: ho+p matches hop, and hoop, but not hp.
\{count\} {count} Matches the specified number of the preceding characters or expressions. Example: ho\{2\}p matches hoop, but not hop.
\{min,\} {min,} Matches at least the specified number of the preceding characters or expressions. Example: ho\{1,\}p matches hop and hoop, but not hp.
\{min,max\} {min,max} Matches between min and max of the preceding characters or expressions. Example: ho\{1,2\}p matches hop and hoop, but not hp or hooop.
\| | Matches either the expression to its left or its right. Example: hop\|hoop matches hop, or hoop.
\ \ "Escapes" the special meaning of the above expressions, so that they can be matched as literal characters. Hence, to match a literal "", you must use "". Example: \< matches the start of a word, but \\< matches "\<".
Character Class Operators "[: ... :]":
These can be used in class expressions as an alternative way of representing classes of characters. For example, [a-z0-9] is equivalent to [[:lower:][:digit:]]. (Note the extra pairs of brackets.) The defined classes are:
Expression: Description:
[:alpha:] Any letter.
[:lower:] Any lower case letter.
[:upper:] Any upper case letter.
[:alnum:] Any digit or letter.
[:digit:] Any digit.
[:xdigit:] Any hexadecimal digit (0-9, a-f or A-F).
[:blank:] Space or tab.
[:space:] Space, tab, vertical tab, return, line feed, form feed.
[:cntrl:] Control characters (Delete and ASCII codes less than space).
[:print:] Printable characters, including space.
[:graph:] Printable characters, excluding space.
[:punct:] Anything that is not a control or alphanumeric character.
[:word:] Letters, hypens and apostrophes.
[:token:] Any of the characters defined on the Syntax page for the document class, or in the syntax definition file if syntax highlighting is enabled for the document class.
Example:
HTML tags are in matched pairs of <…>, such as <FONT SIZE=+1>. To match any tag that begins and ends on the same line, use the regular expression:
<[^>]*>
This matches a "<", followed by zero or more characters, excluding ">", followed by a ">". Note that "*" finds the longest matching sequence on a line, so the regular expression:
<.*>
would be incorrect, because it would not stop at the first ">", if there was more than one on the line.
For more information and examples, see regular expressions, and replacement expressions in the Reference section.

Friday, September 21, 2018

Compare Expensify vs XPenditure side by side Receipt scanning results

This is an update to last blog pot RE receipts, Im going with Expensify for Receipts and MoneyLuver for daily budgeting. Ill update in a year on how it goes

Xpenditure Ill pass on for now,..it has too much and not enough in OCR Categorizing

Compare Android Receipt Apps

and

PC Mags Comparison of Expense Tracking Apps

image

Friday, September 14, 2018

Christa’s Install Profile: Phone, Computer, Browser Tools

Items in yellow are very important

Phone

:
     Go Here and copy to phone: Y:\Work\_Profile\InstallProfile\PM\PhoneApps
     WiFi Connection Manager-com.roamingsoft.manager-160-v1.6.5.8.apk
     TypeApp-com.trtf.blue-12967-v1.9.4.13.apk
     To-Do-com.microsoft.todos-83-v1.37.83.apk
     Task Manager-com.rhythm.hexise.task-66-v2.3.5.apk
     Remote Utilities-com.remoteutilities.mviewer-68200-v11.18.apk
     Quickoffice-com.quickoffice.android-1503111803-v6.5.1.12.apk
     QuickEdit-com.rhmsoft.edit-85-v1.3.6.apk
     Outlook-com.microsoft.office.outlook-267-v2.2.168.apk
     NordVPN-com.nordvpn.android-227-v2.8.6 playstore.apk
    Keep Screen On-eu.aboutall.android.tools.kepscreenon-3-v1.2.apk
     Hacker's Keyboard-org.pocketworkstation.pckeyboard-1039003-v1.39.3.apk
     FAST-com.netflix.Speedtest-88-v1.0.8.apk
     Excel-com.microsoft.office.excel-2001479445-v16.0.9330.2080.apk
    ES File Explorer-com.estrongs.android.pop-636-v4.1.7.1.24.apk
     DS file-com.
synology.DSfile-292-v4.11.0.apk
     Drives-com.mobile_infographics_tools.mydrive-4019-v4.0.1.9.apk
     App Backup & Restore-mobi.usage.appbackup-10-v1.0.9.apk
     AnyDesk-com.anydesk.anydeskandroid-40004-v4.0.4.apk

   

Computer


Chrome Extensions: Go here and add them:

https://chrome.google.com/webstore/category/extensions?hl=en-US&utm_source=chrome-ntp-launcher
    
         AdBlock
         Boomerang for Gmail
         Chrome Remote Desktop
         Copy All Urls
         Lightshot OneNote Web Clipper
         Belt.IO
         Multi Forward for Gmail

   Programs to Install: (will install on new computer)


        
         VirtualCloneDrive
         OneNote (Office)
         MoveMouse
         CCleaner
         Malwarebytes Anti-Malware
         HijackThis
         Notepad++
         Lightshot
         WinRar
         Remote Utilities: Remote Desktop Software
         Any Desk

         ClickOff
         WinDiff
         WinMerge
         Process Explorer
         Adobe
         PDF Architect
         ShareX screen Record
         PointerFocus
         Open Live Writer (blog) + MS Office

        NORD VPN
    

Browser Links : Use Copy All Urls Chrome Extension to copy/paste

    Online Tools for remote PM/BA/Devs

Items in Yellow, u will NEED them:
     CloudNotes
         https://shrib.com/#christac3
         https://belt.io/belt
         https://keep.google.com/u/0/
         https://www.blogger.com/blogger.g?blogID=7869834720503477406#allposts

    TextTools
         http://textmechanic.com/text-tools/basic-text-tools/addremove-line-breaks/
         https://www.quickdiff.com/
         https://www.online-convert.com/
         https://techinternets.com/copy_calc?do
         https://www.csgenerator.com/
         http://gifmaker.me/
         http://www.procato.com/misspeller/
         https://wordcounter.io   

         https://delim.co

        https://goodcalculators.com/data-storage-conversion-calculator/

    Diagrams
        https://www.draw.io/
         https://www.pdfescape.com/windows/

    CloudStorage

        https://drive.google.com/drive/u/0/my-drive
         https://onedrive.live.com/about/en-us/
         http://67.8.252.232:5000/

Reminders

    https://www.futureme.org/  

    https://ohdontforget.com/

DeveloperForums
         https://stackoverflow.com/users/881314/jason-doyle
         https://github.com/
         https://www.w3schools.com/
         http://jsbin.com/uLECIyu/1/edit?html,css,js,output
         http://rextester.com/

Wednesday, September 12, 2018

Screen Recording Open Source Tool : Latest and Greatest ShareX

Save screen captures as Gif or Video or image

See my creen recording: https://i.imgur.com/0KzslPV.gifv

https://getsharex.com/
ShareX

A fine choice if you want to share your screen recordings online

Capture as video file or GIF

Dozens of export options

Also great for static screen grabs

Unintuitive interface

Not suitable for games

ShareX is an open source app for capturing still screen grabs and recording videos. There are no watermarks or time limits to worry about, but the interface isn't the most intuitive in the world so you’ll be best off using keyboard shortcuts. For quick reference, you can start a recording by tapping Shift + Print Screen, and stop it again using Ctrl + Shift + Print Screen.

You can also use this free screen recorder to save your capture as a GIF rather than a video file, which can be extremely useful for sharing on forums and social media.

Not only is ShareX a brilliant free screen recorder, it can also capture an entire scrolling webpage, capture and identify text via OCR, and even capture your screen according to a schedule.

Another of its best features is the ability to send your captured grabs and videos straight to a file-sharing or social media site. There’s a vast array of options, which you can check out on the project’s site.

Unfortunately, ShareX doesn’t support taking screen grabs or recordings from games running in full-screen mode. Other than that, it’s a superb screen recorder that will serve you extremely well.

Tuesday, September 11, 2018

Use Tesseract OCR with C# to separate receipt images from non-text images

Using TesseractEngine C# wrapper to identify image with text, based on default confidence and learning, flag image as either to move or not to move. This method returns a List<> of file names that can then be used to move the files to a separate directory.


This comes in handy when you have a dump of Phone Images with Camera images mixed with Receipts. You can either manually move files or use this to reduce the manual burden. See attached zip, and here for details of source lib and demo.

More Samples here

Download Source Here

App is run with following params:

ReceiptMover ocr c:\temp\input c:\temp\output *.jpg .4

/// <summary>
        /// Convert image to tif and OCR using TesseractEngine 3.0.2
        /// </summary>
        /// <param name="imgPath"></param>
        /// <param name="dataPath"></param>
        /// <param name="minconf"></param>
        /// <returns></returns>
        static bool OCRImage(string imgPath, string dataPath, float minconf)
        {

           bool r = false;
            bool doKill = false;
            string newPF = imgPath;
            try
            {

               // create tif if neeeded,
                var ext = FileHelper.GetFileNameExtension(imgPath);
                if (!ext.ToUpper().StartsWith("TIF"))
                {
                    WriteLine("CONVERT TO TIF ->....... " + FileHelper.GetFileName(imgPath));
                    using (var imgB = new Bitmap(imgPath)) // Load of the image file from the Pix object which is a wrapper for Leptonica PIX structure
                    {

                       string newF = FileHelper.GetFileName(imgPath).ToUpper().Replace(ext.ToUpper(), "tif".ToUpper());
                        newPF = Paths.Combine(FileHelper.GetFilePath(imgPath), newF);
                        if (File.Exists(newPF))
                            FileHelper.KillFile(newPF);
                        imgB.Save(newPF, System.Drawing.Imaging.ImageFormat.Tiff);
                       
                        WriteLine("SAVED  TO TIF ->....... " + newPF);
                        doKill = true;
                    }
                }


               //ocr tif ,if any text we seperate it from non receipt/text images
                using (var tEngine = new TesseractEngine(@"./tessdata", "eng", EngineMode.Default)) //creating the tesseract OCR engine with English as the language
                {
                   
                    using (var img = Pix.LoadFromFile(newPF)) // Load of the image file from the Pix object which is a wrapper for Leptonica PIX structure
                    {
                        WriteLine("TesseractEngine.Process(img) start at ->....... " + FileHelper.GetFileName(imgPath) + ", " + DateTime.Now.ToString());
                        //using (var page = tEngine.Process(img, PageSegMode.Auto)) //process the specified image
                         //using (var page = tEngine.Process(img)) //process the specified image
                        using (var page = tEngine.Process(img, PageSegMode.SingleColumn)) //process the specified image
                        {

                       
                            WriteLine("TesseractEngine.Process(img) END at -> " + FileHelper.GetFileName(imgPath) + ", " + DateTime.Now.ToString());
                            var text = page.GetText(); //Gets the image's content as plain text.
                                                       // var textO = page.GetHOCRText(0); //Gets the image's content as plain text.
                            WriteLine("tEngine.GetText(img) END at -> " + FileHelper.GetFileName(imgPath) + ", " +  DateTime.Now.ToString());

                           if (!string.IsNullOrEmpty(text))
                            {
                                text = text.Trim().Replace("/n", "");
                            }
                            if (StringUtil.IsValid(text))
                            {

                               Debug.WriteLine("Found text: " + text); //display the text
                                var conf = page.GetMeanConfidence();
                                WriteLine("GetMeanConfidence-> " + conf.ToString()); //Get's the mean confidence that as a percentage of the recognized text.
                                if (conf >= minconf)
                                {
                                    WriteLine("****Found RECEIPT: " + FileHelper.GetFileName(newPF)); //display the text
                                    r = true;
                                }

                           }
                            else
                            {
                                WriteLine("NODATA: " + FileHelper.GetFileName(newPF)); //display the text
                            }

                       }
                    }
                }
            }
            catch (Exception e)
            {
                WriteLine("OCRImage Error: " + e.Message);
            }
            //remove temptiff
            if (doKill)
            {
                FileHelper.KillFile(newPF);
            }
            return r;
        }


Wednesday, September 5, 2018

Code Fiddle Tools!

Some of the coolest coding fiddle sites I have found, really good for those who code and want to share or collaborate remotely plus some other tools like code formatting and conversion,. All in all the below sites are related to coding, code formatting or code conversions in the realm of languages that I use daily:

C#, JS, SQL + some text tools like online diff/csv tools. Stuff developers do every day and not always in the IDE:


Fiddles:

JS Fiddle: what started it all!

Rextester (really cool online fiddle tool, multi languages!! (I found it WAY better than SQL Fiddle which doesn’t always work)

DotNetFiddle for the .net folks

C# Pad

jsbin – every knows this

ALL FIDDLES

Format/Conversion/Translate

SQLTidy

SQL FSQL Format (like tidy)

SQL Convert so cool!

C# Prettify

Text Tools:

Shrib share a note in the cloud

Text Mechanic fix anything with txt like line breaks ect

Delim Tool CSV tool

Diff Online

Misc:

Visual Studio/TFS Online (what else can I say)

Use VLC to Start Streaming Playlist and Control via Browser :

1. Start a stream of your fav playlist, I am using VLC 2.8

example command: Stream playlist to port 8085

cd "C:\Program Files\VideoLAN.2.8\VLC"
vlc.exe -I dummy -vvv C:\Temp\MyPlayList.xspf --sout=#transcode{vcodec=none,acodec=mp3,ab=192,channels=2,samplerate=44100}:http{mux=raw,dst=:8085/} :sout-keep

More Help and My Previous Post on VLC Streaming

2. Router: Port forward to port (8085) on router to IP:port (see cmd dst=:8085)

3. Phone: Listen to your stream from internet (listen to your music from anywhere!!!)

Get your port from whatsmyip

See Figure 3

4. VLC: Control VLC playlist (Next/previous ect) using web interface setup:

4.a: See Figure 1 and Figure 2

4.b: Port forward to : IP:LuaPort (from Figure 2)

4.c: You can now control via browser! (see Figure 4:


Figure 1:

image

Figure 2:


image


Figure 3:


Figure 4:

image

Saturday, September 1, 2018

Change Windows 10 Default View in Search Results

After a search Windows 10 shows content view , which for me is useless, I prefer View Details view to appear however Win10 engineers prove this useless content view as the default search results. To change this there is a great reg file solution to tweak Win10 to show Details instead of Content View. Great little tweak to add to your bag of tweaks!


Reg Tweak courtesy of winhelponline

Windows Registry Editor Version 5.00

;Fixes search results defaults to Content view.
;Sets Details view as default search results view for Generic folders.

[-HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]

[-HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]

[HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7fde1a1e-8b31-49a5-93b8-6be14cfa4943}]
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004


Restart explorer.exe or reboot

Yuck!:

image


Instead!:

image