Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-21-2020, 05:12 PM   #466
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

@kcar181 - Please read Guideline #3

I deleted your necro post in the Development forum

BR
BetterRed is offline   Reply With Quote
Old 07-21-2020, 05:36 PM   #467
kcar181
Member
kcar181 began at the beginning.
 
kcar181's Avatar
 
Posts: 15
Karma: 10
Join Date: Jul 2020
Device: none
Sorry I posted in the wrong thread. Thanks for your patience
kcar181 is offline   Reply With Quote
Advert
Old 07-22-2020, 01:36 AM   #468
Floating Quietly
Member
Floating Quietly began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2020
Device: Kobo Forma
A huge thank you to CapInk for updating the plugin.

There is an issue I was hoping someone could help me with.

I want to import from a CSV where I have a column that tracks the date that I added the particular book. I wanted to save that date to the "Date" built-in column in Calibre. But when I select "Fields.." in Step 1 I don't see a choice for Date or anything that looks like it. Any hints on how to deal with this?

Thanks!
Floating Quietly is offline   Reply With Quote
Old 07-22-2020, 01:43 AM   #469
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kcar181 View Post
Hi guys Im trying to figure out a custom webpage

http://www.worldswithoutend.com

I figured some of it out but ive never used xpath before. Titles are fine but all the authors are adding combined. "Bob & Sue & Lee" instead of:
Bob
Sue
Lee



//*[@id="reportlist"]
.//p[@class="title"]/a/text()
.//p[@class="author"]/a/text()

This is what im using for page:
https://www.worldswithoutend.com/lists_banned_sff.asp
The problem is the XPath for the row. What you have identifies the full list. What you need is to identify each book in the list. If you look at the source for the list, each book looks like:

Code:
<div class="awardslisting">
  <div class="gallery">
    
	<a href="novel.asp?id=698" class="trophy trophy2" onMouseOver="return overlib('Total Award Nominations: 2', WIDTH, '200', RIGHT)" onMouseOut="nd();"></a>
	
	<a href="novel.asp?id=698" class="trophyx trophyx1" onMouseOver="return overlib('Total Book List Inclusions: 1', WIDTH, '200', RIGHT)" onMouseOut="nd();"></a>
	
    <a href="novel.asp?ID=698"><img src="covers_md/pp_theamber.jpg" border="0" alt="The Amber Spyglass" /><!-- If winner then <span class="gold"></span> else if nom then <span class="silver"></span> end if --></a>
    
  </div>
  <p class="title"><a href="novel.asp?ID=698">THE AMBER SPYGLASS</a></p>
  <p class="author"><a href="author.asp?ID=694">Philip Pullman</a></p>
</div>
Each book is within the div with class "awardslisting". So, the following should work:
Code:
//div[@class="awardslisting"]
Your XPaths for the title and author are correct.
davidfor is offline   Reply With Quote
Old 07-22-2020, 05:16 AM   #470
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Floating Quietly View Post
A huge thank you to CapInk for updating the plugin.

There is an issue I was hoping someone could help me with.

I want to import from a CSV where I have a column that tracks the date that I added the particular book. I wanted to save that date to the "Date" built-in column in Calibre. But when I select "Fields.." in Step 1 I don't see a choice for Date or anything that looks like it. Any hints on how to deal with this?

Thanks!
I don't know why this was not included in the plugin from the start. Maybe there is a good reason! If anyone know of a good reason not to include it please explain.
capink is offline   Reply With Quote
Advert
Old 07-22-2020, 06:32 AM   #471
Bookstooge
Member Retired
Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.Bookstooge ought to be getting tired of karma fortunes by now.
 
Posts: 805
Karma: 2091358
Join Date: May 2019
Device: Kindle Oasis 1st Gen, PB Era
when I added my Librarything catalog csv file to calibre a couple of years ago using this plugin, I was able to include the date I read the book. So dates are possible. Sorry I can't be more specific.
Bookstooge is offline   Reply With Quote
Old 07-22-2020, 08:43 AM   #472
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Dates are possible. You can add custom column dates in addition to the standard pubdate. What is not included is the standard date (timestamps) column.
capink is offline   Reply With Quote
Old 07-22-2020, 08:52 AM   #473
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by capink View Post
I don't know why this was not included in the plugin from the start. Maybe there is a good reason! If anyone know of a good reason not to include it please explain.
The "Date" column is usually maintained by calibre. It is set to the current timestamp when a book is added to the library. While it is editable, my guess is that kiwidude didn't think it was a column that should be updated.
davidfor is offline   Reply With Quote
Old 07-22-2020, 10:25 AM   #474
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by davidfor View Post
The "Date" column is usually maintained by calibre. It is set to the current timestamp when a book is added to the library. While it is editable, my guess is that kiwidude didn't think it was a column that should be updated.
↑ ↑ ↑ ✔

{Date} has a purpose as David noted, and I belong to the school of 'leave the purpose intact'.
I know many others reuse columns for their own tasks, but we have the option to add our own and not mess with the data.

"When did I add this to Calibre? Oh! #$%, I reused the {Date} for last xyz"

