#1 2012-02-01 22:47:49

Akovia
Member
Registered: 2012-01-30
Posts: 13

Dedicated Anime Module

Since anime spans many categories, none of the supplied templates really gets it done.

Movies, Series, Web, OVAs (Original Video Animation)

I have been attempting this over the last few days, but I'm afraid I'm just not code-centric enough to get it done properly. I've created a mock-up instead, in the hopes that someone might be interested in doing the actual coding. Right now I only have the General page finished, but the other tabs are already laid out as far as what fields and where.

http://gallery.eidolen.sent.com/public/anidb-gcstar_template.png

I'm not married to the design, but it was a starting point.


The thought behind the template is based on anidb.net, and how they handle the multiple categories, as well as the information available. One of the great feature of this site is the ability to export your online database in quite a few formats, including csv, xml, and html. I've already created a custom csv template with their supplied sdk and imported a sample of 48 anime successfully into a custom personal model, but I got stuck trying to create a pleasing layout. (Instead of just a row of fields) The one important field that can't be exported is the image for the anime. Unfortunately the existing plugin for anidb in gcstar only works on movies, and I'm not sure if it could be modified to be reused here.

I'm happy to do anything to get this done if I could get either some guidance or help.

Regards

Offline

 

#2 2012-02-08 16:27:35

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

I went ahead and tried to code this myself, but I'm stuck on a couple of errors that I can't seem to work out. The following error happens if I cancel creating a new collection when the program starts, and then try to add it through the menu. This doesn't crash the program, but the main window goes all white instead of the split screen you normally get with the tree on the left and the tabs on the right.

Code:

$ gcstar
*** unhandled exception in callback:
***   HASH(0xa9823c8) is not of type Gtk2::Widget at /usr/local/bin/../lib/gcstar/GCPanel.pm line 454.
***  ignoring at /usr/local/bin/gcstar line 328.

This error happens if I select my module immediately when the program opens. This also crashes the application.

Code:

$ gcstar
HASH(0xb367de8) is not of type Gtk2::Widget at /usr/local/bin/../lib/gcstar/GCPanel.pm line 454.
Magic number checking on storable file failed at /usr/local/lib/perl/5.10.1/Storable.pm line 397, at /usr/local/bin/../lib/gcstar/GCPlugins.pm line 98

I searched the forums and found references to similar problems on Linux Mint with a particular Gtk theme, but I'm on xubuntu 10.04. Other than my module, the program works fine so I'm sure it has something to do with my formatting of the xml, but I'm not sure how to troubleshoot it any further.

I really have searched hard and compared existing templates to try and figure things out on my own, but I'm still unsure about many things like,

styling rules (ie.. box, table, frame, margins, expand, etc..)
import field (used only with a plugin?)
purpose of collection perl module (GC%collectionname%.pm%)

If this information is out there somewhere I could probably figure this out myself. Could someone please push me in the right direction?

Offline

 

#3 2012-02-08 20:31:52

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

I found the offending typo and am now able to use my collection module.

Now I'm getting an error when I try to load a collection created with this module.

Code:

~/Settings & Backup/GCStar/gcanime_test.gcs

Cannot open items list. Format may be incorrect.

Model not found: GCnidb

User defined models are in: ~/.local/share/gcstar/GCModels/

I noticed that the letter "a" was missing in the Model not found: statement. The model is actually named GCanidb

After inspecting the saved file "gcanime_test.gcs", I noticed the the letter "a" is absent everywhere except in the synopsis field. I am completely baffled on how this could happen.

Here is a sample from cganime_test.gcs

Code:

<?xml version="1.0" encoding="UTF-8"?>
<collection type="GCnidb" items="1" version="1.6.2">
 <informtion>
  <mxId>1</mxId>
 </informtion>



 <item
  romnji="GCnime-Test"
  type=""
  yer=""
  knji=""
  eps=""
  specils=""

Please help

Edit:
It appears to save the gcs file properly, but upon closing gcstar and reopening with "Load previous collection on startup" enabled, it rewrites the gcs, removing the letter "a" and then presents the error I posted above. It scares me that it is rewriting the file before you even know there is an error.

Any thoughts?

Last edited by Akovia (2012-02-08 20:55:56)

Offline

 

#4 2012-02-11 01:27:44

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

Here is my mostly done anime template. There is no fetching plugin, but I incorporated the button for the future.

ToDo:
Filters
Read Only Section
Figure out why I can't reopen the saved gcs from this template.
General tweaking

Could someone please look it over and advise?


Attachments:
Attachment Icon GCanidb.gcm, Size: 14,709 bytes, Downloads: 342

Offline

 

#5 2012-02-11 01:29:29

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

..and the lang file


Attachments:
Attachment Icon GCanidb.pm, Size: 1,991 bytes, Downloads: 346

