Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-22-2015, 02:20 PM   #1
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
25 stars or one?

Hallo!

In a book there are 25 stars, seems me senseless. I would like to summarize to one star.
They are seemingly identical, since the byte data differ minimally.

Click image for larger version

Name:	star01.jpeg_798_B.png
Views:	279
Size:	26.1 KB
ID:	143067 Click image for larger version

Name:	star03.jpeg_799_B.png
Views:	274
Size:	30.2 KB
ID:	143068 Click image for larger version

Name:	star24.jpeg_800_B.png
Views:	267
Size:	29.0 KB
ID:	143069
star01.jpeg_798_B · · · · · · star03.jpeg_799_B · · · · · · star24.jpeg_800_B

I know the job (in technical sense).

But my question is whether the request is inadvisable for any reason?

Last edited by chaot; 10-23-2015 at 06:38 AM. Reason: change image appearance, inadvisable
chaot is offline   Reply With Quote
Old 10-22-2015, 02:40 PM   #2
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It should be safe.

I've seen this before, when a book was clearly OCRed.
The same image was picked up multiple times by the OCR software, but with ever-so-slight differences in the image data (a pixel here or there) so the software created multiple images.
eschwartz is offline   Reply With Quote
Old 10-22-2015, 02:48 PM   #3
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: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
rename the other (non-star) images
Then your S&R will be simpler

Pick the best and give it a non-'star' name,
REGEX search for star\d+ and replace with the above

OR
Replace that mess with a Text star and assign it in a class that allows you to set a size and margin
Code:
.mystar {display:block;font-size: 1.2em;text-align center; margin: 1em 0; text-indent: 0;}
theducks is offline   Reply With Quote
Old 10-23-2015, 08:43 AM   #4
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by eschwartz View Post
I've seen this before, when a book was clearly OCRed.
OCRed (OCR)→Initialism of Optical Character Recognition (the principle) or Optical Character Reader (the scanning device)
Realistic!

Quote:
Originally Posted by theducks View Post
rename the other (non-star) images
Then your S&R will be simpler
I don't refuse to do what you say, just for interest: Why? That does not seem necessary.
Your explanation (about S&R) is not clear to me.

Click image for larger version

Name:	3 non-star images.png
Views:	315
Size:	9.9 KB
ID:	143087
3 non-star images

Last edited by chaot; 10-26-2015 at 12:57 PM.
chaot is offline   Reply With Quote
Old 10-23-2015, 11:22 AM   #5
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: 30,913
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 chaot View Post
OCRed (OCR)→Initialism of Optical Character Recognition (the principle) or Optical Character Reader (the scanning device)
Realistic!


I don't refuse to do what you say, but out of interest: Why? That does not seem necessary.
Your explanation (about S&R) is not clear to me.

Attachment 143087
3 non-star images
Why:
1) Reduce file size (the book) for either way

2)Remove jitter (the image appears to jump around) between, what should be the SAME image., when viewed rapidly in succession.


My idea for S&R is simply a work flow methodology I use to K.I.S.S.
Usually (not always) these are the bulk of the images, the rename means a less exacting search

BTW In the Editor: Tools Reports: Images (sidebar)
To see what you have
theducks is offline   Reply With Quote
Old 10-26-2015, 01:42 PM   #6
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
@theducks Sorry, I understand less and less.
Quote:
Originally Posted by theducks View Post
rename the other (non-star) images
Then your S&R will be simpler
Quote:
Why:
1) Reduce file size (the book) for either way
I renamed these 3 non-star images (_typo, cov, head), but the size remains exactly the same, as I expected.

Quote:
2) Remove jitter (the image appears to jump around) between, what should be the SAME image., when viewed rapidly in succession.
???

Quote:
My idea for S&R is simply a work flow methodology I use to K.I.S.S.
What's K.I.S.S?

Quote:
Usually (not always) these are the bulk of the images, the rename means a less exacting search
???

To see what we got, I show it (the whole I can't, it's a .csv file, what calibre recognizes as an Invalid file).
Click image for larger version

