bugMyPaint - Bugs: bug #18720, Better Save Scrap / version...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #18720: Better Save Scrap / version behaviour

Submitted by:  Martin Renold <martinxyz>
Submitted on:  Thu 22 Sep 2011 01:16:46 PM UTC  
 
Severity: 3 - NormalPriority: 5 - Normal
Status: WishPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: gitPlanned Release: None
Operating System: 

(Jump to the original submission Jump to the original submission)

Sun 29 Jun 2014 01:51:23 AM UTC, comment #15:

Hi folks - any more thoughts or code on this since the 1.0 release and March 2012? Attaching the general "please get this stale wish moving again (ideally on the mailing lists or github if you've got useful mockups or code)" canned response, but to my eyes the scrap switcher behaviour is fixed and we should close this one as Works For Me.

(This is a canned response, please forgive any broken formatting)

This bug tracker will shortly be moving to Github. As part of this process, we are reviewing old bug reports on gna.org.

This report appears to be a request for a new feature, but discussion has dried up and/or there are no patches or mockups attached. Please help us
to move it forward, which will ensure that it is retained during the migration.

While in the past our bug tracker here on Gna! has kept these stale feature requests around, in practice we have found that development moves too
fast for this to be a valid approach. Please consider that developers need working plans and agreement before we get stuff done.

With that in mind, if you're monitoring this report, here's what we need to be reassured that this request is still relevant:

  • If this request generated no responses, sorry.

But please treat that as a HUGE sign that
this tracker isn't receiving enough eyeballs
for your idea to have received the
discussion it needs.

There are discussion forums with greater reach:
Twitter: @MyPaintApp or #mypaint
Forums: http://forum.intilinux.com/#c9
Or even the mailing list at
https://mail.gna.org/listinfo/mypaint-discuss/

Please link to any ongoing discussions,
if you haven't already done so.

  • If you think this request is not stale, please

resubmit it on github itself,
at https://github.com/mypaint/mypaint/issues
Please do this only if you have mockups, use cases,
patches or sample code implementing the feature:
if you don't yet, then it needs more discussion.
The linked resources above are the place for that.

In short, please remember that a bug report is not a widely read discussion forum, and that feature requests must be moved forward. Kindly
remember too that our developers don't have the time to monitor all the forums all of the time.

Andrew Chadwick <achadwick>
Project Administrator
Sun 04 Mar 2012 08:46:49 AM UTC, comment #14:

Partial lexical sort should work, then. (and is probably more predictable than partial mtime sort)

David Gowers <ion9>
Project Member
Sun 04 Mar 2012 07:43:27 AM UTC, comment #13:

I'm still a big user of next/previous scrap myself. Not sure if I understood what you were suggesting, but it still has to skip older revisions of the same file, otherwise it becomes useless to me.

Martin Renold <martinxyz>
Project Administrator
Sun 04 Mar 2012 12:28:58 AM UTC, comment #12:

Yes, it does break next/previous scrap. IMO next/previous scrap should be based on a simple lexical sort, rather than the current relatively complex scheme -- that would make them quite robust. There's also the option of sorting by mtime, which I think also fulfills the intent well.

I'll have a go at making the changes you specified.

David Gowers <ion9>
Project Member
Sat 03 Mar 2012 04:39:12 PM UTC, comment #11:

I like either way (with or without strftime), I think as long as the most desirable format strings are given as examples, they can be used by non-techie users.

About the patches: Please make sure that the tooltip is translatable, and follow the style convention of the file (no space before parameter list).

A more problematic thing: what about "list_scraps()"? I think this feature breaks the "open next/previous" scrap from the file menu: scraps with a different date will not be accessible any more.

Also, I think the tooltip alone is not enough to make this feature discoverable. I think there should be some hint visible or an example to show that format strings are available. Format details can still be explained in the tooltip.

It's also not clear that a number will be appended (but this is already a problem right now). A "preview" label, displaying live the name of the next scrap, would be very cool :-)

Martin Renold <martinxyz>
Project Administrator
Tue 31 Jan 2012 06:08:41 AM UTC, comment #10:

strftime() based patch, without whitespace changes.
Quite simple.

