Author Topic: Can user-defined star ratings be exported?  (Read 8440 times)

0 Members and 1 Guest are viewing this topic.

Offline Roy22

  • User
  • ***
  • Posts: 34
    • View Profile
Can user-defined star ratings be exported?
« on: May 08, 2011, 01:04:16 pm »
Is there a way to export the user defined star rating alongside other data?  I know that I can filter the database view down by star rating, one rating at a time, and then export each sub view, but is there a way to create a single export with, say, filename, file size & user star rating?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #1 on: May 09, 2011, 06:36:16 am »
You can export anything by configuring the template used by the Plain Text Export plugin. You could do this with a CSV template, for example...

Code: [Select]
%OPTIONS%
encoding="UTF8BOM"
replace=";<->,"
replace=""<->"
replace="#13#10<-> "
replace="#13<-> "
replace="#10<-> "
filter="CSV Files|*.csv"
%OPTIONS%
%HEAD%Filepath;Size;Rating;
%HEAD%{%value=path};{%value=size};{%value=rating}

Offline Roy22

  • User
  • ***
  • Posts: 34
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #2 on: June 12, 2011, 04:44:32 pm »
rick,

Belated thanks for your reply.  I've been playing around with options similar to what you suggest, but one small problem is driving me mad.

How do you ensure the exported test is treated as one movie line per line of Excel? I tried removing the #13#10 replace in the example, and with adding/removing the semicolon on the end of the last line, but Excel keeps treating it as one long series of fields, not a new movie per line, and complaining about the size.  I know this must be simple, please enlighten me?

Cheers,

Roy22

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #3 on: June 12, 2011, 05:49:09 pm »
Open the file with Excel's Text import wizard.

Offline Roy22

  • User
  • ***
  • Posts: 34
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #4 on: June 12, 2011, 06:01:07 pm »
I've played around with the Text Importer quite a lot already.  It makes sense to say it's delimited with semi colons, which it takes fine.  It just doesn't seem to react to 'new line', making all the exports tab endlessly across row one.  Does your export plugin place any kind of 'end of line' characters after each movie row exported?

Roy22

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #5 on: June 12, 2011, 10:03:29 pm »
Add a carriage return at the end of the template file.

Offline Roy22

  • User
  • ***
  • Posts: 34
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #6 on: June 12, 2011, 11:13:29 pm »
Yes, but how?  Wasn't sure how Asci 13 was specified?

Roy22

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #7 on: June 13, 2011, 12:09:51 am »
Place the cursor at the end of the last line, and press <Enter>. ;)

Offline Roy22

  • User
  • ***
  • Posts: 34
    • View Profile
Re: Can user-defined star ratings be exported?
« Reply #8 on: June 13, 2011, 06:21:53 pm »
Quote
Place the cursor at the end of the last line, and press <Enter>

Oh, how 1980s. Stupidly, I thought Enter would just bring me onto another line in the template editor, 'cos if it's inserting a control character (aka Enter) then it's not otherwise visible.  But yes, it certainly works and it explains some haphazard behaviour whilst I played with templates.

Cheers,

Roy22