topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday February 7, 2025, 2:17 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nod5 [ switch to compact view ]

Pages: prev1 ... 4 5 6 7 8 [9] 10 11 12 13 14 ... 47next
201
General Software Discussion / Re: I'm thinking of going primitive
« on: October 25, 2019, 05:10 PM »
Here are some tools I find very useful for storing and retrieving information in plaintext files. I suppose most are very well known to many DC members reading this thread already, but anyway...

- FindAndRunRobot (FARR)
Program/file launcher with powerful, customizable aliases.
https://www.donation...er/popular-apps/farr

- Everything
Instantly find any filename/path on any drive that match a search string.
https://www.voidtools.com/

- grepWin
Handy GUI for regex search inside plaintext files.
Fast enough when searching a limited set of folders.
Also does batch find and replace in multiple plaintext files.
https://github.com/stefankueng/grepWin

- ripgrep
Super fast command line regex search inside plaintext files.
Useful for finding a string inside some plaintext note when the string is not in the filename/filepath and you have no clue what folder the file with the string is in.
https://github.com/BurntSushi/ripgrep

- AutoHotkey
For making scripts to superpower FARR aliases and quickly jump/switch between these other tools and text viewers/editors and File Explorer.
https://www.autohotkey.com/

- VS Code or some other general purpose code editor.
For powerful plaintext viewing, editing and formatting. Also for writing Markdown with preview.
The interface is more complex than for some standalone Markdown editors. But on the plus side code editors are power tools for transforming and navigating plaintext in a lot of ways that tend to come in handy sooner or later.
https://code.visualstudio.com/

The above tools work better when you do these things:

1. put tags in the filenames of plaintext files

2. make .txt plaintext "companion files" with tags in filename and notes inside next to non-plaintext files.

3. organize files at least roughly into (sub)folders based on topic, context or life domain. Put tags in foldernames.

4. when needed tag filenames/foldernames with timestamps (YYMMDD at minimum or YYYYMMDDhhmmss) to make them more unique.

You can speed up 1-4 with AutoHotkey, of course :)

The neat thing with unique filenames is that you can use them as "quasi hyperlinks" in plaintext. Like so: An AutoHotkey hotkey takes the current selection in the active VS Code window (or Notepad or any other plaintext editor/viewer you want), uses Everything under the hood to find the one unique matching full filepath, and then acts on it (open/run the file, open its folder in Explorer, ...). For example a file you name "food korean 191025.txt" will likely remain unique and so can be used as a short and quick quasi hyperlink.

The search tools FARR/Everything can also be used as bookmark managers, since URLs can be stored as individual plaintext .url files with tagged filenames.

202
General Software Discussion / Re: download online video
« on: October 24, 2019, 10:30 AM »
The command line utility youtube-dl has support for downloading streams from a lot of sites.
https://ytdl-org.git.../supportedsites.html

203
Post New Requests Here / Re: Book synopsis template
« on: October 14, 2019, 05:18 PM »
Seems like everything has to be stored in the cloud - I'm hosting this locally available on a VPN.
Yeah, Airtable is web (cloud) based. So not a good fit if you want to self-host locally.

It seems likely there are tools for this kind of thing out there already.

For example I've seen that there is a web interface app called calibre-web for the Ebook library manager Calibre. I haven't tried using nor setting up that web interface, so I can't say if it is any good.

One important thing to specify: Is your goal a system where your family members (who I assume are not all programmers!) themselves edit information about books through a locally hosted web app of some sort? Or is the goal that only you update the information and then your family reads it through locally hosted webpages?

204
Post New Requests Here / Re: Book synopsis template
« on: October 13, 2019, 04:38 AM »
Have you considered using some existing free webapp for this instead?

For example Airtable. It is quite end user friendly and you can include thumbnails, attachements, clickable links and more on each row in the database. A simple setup would be one big spreadsheet shared by all family members and then each person is tasked to add/remove/update their books in it with information for each of the data categories (columns) you have initially created.
Edit: For example this template but add an "owner" column and whatever other columns you need.

205
Post New Requests Here / Re: Idea: "FAIPS" - Find All In Page Search
« on: October 12, 2019, 01:33 PM »
A quick search suggests there are various Chrome and Firefox extensions for multi word search and highlight functionality. It could help any coders who might have a go at this if you describe which such extensions you have already tried and what you find lacking in them.

Is your goal a standalone tool for offline searching in previously downloaded .html file copies of websites? Or a browser extension?

206
No problem.

I made a version of my previous script to use the string before " - " in the filename as subfolder name. Just in case someone comes here via Google looking for a complete script for that.