BTW, the previous patch only used a single re.sub().. most of the code was about filling the dictionary. Using '%(name)s' is actually more complex -- to get comparable behaviour you'd have to subclass dict.

(file #14946)

David Gowers <ion9>
Project Member
Mon 30 Jan 2012 02:12:18 PM UTC, comment #9:

I discarded strftime as an option because it's not that readable, basically (and because I thought people would think 'wtf is that?' -- people who are not programmers know it???)

Although it's superior to %(name)s on account of being less redundant, IMO.

Well, I can implement strftime() based stuff too.

I left the whitespace changes in because they seemed to be fixes
(automatic substitutions tab->spaces, as my editor detected the main indent style to be space-based. Then my eye detected the same thing ;)

David Gowers <ion9>
Project Member
Mon 30 Jan 2012 01:38:16 PM UTC, comment #8:

David Gowers it's a good idea: could you reexpress your patch so it doesn't have as many no-change/whitespace changes?

Trying to think of ways which don't require lots of re.sub() stuff. Python 2.6 supports "%(key)s" % {"key": "value} notation, no need for str.format() (which is supported in 2.6.6 too, at least.

Raw datetime.datetime.strftime() format is common too, and has the advantage of being very well-known. Would that be sufficient?

Andrew Chadwick <achadwick>
Project Administrator
Mon 30 Jan 2012 04:07:07 AM UTC, comment #7:

I originally wrote a patch on David Revoy's behalf to implement timestamps in filenames. Since then, MyPaint updates broke it.

I've recently thought of a much simpler implementation which is more flexible; Have get_scrap_prefix expand {this_style} of format code (which is a tiny subset of Python 2.7/3.x's str.format(), implemented without a dependency on them.)

Patch attached -- try putting '{ymd}-' at the end of your scrap prefix, and then saving a scrap. There are many formats, most of which are named obviously (eg 'month', 'year', 'day','minute', 'dayname'..). All are zero-padded to suit their maximum possible value (eg. to 3 places for 'yearday', which can range 001-366)

For now I've implemented the info as a tooltip on the scrap prefix entry widget.

