Page 1 of 1

Xnviewmp command line parameters ?

Posted: Sun Feb 09, 2014 10:12 am
by oops66
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.

Re: Xnviewmp command line parameters ?

Posted: Tue Feb 11, 2014 7:30 pm
by xnview
which parameters are needed?

Re: Xnviewmp command line parameters ?

Posted: Tue Feb 11, 2014 8:03 pm
by oops66
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...

Re: Xnviewmp command line parameters ?

Posted: Sun Feb 16, 2014 9:59 pm
by IcePix
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

Re: Xnviewmp command line parameters ?

Posted: Mon Feb 17, 2014 10:44 am
by oops66
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 ;-)

Re: Xnviewmp command line parameters ?

Posted: Wed Mar 12, 2014 1:58 pm
by xnview
See Issue 263 for current status and details.

Re: Xnviewmp command line parameters ?

Posted: Tue May 13, 2014 12:44 pm
by oops66
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.

Re: Xnviewmp command line parameters ?

Posted: Sat Oct 27, 2018 4:10 am
by Lainagier
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!

Re: Xnviewmp command line parameters ?

Posted: Fri Nov 30, 2018 10:44 am
by xnview
i'll add -clipaste in next version

Re: Xnviewmp command line parameters ?

Posted: Fri Sep 20, 2019 1:29 pm
by michel038
I would like to have "-db XnViewSport.db" or "-db Family.db" as a new command-line parameter, in order to work with multiple databases for different collections of photos ...
But perhaps this option will not handle corresponding categories ?

Re: Xnviewmp command line parameters ?

Posted: Sat Sep 21, 2019 5:33 am
by jadO
I would like to see a "-path" switch to pass the path to XnviewMP that should be opened in browser.
Then you could pass dynamically the directory to load upon launch instead of only launching the last used directory or always the same standard one.

Re: Xnviewmp command line parameters ?

Posted: Thu Nov 07, 2019 10:07 am
by margu
Is there a way to open the application in image viewer mode only? I.e. not opening the browser? I.e. the image is opened in a viewing window and when closing this window, the application is closed? This is for other programs which need an external image viewing application. Thanks. Mathias.

Re: Xnviewmp command line parameters ?

Posted: Thu Nov 07, 2019 11:02 am
by cday
margu wrote:
Thu Nov 07, 2019 10:07 am
Is there a way to open the application in image viewer mode only? I.e. not opening the browser? I.e. the image is opened in a viewing window...
In Tools > Settings > General -- General tab there is an option to select whether the application launches with the browser window open...

... and when closing this window, the application is closed? This is for other programs which need an external image viewing application. Thanks. Mathias.
In Tools > Settings > Interface -- Tabs tab there is an option Closing last tab exits XnView if that is what you mean?

I am assuming that if those settings have been previously enabled, then they will apply when starting XnView MP with a command line parameter.