Give the screenshot title of window when capturing window only

Bug #328663 reported by Vadim Peretokin on 2009-02-12
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shutter
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.

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

Eh?

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

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.

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
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.

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

> 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!

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>

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!

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>

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  Edit
Everyone can see this information.

Other bug subscribers