(file #14936)

David Gowers <ion9>
Project Member
Sun 13 Nov 2011 10:07:26 PM UTC, comment #6:

Thanks for the fix.

For the pattern GUI, I paste this as a reference :
http://img51.imageshack.us/img51/8114/20111113221830screensho.png
it's from a *.py nautilus script to rename batch files.
The field to enter name is simple and the button with '?' to got the pattern list is easy to use.

Maybe it can help to design it.

David REVOY <deevad>
Project Member
Sun 13 Nov 2011 09:12:11 PM UTC, comment #5:

I decided to just fixed the exception for the 1.0 release, it is now:

scrap076_y.ora
scrap076_z.ora
scrap077_a.ora
scrap077_b.ora

I realized that I like this scheme, I find scrap077_005.ora has too many numbers for my brain.

We really need a preference for the numbering style, as this seems to be a never-ending discussion. E.g. some users badly want a timestamp in the filename.

Martin Renold <martinxyz>
Project Administrator
Thu 22 Sep 2011 03:00:13 PM UTC, comment #4:

What about this:

Menu entry "Save Scrap" that will save "scrap001.ora" if the current filename was not a scrap filename already, or just do the same as Ctrl-S otherwise.

Menu entry "Save Versioned", which will just append/increment _001 to the filename if it isn't already there. If the filename is not set, it will automatically choose "scrap001_001.ora".

The first one is what David Gowers wanted, the second one what I want... do you think users will understand how it works?

Martin Renold <martinxyz>
Project Administrator
Thu 22 Sep 2011 02:33:39 PM UTC, comment #3:

"performing also a save incremental on file opened"

If my memory serves, this is what I have implemented at first, in the early releases of MyPaint, but users didn't like it. IIRC the argument was that it was unexpected when "Save Scrap" did not always save into the configured scrap directory (because the loaded file was from another directory). Maybe this needs to be communicated properly somehow, through clever nameing of the menu entries and label in the preferences...

I tried to run Krita with the "versions" feature but either I didn't get how to use it, or it was in this branch that I was unable to compile. Anyway, let's switch to numbers, I see no problem with this.

Martin Renold <martinxyz>
Project Administrator
Thu 22 Sep 2011 02:11:37 PM UTC, comment #2:

By the way, to fix the letter 'z' reaching issue, changing to a number system could fix the problem and be compatible with Krita 'save incremental' feature.

mydrawing_001.ora
mydrawing_002.ora
mydrawing_003.ora
etc...

myscrap001_001.ora
myscrap001_002.ora
myscrap001_003.ora
etc...

Maybe easier to read and to fix if mypaint can check '_' + '3xnumber' = a revision exist to check.

David REVOY <deevad>
Project Member
Thu 22 Sep 2011 02:05:58 PM UTC, comment #1:

For the error of reaching version 'z' , I propose :
mydrawing_a.ora
mydrawing_b.ora
(...)
mydrawing_x.ora
mydrawing_y.ora
mydrawing_z.ora
mydrawing_z_a.ora
mydrawing_z_b.ora
(...)
mydrawing_z_z_a.ora
(etc...)

For a new behavior of 'save as scrap' in general : performing also a save incremental on file opened. It would be a function renamed with another label , like 'speed save'.

  • 1st scenario exemple :

- I open 'mydrawing.ora' on my hardrive
- I paint, then press F2 ( save-as-scrap )
- Mypaint save it automagically to 'mydrawing_a.ora' on the same folder.

  • 2nd scenario exemple :

- I open 'mydrawing_g.ora' on my hardrive
- I paint, then press F2 ( save-as-scrap )
- Mypaint checks the files and know it already the revision 'g'
- Then save it automagically to 'mydrawing_h.ora' on the same folder.

  • 3rd scenario exemple :

- I paint from scratch at opening , then press F2 ( save-as-scrap )
- Mypaint save the painting into the predifined "save-as-scrap" folder in user preference.

  • 4th scenario exemple :

- I open 'myscrap-005_b.ora' on my scrap folder. ( using open next scrap / previous scrap / recent file ... or wathever )
- Mypaint checks the files and know it already the revision 'b'
- Then save it automagically to 'myscrap-005_c.ora' on the same folder , witch is the scrapfolder also in this case.

David REVOY <deevad>
Project Member
Thu 22 Sep 2011 01:16:46 PM UTC, original submission:

This bug is a split-off from Bug 18545. For previous discussion see https://gna.org/bugs/index.php?18545 and also this old mailinglist thread: https://mail.gna.org/public/mypaint-discuss/2010-12/msg00002.html ([Mypaint-discuss] Scrap saving system (SSS :) by David Gowers

The most obvious problem is that in current git, "save as scrap" fails with exception after reaching letter "z".

Martin Renold <martinxyz>
Project Administrator

 

Attached Files
file #14946:  0001-Format-scrap-prefix-with-strftime.patch added by ion9 (2kB - text/x-patch - Use strftime() to format scrap prefix)
file #14936:  0001-scrap-prefix-Substitute-values-for-date-formats-like.patch added by ion9 (8kB - text/x-patch - Implement date format {substitution} in get_scrap_prefix())

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by ion9 (Updated the item)
  • -unavailable- added by deevad (Posted a comment)
  • -unavailable- added by martinxyz (Submitted the item)
  • -unavailable- added by martinxyz
  • -unavailable- added by martinxyz
  • -unavailable- added by martinxyz
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Jan 2012 06:08:41 AM UTCion9Attached File-=>Added 0001-Format-scrap-prefix-with-strftime.patch, #14946
    Mon 30 Jan 2012 04:07:07 AM UTCion9Attached File-=>Added 0001-scrap-prefix-Substitute-values-for-date-formats-like.patch, #14936
    Sun 13 Nov 2011 09:15:01 PM UTCmartinxyzStatusConfirmed=>Wish
      SummarySave Scrap / version behaviour=>Better Save Scrap / version behaviour
    Thu 22 Sep 2011 01:16:46 PM UTCmartinxyzCarbon-Copy-=>Added ion9
      Carbon-Copy-=>Added deevad
      Carbon-Copy-=>Added achadwick
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup