Giter Club home page Giter Club logo

bcdamenu's People

Contributors

prjemian avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

bcdamenu's Issues

start as console, not gui

On Windows, the command line help option (-h) or usage report is not shown since the default for GUI installs is to use pythonw. Switch setup.py to invoke this as a command line program, which will reveal this help. Downside is that command window will linger on Windows. Can we have it both ways?

build a proper About box

  • standard info
  • link to display copyright
  • link to documentation at RTD
  • link to GH issues (as TODO list)

consider using a QMainWindow

... and collapsible history pane as main widget

The popup menu buttons would transform into a docked menu bar (make sure this works as planned on Macintosh which has its own ideas about menu bar placement) and a status line would become easy, a la the unimenu.

import .ini files

Provide a feature that will allow .ini files to be imported. This will enhance modularity.

can't start some commands

These commands do not start:

14 IOC console = cd /opt/epics/synApps/support/xxx-R5-8-3/iocBoot/iocLinux; mate-terminal -t "XXX IOC console" -e "./xxx.sh console"
50 run AD Sim IOC in console = export EPICS_HOST_ARCH=linux-x86_64; cd /opt/epics/synApps/support/areaDetector-R2-6/ADSimDetector-R2-4/iocs/simDetectorIOC/iocBoot/iocSimDetector; mate-terminal -t "AD Sim IOC console" -e "./start_epics"
51 ImageJ = cd /home/prjemian/Apps/ImageJ; ./ImageJ

Here's the debugging output:

BcdaMenu (2017-04-23 13:48:53.487660), IOC console:  cd /opt/epics/synApps/support/xxx-R5-8-3/iocBoot/iocLinux; mate-terminal -t "XXX IOC console" -e "./xxx.sh console"
label: |IOC console|
command: |cd /opt/epics/synApps/support/xxx-R5-8-3/iocBoot/iocLinux; mate-terminal -t "XXX IOC console" -e "./xxx.sh console"|
state: 1
pid: 1650
error: id_51
state: 0
error string: No such file or directory
last error code: 0
exitCode: 255
exitStatus: 0
BcdaMenu (2017-04-23 13:49:15.416197), ImageJ:  cd /home/prjemian/Apps/ImageJ; ./ImageJ
label: |ImageJ|
command: |cd /home/prjemian/Apps/ImageJ; ./ImageJ|
state: 1
pid: 1653
error: id_52
state: 0
error string: No such file or directory
last error code: 0
exitCode: 255
exitStatus: 0
BcdaMenu (2017-04-23 13:51:27.583090), run AD Sim IOC in console:  export EPICS_HOST_ARCH=linux-x86_64; cd /opt/epics/synApps/support/areaDetector-R2-6/ADSimDetector-R2-4/iocs/simDetectorIOC/iocBoot/iocSimDetector; mate-terminal -t "AD Sim IOC console" -e "./start_epics"
label: |run AD Sim IOC in console|
command: |export EPICS_HOST_ARCH=linux-x86_64; cd /opt/epics/synApps/support/areaDetector-R2-6/ADSimDetector-R2-4/iocs/simDetectorIOC/iocBoot/iocSimDetector; mate-terminal -t "AD Sim IOC console" -e "./start_epics"|
state: 1
pid: 1682
error: id_53
state: 0
error string: No such file or directory
last error code: 0
exitCode: 255
exitStatus: 0

support symbolic substitution in config file

With some form of symbolic substitution, this code:

[amb-vm]
title = IOC: prj on amb-vm
1 medm prj = /home/mintadmin/bin/start_medm_prj.sh
2 separator =
3 start IOC = cd  /usr/local/epics/ioc/prj/iocBoot/iocLinux; ./prj.sh start
10 separator =
14 IOC console = cd  /usr/local/epics/ioc/prj/iocBoot/iocLinux; mate-terminal -t "XXX IOC console" -e "./prj.sh console"
15 IOC status = cd  /usr/local/epics/ioc/prj/iocBoot/iocLinux; ./prj.sh status
20 separator =
26 stop IOC = cd  /usr/local/epics/ioc/prj/iocBoot/iocLinux; ./prj.sh stop