Numbers, Dates, Logical (T/F) add a small bit of DB size, (unlike some of the others.) and take almost no performance hit (unlike calculated from other fields). So that should not be a major issue deterring making your own Date
and it avoids 2 different PI re-purposing (then later come here asking WHAT is messing with my last_read date.
theducks is offline   Reply With Quote
Old 07-22-2020, 11:02 AM   #475
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by davidfor View Post
The "Date" column is usually maintained by calibre. It is set to the current timestamp when a book is added to the library. While it is editable, my guess is that kiwidude didn't think it was a column that should be updated.
Quote:
Originally Posted by theducks View Post
↑ ↑ ↑ ✔

{Date} has a purpose as David noted, and I belong to the school of 'leave the purpose intact'.
I know many others reuse columns for their own tasks, but we have the option to add our own and not mess with the data.

"When did I add this to Calibre? Oh! #$%, I reused the {Date} for last xyz"

Numbers, Dates, Logical (T/F) add a small bit of DB size, (unlike some of the others.) and take almost no performance hit (unlike calculated from other fields). So that should not be a major issue deterring making your own Date
and it avoids 2 different PI re-purposing (then later come here asking WHAT is messing with my last_read date.
Thanks for the feedback. It should be kept as it is and users should use custom date columns instead.
capink is offline   Reply With Quote
Old 07-22-2020, 11:04 AM   #476
Floating Quietly
Member
Floating Quietly began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2020
Device: Kobo Forma
Quote:
Originally Posted by theducks View Post
↑ ↑ ↑ ✔

{Date} has a purpose as David noted, and I belong to the school of 'leave the purpose intact'.
I know many others reuse columns for their own tasks, but we have the option to add our own and not mess with the data.

"When did I add this to Calibre? Oh! #$%, I reused the {Date} for last xyz"

Numbers, Dates, Logical (T/F) add a small bit of DB size, (unlike some of the others.) and take almost no performance hit (unlike calculated from other fields). So that should not be a major issue deterring making your own Date
and it avoids 2 different PI re-purposing (then later come here asking WHAT is messing with my last_read date.
It's a fair point. But I'm curious how you think about my situation.

I used a different program that had a date field with the identical semantics of Calibre. The date field represented when the record was created in that program.

I exported that program's information to a CSV and now want to import it to Calibre.

I'd like to exactly re-hydrate the information from the other program in Calibre so that I can order by the Date column and know it represents when I added the content (which is not the same as when I read the content, in many cases that was months before the add date).

How would you suggest I create that experience in Calibre? And ideally how can I create it without having to constantly type dates in an extra field for every new book I add forever. That is just going to be really annoying. Especially when I forget to do it and a book gets "lost". So now I have to go write some kind of logic to detect missing dates and fix them.

Thoughts?
Floating Quietly is offline   Reply With Quote
Old 07-22-2020, 11:36 AM   #477
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Sorry if I am missing something, but why not just create a custom date column, import the data into it, and use the custom date column to sort your columns?

Edit: And by the way, timestamp column is absent from bulk metadata tool, which reinforces the idea it should not be used.

You can bulk read the data from the timestamp using templates in case you want to migrate the data to another column.

Last edited by capink; 07-22-2020 at 11:41 AM. Reason: adding note about timestamp bulk edit
capink is offline   Reply With Quote
Old 07-22-2020, 12:08 PM   #478
Floating Quietly
Member
Floating Quietly began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2020
Device: Kobo Forma
Quote:
Originally Posted by capink View Post
Sorry if I am missing something, but why not just create a custom date column, import the data into it, and use the custom date column to sort your columns?

Edit: And by the way, timestamp column is absent from bulk metadata tool, which reinforces the idea it should not be used.

You can bulk read the data from the timestamp using templates in case you want to migrate the data to another column.

If I create my own field then every time I add a book from now until the end of time I have to remember to manually enter that date. That is really annoying. If I could just set the current date column during this one time import then the whole problem disappears and moving forward I don't have to do anything special or different since the existing date column has exactly the semantics I want.
Floating Quietly is offline   Reply With Quote
Old 07-22-2020, 01:01 PM   #479
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Create a composite column with the following template:

Code:
{#custom_date:'ifempty($, field('timestamp'))'}
replace #custom_date with the name of your custom column. And choose sort column by date. This column will show the value of the #custom_date and if not found will substitute it with timestamp.
capink is offline   Reply With Quote
Old 07-22-2020, 02:35 PM   #480
kcar181
Member
kcar181 began at the beginning.
 
kcar181's Avatar
 
Posts: 15
Karma: 10
Join Date: Jul 2020
Device: none
Quote:
Originally Posted by davidfor View Post
The problem is the XPath for the row. What you have identifies the full list. What you need is to identify each book in the list.

Code:
//div[@class="awardslisting"]
Your XPaths for the title and author are correct.

Thanks my friend it works perfectly now. Thanks for taking the time to look at it. I'll add that to my budding xpath knowledge. Would there be an easy fix for changing "TITLES" of the books to "Titles" (lower case)?
kcar181 is offline   Reply With Quote
Reply

Tags
column types


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Reading List kiwidude Plugins 1423 06-22-2025 01:03 PM
[GUI Plugin] Manage Sony x50 Reader Book List kpw Plugins 170 10-02-2014 08:23 PM
Import List plugin idea thread kiwidude Development 45 08-13-2012 06:05 AM
[GUI Plugin] WebOS Kindle-Import CranstD Plugins 0 01-24-2012 03:36 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:55 PM.


MobileRead.com is a privately owned, operated and funded community.