Offline

 

#6 2012-02-11 23:32:57

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

I'm not sure if I'm talking to myself or not, but I managed to figure out the problem with loading a saved file. I've also integrated two of the anime plugins (anidb, animenfo) into the module, but I'm only getting a couple of fields each. I doubt I'll get too much further with those as perl is a bit much for me to tackle, but I'll do what I can.

The whole idea of this project was to catalog my online anidb database which I've been adding to for years, and be able to have an offline database of that info. I have almost 800 separate entries and it just wouldn't be worth trying to enter them one at a time. On top of that, the supplied modules don't really lend themselves to anime.

AniDB offers a SDK
http://wiki.anidb.info/w/MyList_export_ … guidelines
to export your collection in a custom format, with an almost endless variety of data fields, in a few formats. (CSV, TXT, HTML, XML)
They also have a small library of export templates created by the community that are all ready to go if they include all the information you want to export.
http://wiki.anidb.info/w/MyList_export
I created one of my own that I haven't submitted to be approved yet, but it covers most of the information that I wanted, while being able to format in a way that GCstar could import. I chose the CSV format because I couldn't write an import plugin for a custom XML format. It's a shame that no real developers are interested in anime, as it seems that both GCstar and AniDB are both perl-xml based and could integrate in a better way.

They also provide and API for data gathering instead of scraping the website as they frown heavily on that and will actively thwart attempts at doing so. So a scraping plugin will only ever work long enough for them to figure out how to break it.

From a competing media managers forums:

*sigh* ok where to start... STOP RAPING OUR FREE SERVICE...

scraping webpages isn't nice you know. AniDB is a free service without any ads or spamware. nor do we take donations. we are a smallscale website with limited resources and we seriously do NOT approve of the webpages being scraped. that's silly, wrong and costs unnecessary resources. it's one thing to scrape services like imdb which got the money and power to not give a crap about a handful people scraping their service. it's different when you are constantly up your asses with load.

there is no point in what you are doing whatsoever especially since we DO provide APIs to retrieve data:

http://wiki.anidb.info/w/API

we do not appreciate this behaviour and seriously hope you reconsider your decisions. (read: fix your shit or i will make it my new hobby breaking your code daily several times)

der idiot
senior mod and main coder for AniDB

In any case, the best solution I came up with was to export my data from anidb with a custom csv template, and create a custom anime module for GCstar to accept that data. Then I could just manually add new entries as  I go. It could have been much more extensive and fine tuned with some help, but it should be usable for my purposes, as well as others if they want an anime dedicated collection.

I've still got some more tweaking I want to do, so I'll post what I have when it's finished.


Attachments:
Attachment Icon GCanime-screens.jpg, Size: 216,507 bytes, Downloads: 295

Offline

 

#7 2012-02-15 06:53:24

Tian
Administrator
From: France
Registered: 2006-12-08
Posts: 1647
Website

Re: Dedicated Anime Module

Hello,

First, you're not talking to yourself wink

I just wanted to take time to fully consider what you are doing before replying. Unfortunately I still wasn't able to do so. So I really hope someone else will have more time soon for this.

Anyway, thanks a lot for what you are doing. I'll try to help you as much as I can when time will permit.

Offline

 

#8 2012-02-15 16:27:40

Akovia
Member
Registered: 2012-01-30
Posts: 13

Re: Dedicated Anime Module

Thanks for the reply Titan.

I have been "learning" perl these last few days to the best of my abilities and have managed to fix most of the problems in the 2 plugins I'm using, as well as modify them for my module. Unfortunately I am now quite stuck on how to parse out a deeply nested value. Maybe someone here could point me in the right direction.

The structure is like this:
⊟<tr class="g_odd rating">
    ⊟<th class="field">
        ⊟<a href="animedb.pl?show=myvotes">Rating</a>
    ⊟<td class="value">
        ⊟<span class="rating anime mid">
            ⊟<a href="animedb.pl?show=votes&aid=6443">7.66</a>
            ⊟<span class="count">(878)</span>
        </span>
        (weighted)
    </td>
</tr>

I want both values for Rating for two separate gcm fields but can only get the rating itself. Not the count.

I understand how the rating is captured using {isField} and {inside}->{td}, but wonder how or why the second value inside the span is snipped and how to capture it to its own field. There are 3 instances where I want to do this which may affect how it done, but I'm about out of ideas.

Any guidance?

Offline

 

#9 2012-11-15 06:32:31

xiaofish
New member
Registered: 2012-10-22
Posts: 3

Re: Dedicated Anime Module

If you need Diablo 3 Gold, we would like to recommend you sign up VIP member in Diabloiiigold.com. Abundant benefits for VIP member can support you buy Diablo 3 Gold fast and easy.24 hours customer service are glad to help you anytime.

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.