Welcome, Guest
Python Scripts for ComicRack

TOPIC: [Script] First X in each Y - Smartlist Script (Ver 0.5 Beta)

[Script] First X in each Y - Smartlist Script (Ver 0.5 Beta) 3 months 1 day ago #48300

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 483
  • Thank you received: 122
  • Karma: 26
I was totally sure I have uploaded this script to the forum, but as I haven't find it anywhere I will create a new topic (if I have post it before, please tell me)

This script is another script I made some time ago to deal with comics inside stacks or groups (the other one being the new "Expand by" script I recently posted)

This one is more centered in quantities and sorting.

The idea of this script are for this kind of situations:

Example1: I want the last comic of each Volume
Example2: I want the first 2 comics of the year
Example3: I want tto now the last number of many Series
Example4: I want to know which series has more than 10 comics

For this I created this tool.

What it does is simple, it first group comics by Y attribute/s (all comics that, for example Series and Volume are the same)
Once the groups are made, they are ordered by X attribute/s (for example by number)
Finally it count the first or last n comics of each group, according to the sorting

For example: "First Number in each Series"

How to use the script:

In X put the attribute or attributes by which you want to order them (number, title, date, etc)
- You can use "|" for more than one criteria, for example Year!Month will sort first by Year, and inside each Year by month
- You can put "-" right before the name of the attribute for inverse sorting, turning First comcs into Last comics
- You can put "+" symbols before the attribute to add one comic more (first is default , ++ is first 2, +++ is first 3, etc)
- You can put "." symbols before the attribute to add an ignore comic to the added ones (+.+ is for example the first and third, not the second)
- You can combine the above attributes in any order you want, but "+" s and "."s are before the "-"

In Y put the attribute or attributes by which you want to separate the comics (Series, Volume, Year, etc)
- You can use "|" for more than one criteria (for example for volumes of a series use Series|Volume)
- You can use "!" before the attribute to make the comparision made into "similar" instead of "equal"


1- You want first number of each volumes

X = Number
Y = Series|Volume

2- You want last published comic of each series

X= -Year|Month|Day
Y= Series

3- You want first two numbers of each year

X= ++Number
Y= Year

4- You want first and third number of each Series Group in each Imprint

X= +.+Number
Y= SeriesGroup|Imprint

5- You want the last and the 2 number before that of each comic with similar Imprint (ignore Capitals for example)

X= +.+-Number
Y= !Imprint

6- You want to know which Volumes reaches 10 comics

X= .........+Number
Y= Series|Volume

note: You can then use "Expand by" script to show complete volumes instead of only the tenth comic

and you get the idea XD

V0.5 Beta

File Attachment:

File Name: FirstXinea...crplugin
File Size:3 KB


0.1 First version, it seems to work :)
0.2 A lot of changes of how the script works, fixed cases in which X and Y are empty, added up to 4 posible ordering values, added Number as default secondary Xs, now you can add +s with no X, many bugs fixed, performance improved
0.3 Added "-" symbol for changing from "first" values to "last" values and virtually infinite posible ordering values
0.4 Fixed order in values starting with numbers
0.5 Added "." symbol to "jump" values
Last Edit: 3 months 1 day ago by Xelloss.
The administrator has disabled public write access.
Time to create page: 0.137 seconds

Who's Online

We have 335 guests and 2 members online