might become

[amb-vm]
title = IOC: prj on amb-vm
symbol HOME = /home/mintadmin
symbol IOCDIR = /usr/local/epics/ioc/prj/iocBoot/iocLinux
symbol BINDIR = HOME/bin
symbol TERMINAL = mate-terminal
1 medm prj = BINDIR/start_medm_prj.sh
2 separator =
3 start IOC = cd IOCDIR; ./prj.sh start
10 separator =
14 IOC console = cd IOCDIR; TERMINAL -t "XXX IOC console" -e "./prj.sh console"
15 IOC status = cd IOCDIR; ./prj.sh status
20 separator =
26 stop IOC = cd IOCDIR; ./prj.sh stop

Should be scoped within the section of the .ini file

refactor settings file

  • syntax to allow for more than one user menu (give names in DEFAULT section)
  • simplify the label/command syntax
  • allow for cascaded submenus

simplified syntax:

now:

[menu_items]
label 1 = SAXS Imaging tool
command 1 = /APSshare/epd/rh6-x86/bin/python /home/beams/USAXS/Apps/USAXS_dataworker/Main.py

proposed:

[menu_items]
1 SAXS Imaging tool = /APSshare/epd/rh6-x86/bin/python /home/beams/USAXS/Apps/USAXS_dataworker/Main.py

create an Examples doc

this shows some possibilities

# bcdamenu.ini
#
# settings file for BcdaMenu GUI

[BcdaMenu]
title = BcdaMenu: jemian@gov
version = 2017.3.0
menus = IOC BlueSky linux

[IOC]
## synApps 5.8 IOC has start/stop/status/console features
title = iocgov on gov
1 caQtDM iocgov   = cd /home/oxygen/JEMIAN/sandbox/ioc/gov; ./start_caQtDM.sh
# 2 screen editor = # this is not supported yet
8 start IOC    = cd /home/oxygen/JEMIAN/sandbox/ioc/gov/iocBoot/iocLinux; ./gov.sh start
10 separator   =
14 console iocgov = cd /home/oxygen/JEMIAN/sandbox/ioc/gov/iocBoot/iocLinux; gnome-terminal -e "./gov.sh console"
15 status iocgov  = cd /home/oxygen/JEMIAN/sandbox/ioc/gov/iocBoot/iocLinux; ./gov.sh status
20 separator   =
23 stop iocgov    = cd /home/oxygen/JEMIAN/sandbox/ioc/gov/iocBoot/iocLinux; ./gov.sh stop
42 separator =
## synApps 5.6 IOC : fewer features
#title = iocprj on gov
100 separator    =
101 caQtDM iocprj	= cd /home/oxygen/JEMIAN/sandbox/ioc/prj; ./start_caQtDM
103 start iocprj	= /home/oxygen/JEMIAN/bin/start_ioc_prj.sh
114 console iocprj = cd /home/oxygen/JEMIAN/sandbox/ioc/prj/iocBoot/iocLinux; gnome-terminal  -e "screen -r"

[linux]
1 edit settings file = /bin/nedit-client ~/bin/bcdamenu.ini
44 xload = xload

[BlueSky]
title = BlueSky stuff
14 BlueSky console = cd /home/oxygen/JEMIAN/Documents; gnome-terminal -e "/home/oxygen/JEMIAN/bin/use_bluesky.sh bluesky"
20 separator   =
22 start mViewer server (console) = cd /home/oxygen/JEMIAN/Apps/mViewer; gnome-terminal -e "./start_mviewer.sh 8086"
24 mongodb viewer (console) = /bin/google-chrome http://localhost:8086/index.html
90 separator   =
92 BlueSky documentation = /bin/google-chrome http://nsls-ii.github.io/bluesky
93 NSLS-II Software documentation = /bin/google-chrome http://nsls-ii.github.io

menu font

Would be great to be able to enlarge the font of the menus and submenus.

documentation

of initial release

  • index
  • install
  • license
  • settings
  • source code (see #6) - accept as-is for initial release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.