What's wrong with this custom defined command?
# Resize an image using convert
+ f \.jpg$ | f \.JPG$
R Resize image to fit within 800 pixel bounding square
size=800
convert "%f" -resize ${size}x${size} "%b-${size}.%x"
When I press F2 I get:
Error: No suitable entries found in .mc.menu
After some try and error, I got to a conclusion that what I needed was:
shell_patterns=0
defined at the top of .mc.menu file.
Here is some brief explanation:
"..Pattern is either a shell pattern (i.e., wildcards) or a regular expression according to the global setting configured in the Options/Configuration dialog. This setting can be overridden by adding shell_patterns=0 as the first line of the menu file. A value of 1 forces use of shell patterns, while a value of 0 forces regular expressions instead."
Related
I have a file named image#3x.png, which have a # in file name.
and I use cmd + p to open the overlay, then I input image,
the result shows all files which has image in it,
then I input # to make my whole input become image#,
and then, the whole result is gone.
the #3x or #2x comes from zeplin, means the size of image,
so I prefer not to change the name of file to fit ST.
Can any one help?
btw,
I know if I input # in the beginning of overlay will make it search function definition in current file.
I have no idea does it associate with it or not?
It seems like there is no way to "escape" the # character in Goto Anything, so my suggestion is just not to type it. You could search for image x and it would show image#3x.png as a possible result, because it uses fuzzy matching.
I have an XYZ text file, generated from a Renishaw touch probe on a CNC mill, that I'm trying to open in MeshLab. I can't see anything after importing. It's a simple file of just XYZ positions. A short example:
X04.0000Y01.1374Z-01.5000
X04.5000Y00.9715Z-01.5000
X05.0000Y00.7969Z-01.5000
X05.0000Y00.8322Z-01.3356
X04.5000Y01.0022Z-01.3431
X04.0000Y01.1603Z-01.3500
X03.9000Y01.1708Z-01.3491
X03.8000Y01.1392Z-01.3472
X03.7000Y01.1236Z-01.3461
This example is so short it would just be a line if you connected the points. I tried putting spaces between each value as the import dialog box asks and nothing shows up on screen. There is little or no documentation on how to accomplish this.
Can anyone open this simple text file and provide the steps to accomplish this?
The following very simple trick worked for me.
Replace all the occurrences of X, Y and Z with a space (I did it in Emacs and your text editor can surely achieve the same).
Save your file with the extension xyz (e.g., as CNC.xyz).
Open it in Meshlab.
The picture below is a printscreen showing the points you provided. (note that I have made them bigger by selecting "Render > Show Vertex Dots" and by increasing the point size in the menu available after pressing the "Show Layer Dialog").
Replace the letters X, Y, Z with spaces. For meshlab you have to leave it like this:
24.99221 9.49049 13.06404
25.99253 9.49049 12.77443
25.99253 9.85957 12.66110
How can I format the output of a tree command so that the formatting of ls, e.g. highlighting and colour scheme of directories and certain file types applies to the output?
The problem is when I restrict the depth of tree to say 2, if there are any directories in the final level, there is not a noticeable difference between dirs and files. So someway to easily distinguish between the two, whilst displaying both files and dirs would be great. Any help would be appreciated.
tree -C
-C
Turn colorization on always, using built-in color defaults if the LS_COLORS environment variable is not set. Useful to colorize output to a pipe.
see man page.
I usually use tree with Level 2, so this my favorite alias:
tre='tree -CL 2'
I am interested in highlighting portions of a PDF programmatically, hopefully through a command line tool of sorts. My particular PDF file is not OCRed so the text is not searchable, but the particular places that I would like to highlight occur on every page in the same position. I was wondering if there is a tool to do this where I can input the rectangle positions in pixels into the command line tool and it would highlight the relevant portions for me.
Previous Findings
I have looked over the internet and found a few sites noting how to do this by searching for the text. Unfortunately that is not possible for me as my PDF does not have OCR.
I have searched stackexchange for similar questions and found
How to Highlight Text in PDF with commandline (windows)? and https://stackoverflow.com/questions/32713633/how-to-highlight-text-in-pdf-using-acrobat-reader-from-command-line but both were unanswered.
Potential Ideas
The first link had a possible lead with a given link to
Add comments to PDF files automagically with regular expressions
which uses ghostscript to include annotations. Is it possible to use ghostscript to highlight the pages in a similar fashion by coordinates.
The second link mentioned using command line options for the adobe acrobat/reader exe file, but searching the relevant manual for the command line switches does not show any highlighting options. It may be possible that Adobe does not support the highlight option through command line anymore, which would be unfortunate.
My last idea would be using AutoHotkey to create a macro that does an actual highlight for me using a GUI program, but that would be the last resort.
What do you all think? Any ideas on what to do, or things to check out? I am willing to program out a solution and can work out the solution on Windows or Linux if necessary. Thanks in advance.
I would have thought a Highlight annotation was what you wanted.Highlight annotations are a type of text markup annotation and as such take a set of QuadPoints which describe the bounding box(es) to apply the annotation type to.
Since you say you know the co-ordinates this would seem appropriate for your use. Of course, you will have to create the Annotation on every page, and you will have to learn how to program this with a pdfmark, but I believe it should work.
Note that the co-ordinates are in user space (generally 72 points to the inch) NOT pixels, because PDF is not an image format there is no concept of pixels, except for included images.
There are quite a few officially unsupported command line parameters to acrobat or the acrobat reader (acrord32.exe in Windows).
See: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
This includes a parameter to highlight with four integers at left,right,top,bottom that are in some unspecified units but with 0,0 at the top left of the page.
EXCEPT... I have been unable to get this to work.
I can pass in parameters to search and zoom but highlight never shows anything.
For instance:
start acrord32 /n /s /a "search=MS25441&zoom=300&page=1&highlight=0,55,0,65" floorplan1_ABM_cameras.pdf
Opens the files, searches for the string, zooms to 300% but nothing shows for a highlight no matter what coordinates I specify.
i have a gnuplot script file to fit measurement data, using this structure:
set terminal png
...some format templates...
f(x) = a + b*x + c*x**2
fit f(x) "datafile.txt" using "X":"Y" via a, b, c
...some plotting commands etc...
with this, gnuplot shows some strange behaviour:
when i run the script as-is, it gives me the following error:
Undefined value during function evaluation
"myscriptfile.gnuplot", line 5: error during fit
when i move the set terminal png line after the fit line, it runs without a hassle.
normally, i'm loading this at the beginning of a master script containing format templates and further data processing routines. doing this also gives me the aforementioned error message, even with the moved set terminal command.
since this is just the first part of processing my data i really need it to work from the master script... i already tried setting initial guesses, FIT_LIMIT and loading it from a gnuplot environment. i'm using gnuplot 4.6.5.
does anyone know how to solve this or how fit gets influenced by other commands? or is this some kind of bug?
edit: uploaded a stripped down version of scripts and data files to here. with the reduced data files the computed fits don't concur with the measured points, but with the complete data they do.
I'm not sure, what the real error is, but it seems to be related to your use of using "PHEAT":"RHOT", although that should be fine.
I could reproduce your error with the following minimal setup:
A data file test.dat:
A B
1 2
2 3
3 4
and a file test.gp:
f(x) = a*x**2 + b*x + c
fit f(x) 'test.dat' using "A":"B" via a,b,c
If I call this file with gnuplot test.gp I get the same error as you. It doesn't appear if I use using 1:2. If I paste the code in an interactive terminal, the error also appears, but only once. If I repeat only the fit command again, it works fine. I'll report this as a bug.
In the script you posted, I was also able to fix this by using using 9:8 instead of using "PHEAT":"RHOT". Additionally you must remove the first line of the data file, which can be done on-the-fly with tail, so that you can leave the using statements of the plot unchanged. So you can use:
fit rhotside(x) "< tail -n +2 testdata.txt" using 9:8 via rhot0, rhot1, rhot2
fit rcoldside(x) "< tail -n +2 testdata2.txt" using 9:8 via rcold0, rcold1, rcold2