Name:	Reports_Images.png
Views:	315
Size:	73.9 KB
ID:	143185
Reports_Images
chaot is offline   Reply With Quote
Old 10-26-2015, 02:02 PM   #7
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: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Inline (I am guessing that English is not your primary language. At least, Set your (MR) Location to your country to give us a clue

INLINE replies

Quote:
Originally Posted by chaot View Post
@theducks Sorry, I understand less and less.



I renamed these 3 non-star images (_typo, cov, head), but the size remains exactly the same, as I expected.

Changing these just makes the S&R less likely to change the wrong SRC in the image use
???

You MISSED the step after that. Now replace all the uses (in the book) of Starxxx with the name if the new or single selected file. Once that is done, you can delete those NOW unused ,extra media files. That is how to shrink book size

the appearance of Jitter (wobble), is when the scaned images have different whitespace and alignments


What's K.I.S.S?
acronym for: Keep it Simple Stupid

???

To see what we got, I show it (the whole I can't, it's a .csv file, what calibre recognizes as an Invalid file).
Attachment 143185
Reports_Images
I still see many 'Star' images. The whole purpose of my post was I thought that you wanted only ONE left. If the are unused (0 uses), that image can be deleted
theducks is offline   Reply With Quote
Old 10-26-2015, 02:17 PM   #8
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
You are right, it makes no sense to have 25 stars when 1 would do. Probably this happened because the book was scaned and then converted to ebook using a program that didn't know any better. I would search for all reference to a "star" and replace a with one single "star". For example, using regex, search all text:

search: star[0-9][0-9]\.jpeg
replace: star01.jpeg

With this you will have changed all reference to star01.jpeg. Now you can deleted star02.jpeg through star25.jpeg as they are not used.

Why? Because the world will be a better place.
Remember - Keep It Simple Stupid!
Thom* is offline   Reply With Quote
Old 10-26-2015, 02:49 PM   #9
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by theducks View Post
At least, set your (MR) Location to your country to give us a clue.
I refuse to do that, it would be misleading.

Click image for larger version

Name:	Where you live.png
Views:	204
Size:	19.7 KB
ID:	143188
Where you live

My mother tongue is German. And if I am not wrong, the question should be in correct English: Where do you live? (With question mark.)

So far! The rest will be commented later.

Last edited by chaot; 10-26-2015 at 02:56 PM. Reason: add complete quote
chaot is offline   Reply With Quote
Old 10-26-2015, 03:09 PM   #10
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by chaot View Post

In a book there are 25 stars, seems me senseless. I would like to summarize to one star.

I know the job (in technical sense).

But my question is whether the request is inadvisable for any reason?
Now give me please some time to do it. Possibly there are more than one way, more or less sophisticated, with S&R and/or regexes or without.

Documentation follows.

Last edited by chaot; 10-27-2015 at 08:47 AM.
chaot is offline   Reply With Quote
Old 10-27-2015, 12:45 PM   #11
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Important Back-up the book before starting experiments.
(Save to disk→Save to disk in a single directory (which is to get established). E.g. my one is called Library#backed-up_experiments)

Rename one image, e.g. star01.jpeg to rats.jpeg
Click image for larger version

Name:	File browser_Images (rats.jpeg).png
Views:	169
Size:	14.0 KB
ID:	143226
Files browser Images (rats.jpeg)

Click image for larger version

Name:	File Browser_Text (S with star_d+ & R with rats).png
Views:	184
Size:	119.1 KB
ID:	143228
Files Browser Text (S with star\d+ & R with rats)(S with star[0-9][0-9]\.jpeg also functions)

Click image for larger version

Name:	Differences wetween books.png
Views:	193
Size:	86.5 KB
ID:	143230
Differences wetween books

Click image for larger version

Name:	Files Browser_Images (Delete the 24 selected file(s).png
Views:	176
Size:	105.1 KB
ID:	143229
Files Browser Images (Delete the 24 selected file(s)

Rename rats.jpeg to star.jpeg

Result
Click image for larger version

Name:	Files Browser_Images (Star.jpeg).png
Views:	193
Size:	15.2 KB
ID:	143231
Files Browser Images (star.jpeg)
(Check Book is okay)

Job done!

Quote:
Originally Posted by theducks View Post
rename the other (non-star) images
Then your S&R will be simpler
You gave us further reasons for to do so, still I am not convinced (or I don't understand you).

Quote:
OR
Replace that mess with a Text star and assign it in a class that allows you to set a size and margin
Code:
.rats {display:block;font-size: 1.2em;text-align center; margin: 1em 0; text-indent: 0;}
Please, where is to introduce that. I would like to test.

Of course, even though I had understood the methodology of approach, the regexes I had not known. These simplify the procedure considerably.





OT: Sometimes it is quite difficult to understand you. May I ask if English is your primary language.
My Denglish seems me often not so bad.

Last edited by chaot; 10-27-2015 at 03:00 PM. Reason: add [LINE]900[/LINE]
chaot is offline   Reply With Quote
Old 10-27-2015, 01:57 PM   #12
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: 30,913
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 chaot View Post
Important Back-up the book before starting experiments.


OT: Sometimes it is quite difficult to understand you. May I ask if English is your primary language.
My Denglish seems me often not so bad.
I speak Silicon Valley Geek English
(this is where everyone expects the others to be well versed in the subject being discussed The companies I worked at had so many PhD's that no one used Dr. ... in daily speach. Me: High School+Navy Schools. Mostly self-taught on software)


Your English is fine. Technical discussions can get lost when different languages and backgrounds are involved.
theducks is offline   Reply With Quote
Old 10-27-2015, 02:19 PM   #13
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by chaot View Post
You gave us further reasons for to do so, still I am not convinced (or I don't understand you).

Quote:
Originally Posted by theducks View Post
OR
Replace that mess with a Text star and assign it in a class that allows you to set a size and margin
Code:
.mystar {display:block;font-size: 1.2em;text-align center; margin: 1em 0; text-indent: 0;}
Please, where is to introduce that. I would like to test.

Of course, even though I had understood the methodology of approach, the regexes I had not known. These simplify the procedure considerably.

It is an additional optimization.

With the fixes you just did, you now have one (1) star image.

But you could remove that as well, and replace it with a text star:
Code:
*
which is less Kilobytes (actually bytes, 798 B --> 1 B)




I've always been more than happy with the following CSS+HTML instead of using images for change of scene:

Code:
# CSS
.scenebreak {
  text-align: center;
  text-indent: 0%;
  margin: 1em;
}

# HTML
<p class="scenebreak">* * *</p>
eschwartz is offline   Reply With Quote
Old 10-27-2015, 03:51 PM   #14
chaot
Head of lunatic asylum
chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.chaot will give the Devil his due.
 
chaot's Avatar
 
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
Quote:
Originally Posted by theducks View Post
Me: High School+Navy Schools. Mostly self-taught on software)
We got similar background.
Too much school (also High School) + maritime experiences up to the top (Captain Patent). Self-taught on software with the help of fine gents como tú.
Honestly: Not even 10 years ago I thought there's something to turn on a PC like a light switch.




Quote:
Originally Posted by eschwartz View Post

With the fixes you just did, you now have one (1) star image.

But you could remove that as well, and replace it with a text star ...
Introduce the css-code (at the end (position nevermind))
Click image for larger version

Name:	Files browser_ stylesheet.css.png
Views:	195
Size:	48.4 KB
ID:	143234
F B stylesheet.css

S&R HTML-code
Click image for larger version

Name:	F B_Text (S&R).png
Views:	230
Size:	133.2 KB
ID:	143236
F B Text

Click image for larger version

Name:	Differences between books.png
Views:	180
Size:	133.8 KB
ID:	143237
Differences between books

Click image for larger version

Name:	Check Book_The file content_images_star.jpeg is not referenced [content_images_star.jpeg].png
Views:	186
Size:	77.7 KB
ID:	143238
Check Book The file content_images_star.jpeg is not referenced [content_images_star.jpeg]

Delete star.jpeg→Check Book OK.

Just I see: @eschwartz has schmuggled me some 3 stars inside for change of scene (changeable in stylesheet.css)
Code:
<p class="scenebreak">*</p>
Click image for larger version

Name:	E-book viewer (3 stars).png
Views:	187
Size:	53.3 KB
ID:	143239
E-book viewer (* * *)

Short and painless, all very much!

Edit: Storage the codes (snippets) in a kind of archive (for easy access).
(Edit book→Help→Preferences→Editor settings→Manage snippets)

Last edited by chaot; 10-29-2015 at 03:28 PM. Reason: Formulations, time pressure yesterday!
chaot is offline   Reply With Quote
Old 10-27-2015, 04:44 PM   #15
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stars oldyellr Feedback 23 10-01-2012 01:49 AM
Stars and Stripes adoucette Recipes 0 05-12-2012 07:15 AM
March to the Stars leebase Reading Recommendations 2 05-26-2010 02:43 AM
Where did my stars go? motormanjh Calibre 5 07-25-2009 10:43 PM


All times are GMT -4. The time now is 07:29 PM.


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