Give the screenshot title of window when capturing window only

Bug #328663 reported by Vadim Peretokin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shutter
Fix Released
Wishlist
Mario Kemper (Romario)

Bug Description

Like gnome's screenshot tool, I think it would be nice to give the screenshot the name of the window when we're capturing the window only.

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote :

Via wildcard? In this case we need to be careful to avoid a collision with wildcards of strftime:
http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Bug 328663] Re: Give the screenshot title of window when capturing window only

Eh?

No, just take the window title (of the window that we're capturing) and make
that be the name

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote :

Sure, but users are usually setting up a special filename pattern in preferences>>filename. We can't just set the window name as filename and ignore this setting...So i suggested to use a wildcard, e.g. %wname, as a placeholder to put in the window name.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

I don't think many setup a special one.

How about if they leave the default one, we use the window name?

Changed in shutter:
assignee: nobody → mario-kemper
importance: Undecided → Wishlist
milestone: none → 0.71
status: New → Confirmed
Changed in shutter:
milestone: 0.71 → 0.85
Revision history for this message
Michael Kogan (michael-kogan) wrote :

I think the wildcard solution is better since the name could consist of the window name and some additional user defined information/wildcards.

Revision history for this message
Brian C. Ladd (drbcladd) wrote :

Given that wildcards are already the established way of naming files (the idea of counters, date, etc), it would make sense to use wildcards for file names.

Am I reading this correctly in that it is in a beta? 0.85? My life is looking pretty good.

Thanks for the great work (it is actually pretty readable code, too).

-bcl

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote : Re: [Bug 328663] Re: Give the screenshot title of window when capturing window only

> Given that wildcards are already the established way of naming files
> (the idea of counters, date, etc), it would make sense to use wildcards
> for file names.
>

What do you think about a multi-purpose wildcard (e.g. %name)?
When capturing a window it would be replaced by the window name, when
capturing a website it would be replaced with the url and so on...

> Am I reading this correctly in that it is in a beta? 0.85? My life is
> looking pretty good.
>

No, it isn't yet. We've just released 0.80.1 and I'll start working on a
new version in the next days.

> Thanks for the great work (it is actually pretty readable code, too).

Thanks!

Revision history for this message
Brian C. Ladd (drbcladd) wrote : Re: [Bug 328663] Re: Give the screenshot title of window when capturing window only

I like having one multi-purpose wildcard. I am thinking about how helpful it
would be to have the whole URL in the file name, though. %title gives the
title (of the window or of the Web page?), %name gives the name of the
application or the URL. Not sure. My current needs are only for the title of
the window. I think I can hack it so that if I go through the window menu
(get_window_by_xid) I can capture the title and then hack a wildcard
replacement in. I have a bucket of screenshots to take for a book that is
due to the publishers in two weeks. I think I am avoiding rewriting by
working on this. Thus a quick fix should get me back to work. I hope.

Thanks for the response.

-bcl

On Sun, Aug 9, 2009 at 1:16 PM, Mario Kemper (Romario) <
<email address hidden>> wrote:

>
> > Given that wildcards are already the established way of naming files
> > (the idea of counters, date, etc), it would make sense to use wildcards
> > for file names.
> >
>
> What do you think about a multi-purpose wildcard (e.g. %name)?
> When capturing a window it would be replaced by the window name, when
> capturing a website it would be replaced with the url and so on...
>
> > Am I reading this correctly in that it is in a beta? 0.85? My life is
> > looking pretty good.
> >
>
> No, it isn't yet. We've just released 0.80.1 and I'll start working on a
> new version in the next days.
>
> > Thanks for the great work (it is actually pretty readable code, too).
>
> Thanks!
>
> --
> Give the screenshot title of window when capturing window only
> https://bugs.launchpad.net/bugs/328663
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Shutter - Screenshot Tool: Confirmed
>
> Bug description:
> Like gnome's screenshot tool, I think it would be nice to give the
> screenshot the name of the window when we're capturing the window only.
>

--
Dr. Brian C. Ladd
Assistant Professor of Computer Science
SUNY Potsdam
<email address hidden>

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote :

I don't know if you've already hacked on it, but I've committed some changes related to this bug to our experimental bzr branch:
https://code.launchpad.net/~mario-kemper/shutter/experimental

Maybe you want to have a look at it?

You can use the following command to get this branch (be sure to install bzr before doing this):
bzr branch lp:~mario-kemper/shutter/experimental

There will be a directory named 'experimental' after downloading and you should be able to run Shutter by simply calling the executable:
experimental/bin/shutter

The new wildcard is $name. It will work with window titles, urls and workspaces. Currently I don't know what to do with it when doing a selection.
You could set a filename like $name_%NNN in the preferences dialog to see how it works.

Of course all other readers are welcome to test this (and comment on it), as well!

Revision history for this message
Brian C. Ladd (drbcladd) wrote :

I will give it a try, maybe tonight (USA time). I have a brutal hack which
works for my purposes (!title gets replaced with the title; only works with
selecting the window from the window list, not if you click window and then
select). As I say, it works fine for me: save a bunch of screenshot!title
files, get out of shutter and copy them down to the Chapter art folders,
grey scale them and what not (I have scripts to always do it the same) and
build the book.

Thanks for the good work on Shutter. I really like using it and, as I said
before, the code is pretty good looking (I am a professor of computer
science so I read a lot of crappy code; heck, I worked in industry for a
while and read some really expensive, really crappy code).

--
Dr. Brian C. Ladd
Assistant Professor of Computer Science
SUNY Potsdam
<email address hidden>

Revision history for this message
Mario Kemper (Romario) (mario-kemper) wrote :

Thanks for the compliment.
I hope my professor is thinking the same after my next exam - I am a business informatics student ;-)

Changed in shutter:
status: Confirmed → Fix Committed
Changed in shutter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.