KDE Developer
|
The following tutorial describes how to create your own comic plugin.
I hope they give enough information to be usefull for you. If you have some questions post them here. http://techbase.kde.org/Development/Tut ... omicPlugin
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Is there a qtscript function for padding numbers with some character? Particularly zero-padding to a certain number of digits (like turning 123 to 00123)? A lot of "number" type comics seem to use zero-padding in the file names so I would like to know if there is a simple way to do this.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
KDE Developer
|
I have to admit I'm not sure if there is a build in function, I doubt that though.
You can easily create your own function though, that you'd simply reuse in all the cases it is needed:
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
I found another way to do it. If you want to pad to four digits, use:
If you need another number of digits, use a list of zeros one less than the pad length and set the number in the slice part to be equal to the pad length.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
Registered Member
|
I am having another issue. The data engine is somehow figuring out what the next and previous comic page url should be based on some pattern, even though I am not explicitly defining it. The problem is that, for this particular comic, at a certain point the pattern the url follows changes. So when the data engine reaches that point it fails. So I need some way to get it to change the pattern it is using at that point (going in both directions). Any ideas? Basically the subdirectory the comic is stored in changes.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
KDE Developer
|
It only (in theory, maybe you found a bug) does that -- figuring out what prev and next are -- if you do not set these yourself.
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
How do you set the full previous and next url (or the previous and next subdirectory)? I can only see how to set the previous and next identifier, which won't help me because it is not the file name pattern that changes but the subdirectoy the files are stored in.
Last edited by TheBlackCat on Fri Mar 20, 2009 2:19 pm, edited 1 time in total.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
KDE Developer
|
Ah, now I understand. You can not set the url of the next/prev you can only set the identifier. Clicking next will make the next-identifier to the current identifier. You have to handle what url should be used manually. This might not be ideal, but it worked so far. What comic has this problem?
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
How do I handle what url should be used manually?
www.zebeth.com changes subdirectories between comic 999 and 1000.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
KDE Developer
|
I did not examine zebeth that closely, but something like the following should do it.
I did that "code" out of my head, so there might be some errors inside.
Last edited by mat69 on Sat Mar 21, 2009 8:10 pm, edited 1 time in total.
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Thanks, that seems to work. I tried doing something like that, but I put it in pageRetrieved and it caused an endless loop.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
Registered Member
|
Another question. In some of the source code of the comics I am getting things like "…". I assume this is some sort of formatting or special character. Is there a way to handle these properly?
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
KDE Developer
|
I'm not sure where that was used, but it appears to me like a proper use of an html entity that describes an UTF character in the source code.
mat69, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot]