Xnviewmp command line parameters ?

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

Post Reply
User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Xnviewmp command line parameters ?

Post by oops66 » Sun Feb 09, 2014 10:12 am

Hello,
Is it planned to add for xnviewmp some parameters for the command line options? (like xnview.exe 2.xx)
http://newsgroup.xnview.com/viewtopic.php?p=51895#51895

ex:
#xnviewmp -capture=desktop
(for screenshot with context menu, I actually use : #sleep 5 ; wine xnview_2.xx.exe -capture=desktop)
...

--- available into xnview 2.xx --- \ info \ command line help ...
Usage: xnview [options] Files
Options:
-all : Open a window For each picture
-browser : Launch the browser
-slide <File> : Launch slide show
-Full : Start in fullscreen
-Fi : Force Fit to Image
-Fa : Force Xnview to Fit Image
-ini <File> : Initialization File
-scan : Acquire the image From the TWAIN device
-capture : Capture the whole screen
-clipaste : Import clipboard

You can use ‘xnview <Folder name>' to start browser.
Last edited by oops66 on Wed Feb 19, 2014 2:14 pm, edited 2 times in total.
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

User avatar
xnview
Author of XnView
Posts: 30267
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xnviewmp command line parameters ?

Post by xnview » Tue Feb 11, 2014 7:30 pm

which parameters are needed?
Pierre.

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Xnviewmp command line parameters ?

Post by oops66 » Tue Feb 11, 2014 8:03 pm

xnview wrote:which parameters are needed?
...For me, let's start with: -ini «file» and -capture ;-)

Code: Select all

-capture=desktop,d:\screenshot_$.ext
or
-capture=desktop,/home/linux_dir/file_$.ext
$ is a date and time - 08132007_214818

-capture=desktop,c:\file_###.ext
or
-capture=desktop,/home/linux_dir/file_###.ext
# is a number index - #=1, 2, 3..., ###=001, 002, 003...
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

IcePix
Posts: 1
Joined: Sun Feb 16, 2014 9:40 pm

Re: Xnviewmp command line parameters ?

Post by IcePix » Sun Feb 16, 2014 9:59 pm

Bonsoir Pierre
I would like to see the "-slide <file>" command line argument enabled in MP. I have a TCC batch file that automatically downloads image files from my camera card to my PC, then runs a full-screen slide show of the new pictures with the command "XnView -fs <file>". I converted the batch file to a Linux shell script but I am obliged to use the default viewer, eog, for the slide show.
Merci
Peter
XnViewMP 0.64. Debian 6.0.9 ("squeeze"), kernel 2.6.32-5-686, Gnome 2.30.2
XnViewMP 0.64. LinuxMint 16 ("petra"), kernel 3.11.0-12-generic, Gnome 3.9.90

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Xnviewmp command line parameters ?

Post by oops66 » Mon Feb 17, 2014 10:44 am

Hello IcePix,
A user friendly workaround is to use a custom nautilus script (from the linux browser) with Wine and the XnView classic version 2.XX....
The custom xnview2.xx nautilus script:
/home/user1/.gnome2/nautilus-scripts/slideshow.sh

Code: Select all

#! /bin/sh

# https://github.com/pydave/daveconfig/blob/master/unix/nautilus/nautilus-scripts/slideshow
# Show all of the pictures in the selected folder in Eye of Gnome.
# (Makes it easy to do a slide show of a hierarchy of folders.)

# Make a temp file using this script's name and the pid
pic_list_file="/tmp/`basename $0`.$$.tmp"

# make sure our temp file doesn't exist
rm $pic_list_file
for i in `seq $#` ; do
    # for each argument find the images in that folder

    # Note: We _should_ be able to pass these directory to find without using a
    # loop, except I don't know how to escape the spaces in filenames.

    # use -print0 and -0 to put NULL at the end
    # of strings so we don't have problems with space
    find "$1" -type f -iregex ".*\.\(jpe?g\|png\|gif\)" -print0 >> $pic_list_file
    shift
done

# send the full list to eye of gnome
#cat $pic_list_file | xargs -0 eog

# avec Wine
#cat $pic_list_file | xargs -0 wine /home/user1/xnview-all/XnView2.13/xnview.exe -full
#or
xdotool key --delay 2000 space & cat $pic_list_file | xargs -0 wine /home/user1/xnview-all/XnView2.13/xnview.exe -full

#xdotool key space
#xdotool key ctrl+l

# http://newsgroup.xnview.com/viewtopic.php?f=60&t=29392#p117459

# XnViewMP
#cat $pic_list_file | xargs -0 xnview

# remove the temp file
rm $pic_list_file
... Then mouse select pics files from the linux browser (nautilus), nautilus-script choose slideshow ...
... Then press "space" to start the quick slideshow (XnView 2.xx in fullscreen mode -- default 2 secondes into the xnview.ini file) ... then "Esc or Echap" to quit.
( or with oeg, start the slideshow in fullscreen with "F5")

... So Pierre, the parameter -full is useful too for the quick slideshow function ;-)
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

User avatar
xnview
Author of XnView
Posts: 30267
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xnviewmp command line parameters ?

Post by xnview » Wed Mar 12, 2014 1:58 pm

See Issue 263 for current status and details.
Pierre.

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Xnviewmp command line parameters ?

Post by oops66 » Tue May 13, 2014 12:44 pm

xnview wrote:See Issue 263 for current status and details.
...Thank you Pierre,
What is working, or not here (Mp_v0.66)...

---------------------------------------
works here:

1-) the -ini parameter
xnview -ini xnview_custom.ini

2-) the -capture # (numbering stamp....., 001, 002, etc)
xnview -capture=desktop,/home/user/dir/file_n_###.jpg

---------------------------------------
Doesn't work here:

0-) the Picture should be opened directly into xnviewMP (like xnview 2.xx version)
xnview -capture=desktop
or
sleep 5 ; xnview -capture=desktop

1-) the -capture $ (time stamp ...., date_time1, date-time2, etc)
xnview -capture=desktop,/home/user/dir/file_$.jpg

*-) But a workaround exist (linux version)
xnview -capture=desktop,/home/user/dir/file_$(date '+%Y-%m-%d_%H-%M-%S').jpg

2-) the -full parameter (open an image in full screen)
xnview -full /home/dir/image.jpg

*Edit1: But a workaround exist too by setting a parameter into
Settings\General\Fullscreen when starting with a file (ticked)


Please, also add the info into the menu: About\Command Line\...
and a "xnview -h" et/or "xnview --help" option to the help.
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

User avatar
Lainagier
Posts: 1
Joined: Sat Oct 27, 2018 3:52 am

Re: Xnviewmp command line parameters ?

Post by Lainagier » Sat Oct 27, 2018 4:10 am

Hello, I'm a longtime Classic devotee newly upgraded to MP (0.92 on Windows 10 Home). I'm bumping this thread to request the reinstatement of the "-clipaste" switch. I've found it very handy to keep a shortcut with -clipaste added, as a one-click way of viewing/editing/saving whatever image I've just copied. (Now it takes two clicks, which is obviously unacceptable :P )

In the meantime, could the parameters that have already been implemented be listed at Help>About>Command Line, à la Classic? It took me a while to hunt the information down myself (plus a test or two) - perhaps other upgrading users would benefit?

Thanks for the amazing work Pierre!

User avatar
xnview
Author of XnView
Posts: 30267
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Xnviewmp command line parameters ?

Post by xnview » Fri Nov 30, 2018 10:44 am

i'll add -clipaste in next version
Pierre.

Post Reply