The script can also be easily adapted to use some other pattern by changing only the regular expression line.


Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. ;AutoHotkey script to move files into subfolders named after the string before " - " in the filename
  4. ;Example: the file "Lastname, Firstname - Title.txt" is moved to subfolder "Lastname, Firstname"
  5. ;by Nod5 2019-10-12
  6.  
  7. ;How to use:
  8. ;0. install https://www.autohotkey.com/
  9. ;1. edit the next line with a path to the files folder. For example "C:\folder\S"
  10. folder := ""
  11. ;2. save the script with .ahk extension and UTF-8 BOM encoding and run it
  12.  
  13. ;Check that the folder exists
  14. If !InStr( FileExist(folder), "D")
  15.  
  16. Loop, Files, %folder%\*.*
  17. {
  18.   tooltip `n Moving files into subfolders ...
  19.  
  20.   ;get string before " - " in filename
  21.   pattern := RegExReplace(A_LoopFileName, " - .*", "")
  22.  
  23.   ;create subfolder if not already exists
  24.   If !FileExist(folder "\" pattern)
  25.     FileCreateDir % folder "\" pattern
  26.  
  27.   ;move file to subfolder
  28.   FileMove, % A_LoopFilePath, % folder "\" pattern
  29. }

207
This should do it.

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. ;AutoHotkey script to move files into subfolders named after the filename's first two characters
  4. ;by Nod5 2019-10-08
  5.  
  6. ;How to use:
  7. ;0. install https://www.autohotkey.com/
  8. ;1. edit the next line with a path to the files folder. For example "C:\folder\S"
  9. folder := ""
  10. ;2. save the script with .ahk extension and UTF-8 BOM encoding and run it
  11.  
  12. ;Check that the folder exists
  13. If !InStr( FileExist(folder), "D")
  14.  
  15. Loop, Files, %folder%\*.*
  16. {
  17.   tooltip `n Moving files into subfolders ...
  18.  
  19.   ;get filename's first two characters as uppercase
  20.   two_chars := SubStr(A_LoopFileName, 1, 2)
  21.   two_chars := Format("{:U}", two_chars)
  22.  
  23.   ;create subfolder if not already exists
  24.   If !FileExist(folder "\" two_chars)
  25.     FileCreateDir % folder "\" two_chars
  26.  
  27.   ;move file to subfolder
  28.   FileMove, % A_LoopFilePath, % folder "\" two_chars
  29. }


In addition another script to generate a bunch of empty text files for testing/troubleshooting the above script

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. ;AutoHotkey script to generate 75 empty text files named with the format
  4. ;sa_1.txt , sa_2.txt , sa_3.txt , sb_1.txt ...
  5.  
  6. chars := "abcdefghijklmnopqrstuvxyz"
  7. test_folder := A_ScriptDir "\" A_Now
  8. FileCreateDir, % test_folder
  9. Loop, Parse, chars
  10.   Loop, 3
  11.     FileAppend,, % test_folder "\s" A_LoopField "_" A_Index ".txt"

208
Try tables and text on images, especially when the clarity is not there and the contrast is not great.  More complicated scenarios are where it started to fail for me.
Might need a preprocessing step with binarize and other transforms on image in such cases. Yes more complicated.

209
if you're going with the English 'fast' library data + the exe its only 7.8mb
Could you link to that binary? Or are you building from source? The latest Windows binary setup packages for V5 alpha from https://github.com/U...nheim/tesseract/wiki are 40MB in size. The .exe can be extracted with 7zip to 200MB of files. I don't know how many of those files are redundant when only using tesseract.exe for plain simple command line image to text conversion.

Example screenshot
image.png

Tesseract OCR result (took less than a second)
T've had pretty good results with Tesseract actually - if you're going with the English ‘fast’ library data + the exe its only 7.8mb (other libraries are bigger and slower
it seems but might produce better results). The tesseract.exe works just fine in ‘portable’ mode, no need to install it - just keep the exe + trainingdata file in the
same folder. It can be slow if you feed it large image files but for screenshots it shouldn't take longer as a few seconds in my experience.

Of course the more languages you add the larger it gets and you may wish to offer some clear instructions and options to users how to add and handle them.

210
There is always Tesseract
https://github.com/t...seract-ocr/tesseract
https://stackoverflow.com/a/26418458

Though I don't think there is a portable/"bundleable" Windows release of a recent Tesseract version. Only installers and they're many times the size of Clipboard Help+Spell.

211
ABBYY Finereader version 15 has just been released.

I tested the trial a bit. Produces quite quick and accurate OCR, is my first impression.

But: I can't find a mode that comes close to Acrobat's "Editable Text and Images" (older name was "ClearScan") where the image bitmap text characters are replaced by custom vector fonts that look like the original but smoother.

Finereader 15 has an option called PreciseScan that claims to do some smoothing but I didn't see much smoothing improvement compared to when that option is off. I only did a a few quick tests though.

Samples

Acrobat vectorized setting
Acrobat Editable Text And Images.png

Finereader 15 with setting PreciseScan
ABBYY PreciseScan.png

brahman, do you know the ins and outs of Finereader and if so can you tell me if I've missed some Finereader 15 setting to produce vectorized output similar to the Acrobat sample above? (I know I can have Finereader replace the bitmap text with OCRed text in a different Windows font of course, but that's not what I'm after here.)

212
General Software Discussion / Re: Looking for AsciiDoc editor
« on: September 03, 2019, 05:50 AM »
This whole thread started as a question, but could be seen as a reference or starting point now. For those in need, of course. And if I find new and/or better tooling for working with AsciiDoc, I'll update this thread again.
Thanks for documenting your experiences - useful! I hope plaintext readable document formats in general get more widely adopted.

213
General Software Discussion / Re: Looking for AsciiDoc editor
« on: September 01, 2019, 04:07 PM »
I confess I hadn't heard about AsciiDoc until reading this thread.

I then read https://asciidoctor....cs/what-is-asciidoc/ which asks two questions "What is AsciiDoc? Why do we need it?" but doesn't answer the most important question: why AsciiDoc rather than the much, much more common MarkDown?

I then found https://asciidoctor....sciidoc-vs-markdown/ and while mighty sceptical when starting reading I actually came out thinking AsciiDoc has some nice features. But mark down my words: I sure won't be an early adopter.

214
Find And Run Robot / Re: displaying long file names
« on: August 07, 2019, 05:08 PM »
I can confirm that the word wrap happens, though I hadn't noticed it until you posted about it. Don't know if there is a way to disable it.
longfilename.png

215
Something a bit like this https://www.instruct...-Pi-Doves-Repellent/ ?

Turning a light source on/off and moving small servo motors is quite easy with a Raspberry Pi. There are a lot of tutorials on that online. My advice is that you first figure out what type of sound/light/movement is sufficient to repel the birds in the location you have in mind. Once you have that more detailed you can work out what kind of hardware/software you need. Perhaps a simple PIR movement sensor is enough as a reliable detector, rather than more complex machine learning and computer vision software?

216
General Software Discussion / Re: Mozilla shoots itself in foot
« on: May 05, 2019, 02:28 PM »
https://blog.mozilla...-add-ons-in-firefox/
A Firefox release has been pushed — version 66.0.4 on Desktop and Android, and version 60.6.2 for ESR. This release repairs the certificate chain to re-enable web extensions, themes, search engines, and language packs that had been disabled (Bug 1549061). There are remaining issues that we are actively working to resolve, but we wanted to get this fix out before Monday to lessen the impact of disabled add-ons before the start of the week. More information about the remaining issues can be found by clicking on the links to the release notes above. (May 5, 13:22 EDT)

Seems like a reasonable approach. They've now had more time to test the update. The release allegedly patches (most of) the issues which should go some ways to mitigate negative impact on users who rely on Firefox on work/school weekdays.

217
General Software Discussion / Re: Mozilla shoots itself in foot
« on: May 05, 2019, 03:22 AM »
Big mess this!

Ghacks is a good site, but a bunch of people in the comments section there tend to be weirdly, toxically negative against all things Mozilla/Firefox.

Two more direct sources to monitor for news until a more permanent fix is out:
https://blog.mozilla...-add-ons-in-firefox/
https://twitter.com/mozamo

https://twitter.com/.../1124882998984204288
We are really, really sorry for the continued disruption of features that you love and trust. We know this has been frustrating, and we're committed to fixing this as fast as we possibly can.

https://twitter.com/.../1124879521750978560
Hi folks, our team has been working around the clock for the last 24 hours to get your extensions back up and running. Unfortunately, we don't have a permanent fix ready to be released.

We're going to hold off on trying to push a permanent fix tonight (Pacific time) and give our engineers a chance to breathe while our QA team runs a more complete battery of tests on the updated builds.

218
Find And Run Robot / Re: Use of Variables inside Aliases
« on: April 28, 2019, 03:35 AM »
I think I should be able to fix your problem -- sounds like it's just a matter of the order that FARR replaces variables and regex values, and that regex $$n values should be resolved first.

Consider adding a list with the resolving order to the helpfile after the changes. Things that might resolve in some order or other:  %uservar.myvar.hundred% variables, $$1 regex matches, the new fileresults command, the older #filecontents command.

Helpfile says that #filecontents can be used recursively (haven't tried it) so FARR already resolves at least the string "#filecontents" for that command. But does/should #filecontents and fileresults commands also resolve %uservar.myvar.hundred% and $$1 in the file contents and if yes in what order?

Hypothetical, overly complex edge case example
- User types input that triggers a FARR alias with RegEx that puts the string "file" in $$1 and "cool" in $$2
- The alias has this results line:
fileresults C:\folder\%uservar.myvar.$$1%.txt
- with the suggested change in this thread that line would first resolve to
fileresults C:\folder\%uservar.myvar.file%.txt
- imagine the variable %uservar.myvar.file% contains string "testingfile", we then get
fileresults C:\folder\testingfile.txt
- imagine that file contains:
#$$1contents C:\folder\results.txt
- which, if command fileresults resolves $$1, will resolve to the command
#filecontents C:\folder\results.txt
- imagine that file in turn contains
C:\here\%uservar.othervar.$$2%.txt
- which, again if command #filecontents also resolves $$1 and % variables, resolves to
C:\here\%uservar.othervar.cool%.txt
- which, imagine, resolves to
C:\here\final_file.txt
- which contains
Spoiler
Never gonna give you up
Never gonna let you down
Never gonna run around and desert you
Never gonna make you cry
Never gonna say goodbye
Never gonna tell a lie and hurt you

:P


219
Find And Run Robot / Re: Use of Variables inside Aliases
« on: April 27, 2019, 06:32 AM »
Just to add to mouser's suggestion:
You can use the list approach together with RegEx and RegEx result filter to ensure that only the list items are shown in results, and filtered as you type. Without RegEx unwanted files that contain the keyword string might also show up in the results.

Example of what I mean with RegEx result filter:
1.png

With the above you'd type "gg" to get the whole list and nothing else. Then keep typing to filter the list.

220
Find And Run Robot / Re: Use of Variables inside Aliases
« on: April 26, 2019, 04:29 PM »
I don't know of any workaround to do exactly what you want to do. But perhaps mouser does.

Anyway I like that you're new to FARR but already push the boundaries :Thmbsup: Aliases are powerful so maybe there is is some other way to achieve the end goal you're after. Could you tell more about the use case?

221
@4wd: I took MourningStar to want to apply the exact context menu verb on the selected files. That will sometimes be different from passing a textfile with filepaths to the target application. But if the applications they want to use this on have command line equivalents for each of the wanted verbs then your approach, if we add an extra step constructing the command line argument, is an alternative way to do it.

edit:
Doh! You already made my point. Or rather I repeated yours.
passed to the end program, (or intermediate cmd file if the program can't take text list input).
I suppose I'm standing on the shoulders of 4WD giants 8)

222
I understand correctly using your code/script/app would depend on another code/script/app in order to produce a one press operation
-MourningStar (April 05, 2019, 12:32 PM)
From what I can tell, yes. You'd use for example AutoHotkey to create a script with a hotkey that when pressed causes the script to
1. get the filepaths of the currently selected files in the active File Explorer window, and
2. run cautomaton32 on the command line with a verb (that you've previously manually looked up and added to the code) and the filepaths as parameters

You'd create one such hotkey for each target application (wmp, winamp, ...) you want to send files to using some context menu verb.

Alternatively the AutoHotkey function InvokeVerb() can replace step 2 , https://sites.google...functions/invokeverb

edit: the function only works on one single file or one whole folder at a time. We can apply it in a loop over each of the selected files. But that might not have the same effect as manually selecting some files, right clicking and choosing a verb. For example we might end up starting three instances of a media player rather than starting one instance and adding three files to its playlist. Relevant (unsolved) StackOverflow issue: https://stackoverflo...ia-shell-application

I think the chance of someone completing your request might increase if you provide more details. What are the exact names of applications you want to send files to with a hotkey? For each such application, what is the name of the its context menu verb that you want to trigger?

223
Non-Windows Software / Re: git9 - A Git file system for Plan 9
« on: April 15, 2019, 04:40 PM »
I'm not sure. I know nothing beyond wikipedia about Plan 9 (have seen parts of the film though!  ;D). Do you use it and in what way will this new development make it better to use?

224
Non-Windows Software / Re: git9 - A Git file system for Plan 9
« on: April 15, 2019, 02:12 AM »
EIL5

225
Living Room / Re: I'm getting married, wish me luck!
« on: April 15, 2019, 02:08 AM »
Waaay too late
-ScreenManiac (March 10, 2019, 10:59 AM)
Hold my beer!  :)

Great to hear this mouser. Congratulations to both of you!

Pages: prev1 ... 4 5 6 7 8 [9] 10 11 12 13 14 ... 47next