Recalculate word co...
 
Notifications
Clear all

Recalculate word counts

12 Posts
5 Users
0 Reactions
1,864 Views
(@lyndsie)
Posts: 1263
Member Moderator
Topic starter
 

Does anyone know a way to do this? None of the tools in Archive Maintenance seem to do the trick.  Here's some examples of wildly off ones.

http://www.dracoandginny.com/viewstory.php?sid=4188 Says over 17,000 for story word count, the chapter word count is 4000 (only one chapter).
http://www.dracoandginny.com/viewstory.php?sid=4056 Only reflects the wordcount of the first chapter.

Obviously I can edit these myself, but there are close to 2000 stories on the site and going through them all is not something I want to do.


 
Posted : 22/07/2009 8:42 pm
(@hobert)
Posts: 61
Trusted Member
 

Have you tried opening the chapter to edit it and resave it?  I think it may recount the words at that time.


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 24/07/2009 12:04 pm
(@lyndsie)
Posts: 1263
Member Moderator
Topic starter
 

I guess I'll try that. It's that the chapter word counts are right, but the total story wordcount is the one that's off.

ETA: Well, it worked to edit the chapters. (Or just one chapter, in the case of multi-chapter fics.) But, while it's nice to have them fixed, I think it would be even nicer to have a recalculation tool for this. I could have just as easily changed the number in the database. My real problem is that I don't know how many more erroneous story counts there are, with close to 2000 stories. It would be sweet to be able to run something to fix them all at once.


 
Posted : 24/07/2009 3:17 pm
(@tammy)
Posts: 2577
Member Moderator
 

You can probably run a query by previewing a custom page.  I'll see if I can write one.


 
Posted : 28/07/2009 6:50 pm
(@lyndsie)
Posts: 1263
Member Moderator
Topic starter
 

Cool, thanks. : )


 
Posted : 28/07/2009 7:02 pm
(@tammy)
Posts: 2577
Member Moderator
 

Eh.  I figured others might need it as well so I updated the Archive Maintenance instead.  The new one is in the SVN.  Clicking  on Recalculate Stories will update the word count in that version as well.


 
Posted : 29/07/2009 7:27 pm
(@lyndsie)
Posts: 1263
Member Moderator
Topic starter
 

Cool. I ran it. Can't tell if it worked since I didn't know of any more stories with their total word counts off, but I'll assume it did. : )

Something small that I've noticed for a while but keep forgetting about is that the descriptions from the question mark hovers are off for the first two recalculation tools. They're switched.

Here:


<li><a href="'admin.php?action=maintenance&amp;maint=reviews'>"._RECALCREVIEWS."</a>" <A HREF=""#"" class="pophelp">[?]<span>"._HELP_RECALCSTORIES."</span></A></li>
<li><a href="'admin.php?action=maintenance&amp;maint=stories'>"._RECALCSTORIES."</a>" <A HREF=""#"" class="pophelp">[?]<span>"._HELP_RECALCREVIEWS."</span></A></li>

I assume it should be:


<li><a href="'admin.php?action=maintenance&amp;maint=reviews'>"._RECALCREVIEWS."</a>" <A HREF=""#"" class="pophelp">[?]<span>"._HELP_RECALCREVIEWS."</span></A></li>
<li><a href="'admin.php?action=maintenance&amp;maint=stories'>"._RECALCSTORIES."</a>" <A HREF=""#"" class="pophelp">[?]<span>"._HELP_RECALCSTORIES."</span></A></li>

 
Posted : 29/07/2009 8:38 pm
(@aquaanimus)
Posts: 82
Trusted Member
 

Would I get this update by running "update" in the archive maintenance?


"Quoth the raven, `Nevermore.'"  - EAP

 
Posted : 02/08/2009 12:36 am
(@lyndsie)
Posts: 1263
Member Moderator
Topic starter
 

No, you have to go to the SVN and download the new file, and replace your old one. Then you go to Admin > Archive Maintenance and run the Recalculate Stories. It's here: http://efiction.svn.sourceforge.net/viewvc/efiction?view=rev&revision=23


 
Posted : 02/08/2009 2:05 am
(@aquaanimus)
Posts: 82
Trusted Member
 

Thank you : )

Does SVN mean software version?  I have always wondered that.


"Quoth the raven, `Nevermore.'"  - EAP

 
Posted : 02/08/2009 10:28 am
(@becca)
Posts: 553
Honorable Member
 

http://en.wikipedia.org/wiki/Svn_(software)


 
Posted : 02/08/2009 11:36 am
(@aquaanimus)
Posts: 82
Trusted Member
 

http://en.wikipedia.org/wiki/Svn_(software)

ahh subversion. I was close. : )  Thanks for the link!


"Quoth the raven, `Nevermore.'"  - EAP

 
Posted : 03/08/2009 9:39 pm
Share: