Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-21-2016, 05:16 PM   #16
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
More images of "comments that are plain text".


DaltonST
Attached Thumbnails
Click image for larger version

Name:	comments_bulk_edit_metadata_is_plain_text_only.png
Views:	83
Size:	77.0 KB
ID:	150382   Click image for larger version

Name:	comments_preferences_add_your_own_columns.png
Views:	85
Size:	80.2 KB
ID:	150383   Click image for larger version

Name:	comments_is_plain_text_search_and_replace.png
Views:	88
Size:	50.0 KB
ID:	150384  

Last edited by DaltonST; 07-21-2016 at 11:29 PM.
DaltonST is offline   Reply With Quote
Old 07-21-2016, 06:11 PM   #17
BetterRed
null operator
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: 13,289
Karma: 10793754
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Note: this message composed before post #16 was posted

@DaltonST - Suggestion - add another check box modifier "Multiline?"

If unchecked It would be entered/edited via a regular text box either in the MDE or the book list, and it would be capable of being explicitly 'positioned' in Book Details - e.g. if was Subtitle one would probably position it immediately after Title.

If it was checked it would require a simple multi line text editor, Qt surely has one.

I appreciate this somewhat beyond the scope of what you're actually doing: adding a label to long text columns. So, "That's beyond the scope of what I'm trying to do" would be an understandable response

For me, it is essential I can to continue enter/edit data into 'long text' columns from the book list by pressing F2 and using the free standing 'Comments' Editor. I only mention it because I know my usage pattern, which includes avoiding the single MDE dialogue like the plague, deviates from the norm.

In Book Details I would not like to see the content of long text columns aligned according to the length of the longest label, as happens, quite properly, with other column types. Actually, I would rather see the label shown on a separate line, e.g. Label: and the text shown full width as it is now.

In Book Details, will you address the issue that the content of a custom long text column is not demarcated from the regular Comments text. I overcome this by having a separator line at the bottom of my custom long text column template.

You ask - Why would you ever not use a label? In my case probably because I have 47,363 books that have existing quasi-labels as previously described in post #9, and that I'm habituated to pasting a template either from my snippets manager or from Evernote

BR

Last edited by BetterRed; 07-21-2016 at 08:05 PM.
BetterRed is offline   Reply With Quote
Advert
Old 07-21-2016, 06:19 PM   #18
BetterRed
null operator
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: 13,289
Karma: 10793754
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DaltonST View Post
More images of "comments that are plain text".
Can you post an image of the columns being edited in the book list via F2

I note my prior assumption that this would replace the existing long text column type is wrong - sort of
BetterRed is offline   Reply With Quote
Old 07-21-2016, 06:36 PM   #19
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
BR:

It does exactly what I wanted with a new datatype plus what the poster of this thread requested.

If the comments are plain text, they will only wrap in the book details if they are really long. If they are short, like a Tag is, they would not wrap in the book details. They are not long text. They are whatever is entered by the user. Never html. The name of the datatype comments shown in preferences no longer says long text, but general text. Not long. Not short. Up to the user. Html or plain. Up to the user. With labels or without. Up to the user.

The editor is always a single line for plain text. Bulk or single. See the images.

Html uses the legacy html editor widget. Single only. Not bulk.

Multiline only exists for html. If you want long multiline html text with no labels and a multiline editor, do not use plain text. If you want short plain text with labels, easy. Its editor is single line only, but that single line can be as long as the user wishes.

I think you misunderstand what it is and what it does. People will be confused by your comments because they are wrong.

DaltonST

Last edited by DaltonST; 07-21-2016 at 06:44 PM. Reason: typos on my phone...
DaltonST is offline   Reply With Quote
Old 07-21-2016, 06:39 PM   #20
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
If you are referring to a single metadata edit dialog, I posted one this morning.
DaltonST is offline   Reply With Quote
Advert
Old 07-21-2016, 07:43 PM   #21
BetterRed
null operator
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: 13,289
Karma: 10793754
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Sorry I didn't notice PT1 and PT2 under your Legacy Comments.

As I already wrote I do not use Single MDE - I edit in the Book List

I use existing long text column type as a place to store links and images, which need html, so they will stay as is. I also use it to store multi-line lists where each line ends up as a <div>, editing those in a one line text box isn't viable, and I want to see the list displayed as separate lines, so they will have to stay as is.

Below are a screen shots of editing Title, Strapline, and Notes column in the Book List.

It looks like I'll be able to have Strapline behave the same as Title (no dropdown, no unhelpful suggests), after I move existing data with bulk S&R.

I've edited my prior post to reflect what I can see your extra screen shots.

BR
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	89
Size:	7.4 KB
ID:	150387   Click image for larger version

Name:	2.jpg
Views:	78
Size:	8.2 KB
ID:	150389   Click image for larger version

Name:	3.JPG
Views:	90
Size:	21.9 KB
ID:	150391  

Last edited by BetterRed; 07-21-2016 at 07:55 PM.
BetterRed is offline   Reply With Quote
Old 07-22-2016, 05:01 AM   #22
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,945
Karma: 2737706
Join Date: Jan 2010
Location: UK
Device: Many android devices
In the thread in development forum I suggested using two properties in order to separate the content type from the presentation. One property would control whether the item was labeled or not, and the other would control what is stored in the column. In that thread I suggested using booleans.

This scheme has the advantage that it covers four of the needs that (I think) BetterRed expressed in his posts:
  • Labeled HTML: usable for short fields that contain links and the like
  • Unlabeled HTML: what we have today
  • Labeled plain text: what DaltonST and others want.
  • Unlabeled plain text: I think that BetterRed is asking for this. Its main use would be long plain-text commentary or formatted data such as json.
However, after thinking BetterRed's comments it occurs to me that the content type should be a string, not a boolean. That would permit future developers to add specialized data. To avoid breaking internal and external clients the rule would be that the data must be stored as text, base64 if the data is binary. Clients would display the base64 data (or nothing) if they are not prepared to handle the content type.

The content types I see as most useful would be html (the default), txt, binary, png, and jpg.

Also potentially useful would be an "owner" property that would indicate what component is permitted to edit the field. This could prevent someone from changing a field in such a way as to break the plugin (or whatever) that depends upon the value. This would be a "social agreement" unlike the editable base custom column property, making it easier to use the data in GUI plugins.
chaley is offline   Reply With Quote
Old 07-22-2016, 05:43 AM   #23
BetterRed
null operator
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: 13,289
Karma: 10793754
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
  • Labeled HTML: usable for short fields that contain links and the like
    Yes that would be handy, the Arbitrary Identifier solution has fixed names, and they get mixed in with other identifiers
  • Unlabeled HTML: what we have today
  • Labeled plain text: what DaltonST and others want.
    Me too, for my Strapline column etc.
  • Unlabeled plain text: I think that BetterRed is asking for this. Its main use would be long plain-text commentary or formatted data such as json.
    More often lists of names actually, e.g. guest's on BBC Question Time and the like, sometimes they're cast lists for plays etc. But using the current Comments editor is fine. it's easy enough to strip the <div> tags as and when.

    Hmmm - json, don't think so - Haskell maybe
BR

Last edited by BetterRed; 07-22-2016 at 05:45 AM.
BetterRed is offline   Reply With Quote
Old 07-22-2016, 07:59 AM   #24
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
In addition to the booleans show_labels and is_plain_text that already appear in my image attachments and have been tested, I will add "for special plugin use only": is_base64 plus an editable combobox with a dropdown list of all currently existing MIME Types. Arbitrary string values may be entered too because the combobox items will be editable.

Standard Calibre will not, at least until Kovid wants it to, even look at those special use values. My code changes that I will submit later today certainly will not.

DaltonST
DaltonST is offline   Reply With Quote
Old 07-22-2016, 09:52 AM   #25
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
See the attached Preferences > Add your own column dialog for datatype of comments.

What I am doing does not use the "for plugin use only" attributes.

The dropdown combobox for MIME types is editable, so one of the other 1000+ types can be manually specified as desired.

DaltonST
Attached Thumbnails
Click image for larger version

Name:	comments_create_custom_column_in_preferences.png
Views:	74
Size:	83.1 KB
ID:	150408  
DaltonST is offline   Reply With Quote
Old 07-22-2016, 03:29 PM   #26
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Attached are 2 images of editing a row within the list view, and 1 of table custom_columns.

1 of 2 shows using F2 to edit a single column of a single book. That column is datatype=comments with is_plain_text = True. The editor used does NOT use a "completer" with a dropdown. No suggestions. Just a simple line edit function.

2 of 2 shows using F2 to do the same thing, except the column is datatype=comments with is_plain_text = False. This is the original comments custom column editor for HTML text.

In the table custom_columns image, the unused (but available for plugins to use henceforth) attributes are shown: is_base64 and mimetype.

Only custom columns created after the code was changed will show those new attributes, unless a custom column is manually changed in Preferences for any reason. If they don't have them, then implicitly their value is either 'false' or '', depending on the attribute. No harm and no foul if they are never changed in the future.


DaltonST
Attached Thumbnails
Click image for larger version

Name:	comments_library_view_book_list_inline_edit_for_comments_custom_column_is_plain_text_is_true.png
Views:	67
Size:	48.8 KB
ID:	150411   Click image for larger version

Name:	comments_library_view_book_list_inline_edit_for_comments_custom_column_is_plain_text_is_false.png
Views:	80
Size:	37.9 KB
ID:	150412   Click image for larger version

Name:	table_custom_columns.png
Views:	58
Size:	20.3 KB
ID:	150413  
DaltonST is offline   Reply With Quote
Old 07-22-2016, 04:23 PM   #27
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
So, now I need a interested volunteer who has the following installed software and skillsets to polish off the development documented in this thread:

[1] Has PyQt installed.

[2] Has Qt form creator tools installed

[3] Knows how to use [1] and [2] to create a ui.py file for PyQt to translate into a .py file.


The reason for the above 3 requirements is that of all of the changes, only one impacts a .ui file, which happens to be create_custom_column.ui. Qt will create that using the form creator tool, and PyQt will turn that into a generated (transient) create_custom_column_ui.py file.

Since I do not have [1] and [2], I had to manually code PyQt in file create_custom_column_ui.py in order to create and process the widgets shown previously in this thread. As I mentioned, file create_custom_column_ui.py will be wiped out and regenerated. So, the Qt form creator tool has to be used to implement the code changes that I have made in file create_custom_column_ui.py. In other words, a chicken and the egg scenario. I changed the DNA of an egg, so I need someone to change a chicken's DNA using my egg's DNA so the chicken will lay a new egg with the old egg's DNA.


[4] Can run Calibre from source.

[5] Can do what this says to do: https://manual.calibre-ebook.com/develop.html#submitting-your-changes-to-be-included which appears to assume that you use Linux.

This is so you can get the PyQt generated create_custom_column_ui.py plus the create_custom_column.ui file to Kovid, not to mention the other 4 files that I changed (but for which I could code Qt manually without getting the form creator tool involved).


I have some final testing to do before I feel comfortable uploading a .zip with the 5 .py files that have all of the changes related to this development. The attached image shows those file names.

If there is no qualified volunteer...

Anyone?



DaltonST
DaltonST is offline   Reply With Quote
Old 07-22-2016, 05:00 PM   #28
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,278
Karma: 83106403
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It shouldn't be too hard to map the changes back to the ui file. A calibre development environment has everything needed to compile ui files, too.
And submitting changes doesn't require Linux, just the Git tools (which are available on Windows bundled with the minimal posix/bash emulation required).

But I could take a stab at it, although not until Sunday (I will be offline as usual on Shabbos).

Last edited by eschwartz; 07-22-2016 at 05:02 PM.
eschwartz is offline   Reply With Quote
Old 07-22-2016, 07:48 PM   #29
BetterRed
null operator
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: 13,289
Karma: 10793754
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Thus far I have managed to get by without running from source, and I'm not minded to go down that path. If someone were to build an installable portable version for Windows, I would gladly take it for a spin. Otherwise I'll wait for the release and check out the portable version then.

Thanks for the effort you've put into this, and for the screen shots showing how columns will appear when editing in the book list.

Aside : perhaps could someone spell out the usage case for the base 64 and Mime type attributes, using a real world example in plain English.

BR
BetterRed is offline   Reply With Quote
Old 07-22-2016, 08:31 PM   #30
DaltonST
Deviser
DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.DaltonST is the One.
 
DaltonST's Avatar
 
Posts: 1,471
Karma: 101298
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
You can store pictures or movies etc.in a text field in a database just like you would store an isbn or title. But not enough characters to do that, so need to convert them to base 64 first. Text, but encoded as base 64. See wikipedia. Think of when you open a .exe in Notepad. Like that. Encode then decode. No corruption if done properly. I used to download images from from a usenet bbs that were text, then ran a dos .com program to convert them to .bmp. 1980s.
DaltonST is offline   Reply With Quote
Reply

Tags
custom field, plain-text

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Yes/No Field doesn't appear in browser and can't search on it spedinfargo Library Management 3 01-02-2014 08:32 PM
Problem with Tag Browser Custom Icon for Languages MartyTX Library Management 1 02-03-2013 03:44 AM
Calibre always freezes with tag browser shown Noughty Calibre 38 10-17-2011 01:19 PM
Y/N custom column in Tag Browser? matthewdeans Calibre 15 08-12-2011 02:01 PM
Creating a Short Text Column that Doesn't Appear in Tag Browser? shocampo Calibre 2 09-12-2010 01:35 PM


All times are GMT -4. The time now is 02:48 PM.


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