Light weight screenshot and annotate combo

Forum Forums antiX-development Graphics Light weight screenshot and annotate combo

  • This topic has 315 replies, 10 voices, and was last updated Aug 23-5:44 pm by BobC.
Viewing 15 posts - 211 through 225 (of 315 total)
  • Author
    Posts
  • #61344
    Moderator
    Brian Masinick
      Helpful
      Up
      0
      ::

      That’s why documentation must be extremely concise, short, clean and not miss.

      I think that 1-2 short paragraphs are worth it for the few people who actually READ, then waste far more time creating a cute video.

      More people will pay attention to the video, but super accurate, terse documents are also important for aging UNIX geeks who now run intelligent, lean, mean antiX.

      Hmm, sounds like a few good people that I know.

      --
      Brian Masinick

      #61348
      Moderator
      BobC
        Helpful
        Up
        0
        ::

        Ok, 2 paragraphs, here goes:

        antiXscreenshot – An app that takes a picture of your screen, allows you to preview it, annotate and edit it, and save it, as well as feed it to other apps.

        Dialog window:
        An initial Dialog window allows you to tell the app what you want. Change the options if you need to, then click Ok.
        It can take the picture of a visible area you select, a visible window, or the whole screen on a delay.
        You can choose the base name of the files you want created within system limitations and it has the option of automatically numbering when duplicate names exist if you like.
        It can save your picture to various types of files, limited to those supported by the underlying picture taking app, Scrot, and MTPaint, the initial viewer/annotater/editor.
        It will default to creating and using a Screenshots folder in your home directory, but you can change it to a different directory if you like.
        You can select the level of quality you want, from 70 to 99, but what numbers will work are dependent on the file type. png is said to be more stringent.
        It has the option of creating a thumb for your pic, and it creates the thumb after you do your initial annotating and editing with MTPaint.
        If you register an IMGUR Client API Id, you can enter your own in the box provided overriding the default value given.
        In general, the app will save your selections for most values so they will default in next time it’s run.

        Editing and Annotating with MTPaint:
        After the pic is taken, if it is of a full screen, it will be scaled down to 85% to make it easy to edit.
        The pic will then open in MTPaint for you to preview, edit, and annotate. All of MTPaint’s abilities are available.
        To add Text to your pic, just click the T icon and enter the text in the field provided. You can adjust the font size and attributes if you wish. Click the Paste Text button when done. Then select and drag the text to where you want the text positioned.
        If it isn’t right, press Ctrl-z to undo and try again.
        To draw a line with an arrow at the end you click the Straight Line icon which is a Ruler, and then point to where the line should begin and click, then drag to where it should end. Let go of the mouse button and press the “a” key where you want the arrowhead, and then press the Esc key to end line draw mode. When done editing and annotating, click the Save button and then Exit button. After you exit your thumb will automatically be generated.

        Action window:
        After the pic and thumb are created, an Action window pops up, and you can decide what you want to do with your pic.
        Some apps on the menu are specifically named because they come standard with antiX or are prominent Linux programs available from the Program Installer.
        Some apps on the menu are named generically because the actual app that will be run is the default you have selected under Preferred Applications.
        You also have the option of just cancelling or exiting, taking another screenshot, or saving the file and exiting.

        If you need help, run the program in a Terminal and create a post on the Forums to let us know you have a question or difficulty. If you would describe what you are trying to do, along with a description of the issue, and screen shots (if possible), as well as the output from the terminal, someone there should be able to help you.

        • This reply was modified 1 year, 11 months ago by BobC. Reason: added mtpaint edit/annotate paragraph
        • This reply was modified 1 year, 11 months ago by BobC.
        #61367
        Member
        ile
          Helpful
          Up
          0
          ::

          hello everyone

          #61370
          Moderator
          BobC
            Helpful
            Up
            0
            ::

            I put the Help text above into a file called antixscreenshot-HELP.txt and included it in the zip file attached to the post above. I would think it should be reasonable to translate from that format, but let me know if not.

            Is there another antiX bash script based program that has a help button and functionality that I could clone? I would expect to find a Help button and for it to pop up a help screen, perhaps in a simple browser like Dillo or text viewer, or maybe a dialog box. PPC’s IceWM Toolbar Icon Manager has a YAD help box, but that was the closest I could find.

            #61371
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              Ile, I changed my desktop to Space-IceWM and the screenshow of a terminal window including it’s border worked without any problems. It also worked fine with a Space-JWM desktop.

              Aha, It created a Double – overlapped Window when used with Space-Fluxbox. Was that the problem?

              If true, we have 2 good options.
              1. If taking pic of a window, check to see if Fluxbox is running, and if found do not use -b option on Scrot
              2. Add a Fluxbox Window selection option
              3. Add a note to the help text and suggest they use Cursor Select to manually select the window if they don’t like what it selects automatically when a window is selected

              I don’t like the looks of window pics without the borders, myself, and therefore would rather make it easy to get a pic of a windoew with the border.

              #61372
              Member
              ile
                Helpful
                Up
                0
                ::

                Hello BobC and everyone
                I like documentation like that. Thanks BobC.
                About saved config.:
                Can there be a checkbox to choose default settings instead of saved use config.? choose either?

                sample
                scrot 0.9 will choke on this. antixscreenshotsterbp
                ready for a future with b and p
                toggle option b include wm frame with active window
                toggle option p show mouse pointer
                option q value is text entry

                I wonder if file type format box, does anyone wish to type in it? Keyboard people is that an entry you wish to type?

                sample comprehensive instruction = Press_Enter.
                Attempt humor.
                Save or don’t.
                Can Save As different file type format using mtpaint unsaved Shot,
                follow BobC’ Editing with MTPaint information.
                Thanks BobC

                antixscreenshotsterbp. s,h as zip

                #61376
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  Another possibility is to replace scrot with maim if it works for all cases, if anticapitalista is ok with that.

                  Time to work. I will be gone the next 14-24 hours

                  #61377
                  Member
                  ile
                    Helpful
                    Up
                    0
                    ::

                    Hello BobC
                    fluxbox and spacefm-desktop;
                    Good that You encountered bad behavior,
                    well sorta, in finding the active but not current window.
                    Use rectangle select to avoid problems.
                    Is That a compromised workflow(?)
                    alt+drag if trouble with a desktop-manager screenshot.

                    rox desktop-manager just had similar issue on buster scrot 1.5

                    #61387
                    Anonymous
                      Helpful
                      Up
                      0
                      ::

                      Is there another antiX bash script based program that has a help button and functionality that I could clone study?

                      Launch this program, click Help button, then take note of a phrase within the helptext. Viewing the script source in geany (provides syntax highlighting), search for the text phrase to see where it occurs within the code.
                      https://gitlab.com/nXecure/my-offline-repo/-/raw/dev/my-offline-repo.sh

                      If you download or ‘git clone’ the overall project, you can discover how the translations are handled.
                      https://gitlab.com/nXecure/my-offline-repo

                      #61404
                      Moderator
                      BobC
                        Helpful
                        Up
                        0
                        ::

                        Ile, The program when taking pics in window mode does not care which window is active. It takes a pic of the one you point to and click on.
                        The window mode worked fine on the Space-IceWM desktop.
                        It did not work correctly in Space-Fluxbox desktop mode. That was the only one that did not take a correct pic that I saw.
                        If you find any other standard antiX desktop/window manager combinations that don’t take the pic correctly, please let me know which so I can try to debug it.
                        Did you try the rox desktop options?
                        Yes, people can type in a different file type and as long as scrot and mtpaint can work with that file type, it should work ok.
                        If someone messes up the defaults, they can just delete the config files that caused it and it will recreate them with the program defaults.

                        Skidoo, I’ll have a look at that this weekend. It also needs to work well for translation. Thanks for finding something…

                        #61407
                        Moderator
                        Brian Masinick
                          Helpful
                          Up
                          0
                          ::

                          Nice job on the app description, BobC. Now if anyone REALLY wants to know what’s available, they can read your description as well as look through the code. As you and anti have stated, most people don’t read detailed descriptions; at least we have something in place for those who actually read and learn.

                          This has been a good community exercise, with comments, feedback, learning, and improvement. From that standpoint, this is a successful effort. If it becomes a standard tool, it is a significant accomplishment.

                          Skidoo’s script is an excellent example of an interactive script with graphical elements. Many other things to commend in this thread; nice community effort!

                          --
                          Brian Masinick

                          #61525
                          Moderator
                          BobC
                            Helpful
                            Up
                            0
                            ::

                            I spent all day trying to add a notes feature but can’t get it working. It works when i paste in the command it echos , but when it run it it say the note format is invalid. Very frustrating. It won’t even work with the command example from the manual, at least according to the echo.

                            Maybe its not worth fighting.

                            I think I can get the help button working. Unfortunately it’s in the same code so I need to merge the things that do work.

                            I could post the test program that I was using to try to figure it out if anyone better wants to try.

                            #61552
                            Moderator
                            Brian Masinick
                              Helpful
                              Up
                              0
                              ::

                              The echo statement generally writes to stdout unless specifically directed otherwise.

                              Could that possibly be the reason that it’s not writing to the correct resources inside of the note? Just speculation…

                              --
                              Brian Masinick

                              #61553
                              Moderator
                              BobC
                                Helpful
                                Up
                                0
                                ::

                                I did get the Note to work at about 2:30 am. I had to hard code the attributes to do it, as I couldn’t get it to work with them as variables. I had hoped to put it in variables so that someone could edit their dialog config file if they wanted a different font, size, position, or color.

                                I’m thinking on whether I can add the “show mouse cursor” and “include window border” options. To do that I would want to be able to default the checkboxes from the config files, which I don’t think I know a way to do.

                                I’m working on putting the help text into the code. I was hoping just to publish the file I wrote, but the YAD script given doesn’t do that. Maybe I should try to find a way. It will happen again on another program I would think.

                                Here is the parameter testing program where I couldn’t get the note format string to work from a variable, in case anyone is good enough to know a way to get the value for NOTEFORMAT from a variable instead of hard code:

                                #! /bin/bash
                                
                                now="$(date +%d-%b-%Y:%k:%M)"
                                echo "Now: $now"
                                # set default values
                                if [ ! -n "$REGION" ]; then export REGION=$(gettext $"Cursor Select"); fi
                                if [ ! -n "$NAME" ]; then export NAME=$"screenshot" ; fi
                                if [ ! -n "$EXT" ]; then export EXT="jpg" ; fi
                                if [ ! -n "$QQC" ]; then export QQC="80" ; fi
                                if [ ! -n "$SAVETO" ]; then export SAVETO="false" ; fi
                                if [ ! -n "$SAVEDIR" ]; then export SAVEDIR="$HOME/$DEFAULT_SAVEDIR" ; fi
                                if [ ! -n "$USECOUNTER" ]; then export USECOUNTER="true" ; fi
                                if [ ! -n "$DELAY" ]; then export DELAY="5" ; fi
                                if [ ! -n "$AGAIN" ]; then export AGAIN="false" ; fi
                                if [ ! -n "$THUMB" ]; then export THUMB="false" ; fi
                                if [ ! -n "$THBPERC" ]; then export THBPERC="33" ; fi
                                if [ ! -n "$DEFAULT_CLIENT_ID" ]; then export DEFAULT_CLIENT_ID="c9a6efb3d7932fd" ; fi
                                if [ ! -n "$ADDNOTE" ]; then export ADDNOTE="false" ; fi
                                if [ ! -n "$NOTEFORMAT" ]; then export NOTEFORMAT="-f '/usr/share/fonts/truetype/dejavu/DejaVuSans/12' -x 10 -y 20 -c 255,0,0,255" ; fi
                                if [ ! -n "$NOTETEXT" ]; then export NOTETEXT=$"Taken "$now ; fi
                                echo "NOTETEXT: $NOTETEXT"
                                
                                REGION="Window"
                                QQC=93
                                INCLBORDER=true
                                DISPCURSOR=true
                                THUMB=true
                                THBPERC=33
                                ADDNOTE=true
                                WORKFILE="$HOME/testy.jpg"
                                
                                # build parmameter string
                                if [ "$REGION" = "Full Screen" ] ; then
                                  if [ -z "$DELAY" ] ; then
                                    PARMSTR=""
                                  else
                                    PARMSTR="-d $DELAY"
                                  fi
                                else
                                  PARMSTR="-s"
                                fi
                                echo "1-PARMSTR: $PARMSTR XXXX"
                                if [ ! -z "$QQC" ] ; then PARMSTR="$PARMSTR -q $QQC" ; fi
                                echo "2-PARMSTR: $PARMSTR XXXX"
                                if [ "$INCLBORDER" = "true" ] ; then PARMSTR+=" -b" ; fi
                                echo "3-PARMSTR: $PARMSTR XXXX"
                                if [ "$DISPCURSOR" = "true" ] ; then PARMSTR+=" -p" ; fi
                                echo "4-PARMSTR: $PARMSTR XXXX"
                                if [ "$THUMB" = "true" ] && [ ! -z "$THBPERC" ] ; then PARMSTR+=" -t $THBPERC" ; fi
                                echo "5-PARMSTR: $PARMSTR XXXX"
                                NOTEFORMAT="-f '/usr/share/fonts/truetype/dejavu/DejaVuSans/12' -x 10 -y 20 -c 255,0,0,255"
                                NOTETEXT="Hi"
                                if [ "$ADDNOTE" = "true" ] && [ ! -z "$NOTEFORMAT" ] && [ ! -z "$NOTETEXT" ]; then 
                                  echo scrot "$PARMSTR --note \"$NOTEFORMAT -t '$NOTETEXT'\" \"$WORKFILE\""
                                  scrot "$PARMSTR --note \"$NOTEFORMAT -t '$NOTETEXT'\" \"$WORKFILE\""
                                else
                                  echo scrot "$PARMSTR \"$WORKFILE\""
                                  scrot "$PARMSTR \"$WORKFILE\""
                                fi
                                ###scrot -s -q 93 -b -p -t 33 --note "-f '/usr/share/fonts/truetype/dejavu/DejaVuSans/12' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'" "/home/bobc/testy.jpg"
                                
                                #61554
                                Moderator
                                BobC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Brian, I obviously don’t know this language well enough, as much as I need to struggle to do everything, but I don’t think the echo is the issue. I am just using the echo to display the command that I think is running, and I can paste what is echoed into the command line and it works, but the program gets an error, so it must be different somehow. Try running the program above and watch it fail, then paste the echoed output of the command into the command line and note that it works.

                                Viewing 15 posts - 211 through 225 (of 315 total)
                                • You must be logged in to reply to this topic.