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)
|
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.
|
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.
|
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 :-)
|
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)
|
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 ;)
|
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?
|
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)
|
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.
|
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.
|
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?
|
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.
|
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.
|
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'.
- 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.
- 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.
- 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.
- 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.
|
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".
|