Welcome, Guest
Python Scripts for ComicRack

TOPIC: Changing Format of Column: 'Published'

Changing Format of Column: 'Published' 11 months 3 weeks ago #46368

  • Comickon
  • Comickon's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 2
  • Karma: 0
I often have, with larger series or collections, my comics arranged by the date they are been published.

The format of this column is now for example: month/year or 9/2012
I would prefer to have it like: year-month or 2012-09
With the month always having the notation with 2 digits.

Is this change of format somewhere available in a script?

Thanks in advance
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46390

  • boshuda
  • boshuda's Avatar
  • Online
  • Gold Boarder
  • Posts: 281
  • Thank you received: 63
  • Karma: 7
Comickon wrote:
I often have, with larger series or collections, my comics arranged by the date they are been published.

The format of this column is now for example: month/year or 9/2012
I would prefer to have it like: year-month or 2012-09
With the month always having the notation with 2 digits.

Is this change of format somewhere available in a script?

Thanks in advance
You could make a script, or maybe even use the Data Manager to add this to a custom field. Then you could sort on that custom field. I'm not positive it would pad the zeroes, but I think it would.

I used Data Manager to create a custom field, but all I could get it to do was put it into YYYYm format. Adding the dash broke it, and I couldn't figure out a format to pad the zeroes.
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46391

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 356
  • Thank you received: 95
  • Karma: 20
Can't you use regular expresions for that?
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46392

  • boshuda
  • boshuda's Avatar
  • Online
  • Gold Boarder
  • Posts: 281
  • Thank you received: 63
  • Karma: 7
Xelloss wrote:
Can't you use regular expresions for that?
Can you use regex in Data Manager? I don't really use it for much. I tend to write scripts to handle things.
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46393

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 356
  • Thank you received: 95
  • Karma: 20
I think I read in some topic that you can. I haven't done it though...
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46394

  • boshuda
  • boshuda's Avatar
  • Online
  • Gold Boarder
  • Posts: 281
  • Thank you received: 63
  • Karma: 7
Xelloss wrote:
I think I read in some topic that you can. I haven't done it though...
Yeah, I took a quick stab at it. RegEx replace is supported, but not in this way. RegEx isn't allowed on custom fields. Maybe a chained change as I think about it. First, create the custom field, then find non-empty custom fields and regex replace them. That might work.
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46395

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 356
  • Thank you received: 95
  • Karma: 20
boshuda wrote:
Xelloss wrote:
I think I read in some topic that you can. I haven't done it though...
Yeah, I took a quick stab at it. RegEx replace is supported, but not in this way. RegEx isn't allowed on custom fields. Maybe a chained change as I think about it. First, create the custom field, then find non-empty custom fields and regex replace them. That might work.

Don't you mean empty non custom fields? XD
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46396

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 356
  • Thank you received: 95
  • Karma: 20
All the same I think I don't understand exactly what the original question was about. Or, more precisely, why to change the way date is shown...

If it is because of a filename thing (which would make sense as why to want it in the other order, and why to want 0 in months for correct sorting), then you could change how date is written in the filename by tweaking the filerenaming script... and not to change it in comicrack.

If it is about date sorting inside comicrack, just sort by date and it works perfectly

If it is just a cosmetic thing inside comicrack, I think creating custom values as you say is the only way

Perhaps I am misunderstanding the question...
Last Edit: 11 months 3 weeks ago by Xelloss.
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46405

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
Xelloss wrote:
All the same I think I don't understand exactly what the original question was about. Or, more precisely, why to change the way date is shown...

If it is because of a filename thing (which would make sense as why to want it in the other order, and why to want 0 in months for correct sorting), then you could change how date is written in the filename by tweaking the filerenaming script... and not to change it in comicrack.

If it is about date sorting inside comicrack, just sort by date and it works perfectly

If it is just a cosmetic thing inside comicrack, I think creating custom values as you say is the only way

Perhaps I am misunderstanding the question...

Probably because lots of countries have date formats that are different and it can get confusing. 12/1/2001 is the twelfth of January to me on first glance but it may not be. Its very annoying sometimes when you are trying to work something out and you go date blind.
The administrator has disabled public write access.

Changing Format of Column: 'Published' 11 months 3 weeks ago #46407

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 356
  • Thank you received: 95
  • Karma: 20
I can understand that (for me it is also the 12 of January XD), but with month and year... you can't read it wrong... 12-2016 and 2016-12... I don't even think there is an standard for that :P

I took it more to the "alphabetical correct order" thing, specially when he specially want month with 0 pad...
The administrator has disabled public write access.
Time to create page: 0.194 seconds

Who's Online

We have 285 guests and 7 members online