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

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 06-24-2007, 09:04 AM   #61
alex_d
Addict
alex_d doesn't litteralex_d doesn't litter
 
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
athlonkmf... if you'd like to post patched versions and put your name in, you can go ahead.

edit: haha the "horz.adjustable" instead of "horz-adjustable" was when i did a 'replace all' about 10 versions ago. it's in kernel-lrs.cmd.

p.s. echo without carriage return is a bit tricky. but this this program will do it

Last edited by alex_d; 06-24-2007 at 09:26 AM.
alex_d is offline  
Old 06-24-2007, 09:32 AM   #62
athlonkmf
Guru
athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.
 
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
Quote:
Originally Posted by alex_d View Post
athlonkmf... if you'd like to post patched versions and put your name in, you can go ahead.

edit: haha the "horz.adjustable" instead of "horz-adjustable" was when i did a 'replace all' about 10 versions ago. it's in kernel-lrs.cmd.
I know, i've patched it already on my computer
But I thought I shouldn't tell others to edit the scripts directly, or they'd blame me when they break something.

I'll see if I can do a patched version later.
I don't know how to write it out in UTF-16 though.

And it seems that lrs2lrf doesn't accept the "images without path"-lrs... (IE, it was faster for me to just open the temp.lrs files and do some replace all then actually testing and patching rasterfarian as I was waiting for your batch-version too )
athlonkmf is offline  
Old 06-25-2007, 02:05 AM   #63
alex_d
Addict
alex_d doesn't litteralex_d doesn't litter
 
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
doing utf-16...

I remember I had to insert the line:
cmd /A /C ECHO ^<?xml version=^"1.0^" encoding=^"UTF-16^"?^> > "%relpath%\temp\temp.lrs"
(instead of just ECHO ....) because of encoding problems. cmd /A is supposed to instruct echo to output in ansi. maybe you should try cmd /U? Also, I'm pretty sure that >> takes care to preserve encoding so if you start with a file that's in UTF-16, appending to it will also be UTF-16.


anyway, I've been meaning to rewrite all of this in c#
I've also been meaning to learn c#
The biggest problem right now is that CMD is a ridiculously, ridiculously bad language (ie, it's not even structured programming. you have to use fn gotos! and the gotos break the parts which Do try to be sort of structured! and types... wtf are types? you don't even have variables! every variable is like a "#define" and if it has certain characters, it'll break the code) and it's pretty frustrating to do anything sophisticated. I don't think microsoft ever even intended anyone to really use cmd scripts. you're supposed to use vbscript or jscript i guess. and back in dos days, BASIC.
alex_d is offline  
Old 06-25-2007, 02:12 AM   #64
athlonkmf
Guru
athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.
 
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
Quote:
Originally Posted by alex_d View Post
doing utf-16...

I remember I had to insert the line:
cmd /A /C ECHO ^<?xml version=^"1.0^" encoding=^"UTF-16^"?^> > "%relpath%\temp\temp.lrs"
(instead of just ECHO ....) because of encoding problems. cmd /A is supposed to instruct echo to output in ansi. maybe you should try cmd /U? Also, I'm pretty sure that >> takes care to preserve encoding so if you start with a file that's in UTF-16, appending to it will also be UTF-16.


anyway, I've been meaning to rewrite all of this in c#
I've also been meaning to learn c#
The biggest problem right now is that CMD is a ridiculously, ridiculously bad language (ie, it's not even structured programming. you have to use fn gotos! and the gotos break the parts which Do try to be sort of structured! and types... wtf are types? you don't even have variables! every variable is like a "#define" and if it has certain characters, it'll break the code) and it's pretty frustrating to do anything sophisticated. I don't think microsoft ever even intended anyone to really use cmd scripts. you're supposed to use vbscript or jscript i guess. and back in dos days, BASIC.
I made a litle beginning (or more like an ending) to do a rasterfarian in C#, and managed to do the netbpm, create lrs and output to lrf part (only missing the ghostview part), but then I stopped because... "why should I program it, if you were doing a good job already?" It's better to leave it up to you because I know for sure that I won't have time to update it.

And my other program wasn't really well accepted anyway.


ps. i had major trouble going through the CMD-code though.. with all the goto, lack of syntax highlighting and natural variablenames, it's kinda hard to read through it...
athlonkmf is offline  
Old 06-25-2007, 09:12 AM   #65
ashkulz
Addict
ashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enough
 
ashkulz's Avatar
 
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
Quote:
Originally Posted by athlonkmf View Post
I made a litle beginning (or more like an ending) to do a rasterfarian in C#, and managed to do the netbpm, create lrs and output to lrf part (only missing the ghostview part), but then I stopped because... "why should I program it, if you were doing a good job already?" It's better to leave it up to you because I know for sure that I won't have time to update it.

And my other program wasn't really well accepted anyway.


ps. i had major trouble going through the CMD-code though.. with all the goto, lack of syntax highlighting and natural variablenames, it's kinda hard to read through it...
Well, I think that you should've continued it and done the conversion. If someone wants to "hack" the current rasterfarian, to understand the existing code is not easy at all. as alex has mentioned that he has no love for the current code, so you should step up and do the conversion -- that's the spirit of open source Then alex_d and you could've continued the development with a much better codebase....

Also, if you want you can refer to the source code for pdfread -- it's in python, but the tools used and intent are very much similiar.
ashkulz is offline  
Old 06-25-2007, 10:11 AM   #66
athlonkmf
Guru
athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.
 
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
Quote:
Originally Posted by ashkulz View Post
Well, I think that you should've continued it and done the conversion. If someone wants to "hack" the current rasterfarian, to understand the existing code is not easy at all. as alex has mentioned that he has no love for the current code, so you should step up and do the conversion -- that's the spirit of open source Then alex_d and you could've continued the development with a much better codebase....

Also, if you want you can refer to the source code for pdfread -- it's in python, but the tools used and intent are very much similiar.
The thing is, I archive devving in priorities. At that time I was writing my program https://www.mobileread.com/forums/showthread.php?t=11261 to easy convert a bunch of manga-collections. Because there was no other suitable solution for that, I've made it.
Then I wanted to extend it with rasterfarian's capabilities in order to cut down on processing time and actually batch things. That's why I converted the final steps. But that's when I thought... why spend my time on it, if my program combined with a small patched rasterfarian do the same trick too.

Unfortunately it seems that others do not like or has no need to use my program, because there weren't any comments. So I ditched the project with the idea "hey, it works for me as it is now".

If there really is truely a need for a rasterfarian in C#, I might consider to do a base start (probably not fully OO), but if there are none, I should spend my time on other projects (because I don't really need it myself).
athlonkmf is offline  
Old 06-25-2007, 12:29 PM   #67
alex_d
Addict
alex_d doesn't litteralex_d doesn't litter
 
Posts: 303
Karma: 187
Join Date: Dec 2006
Device: Sony Reader
processing folders of images as input to rasterfarian (and also some special features for scanned docs) is a big item on the rasterfarian todo.

as for the rasterfarian code: the core conversion code is pretty neatly contained in kernel-processing.cmd. All the other logic is pretty useless to look at because the same stuff can be done much more elegantly in a better programming language. E.g. a language that, incredibly, has arrays. I won't even mention structures. Godforbid classes. Reading source code before writing your own isn't usually a good idea unless your goal is nothing more than porting.

Anyway, i've started doing a little bit in c# already. Definately fully OO. This is in part to practice coding c# itself, but I also like the new features like interfaces and properties. I know it's nothing that classes aren't able to accomplish. But don't you hate the people who say C is just as good for doing OO as C++? Syntax does matter.

I'd like to also see modularity in the way rasterfarian works, to make it easier to add input or output formats (or the same format but alternate utility) or processing filters.

Re a gui. I'm not able to do it yet, but it would great if there was a nice workflow for picking input docs, manually cropping them, choosing filters and setting parameters, and having a dynamic preview for all that. This would be the real point of c#.
alex_d is offline  
Old 06-25-2007, 10:54 PM   #68
ashkulz
Addict
ashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enoughashkulz will become famous soon enough
 
ashkulz's Avatar
 
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
Quote:
Originally Posted by alex_d View Post
processing folders of images as input to rasterfarian (and also some special features for scanned docs) is a big item on the rasterfarian todo.

as for the rasterfarian code: the core conversion code is pretty neatly contained in kernel-processing.cmd. All the other logic is pretty useless to look at because the same stuff can be done much more elegantly in a better programming language. E.g. a language that, incredibly, has arrays. I won't even mention structures. Godforbid classes. Reading source code before writing your own isn't usually a good idea unless your goal is nothing more than porting.

Anyway, i've started doing a little bit in c# already. Definately fully OO. This is in part to practice coding c# itself, but I also like the new features like interfaces and properties. I know it's nothing that classes aren't able to accomplish. But don't you hate the people who say C is just as good for doing OO as C++? Syntax does matter.

I'd like to also see modularity in the way rasterfarian works, to make it easier to add input or output formats (or the same format but alternate utility) or processing filters.

Re a gui. I'm not able to do it yet, but it would great if there was a nice workflow for picking input docs, manually cropping them, choosing filters and setting parameters, and having a dynamic preview for all that. This would be the real point of c#.
I think that making RasterFarian modular would go a long way in making features easy to add. I was at the same stage with PDFRead a while ago, and I made the same decision to re-write PDFRead for more maintainability (I think we discussed this in another thread). After that, adding support for new formats was a breeze (see this and this) -- even adding more steps to the pipeline was simplified to a great extent, I didn't have to go hunting all over the code. I hope you find the time to do that!
ashkulz is offline  
Old 06-29-2007, 11:59 AM   #69
Azayzel
Cache Ninja!
Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.Azayzel ought to be getting tired of karma fortunes by now.
 
Azayzel's Avatar
 
Posts: 643
Karma: 1002300
Join Date: Jan 2007
Location: Tokyo, Japan
Device: PRS-500, HTC Shift, iPod Touch, iPaq 4150, TC1100, Panasonic WordsGear
Just thought I'd pat all of you guys/gals on the back for the hard work you've put into making these tools for converting to Reader-viewable format. I've tried each of the and use whichever works best for the project I'm working on. If you're trying to develop something new, don't get discouraged by lack of comments, it could just simply mean that people are satisfied with what you've done and have no comments on how to improve it; not that no one is using it. You're all great for simply taking the time to create something new and sharing it with the rest of this community. Thanks!
Azayzel is offline  
Old 07-01-2007, 04:33 AM   #70
Raventhon
Member
Raventhon began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jun 2007
Device: Amazon Kindle Voyage
Thank god I've got a dual-core machine, or this would take forever. Is there any way I can batch convert these 300+ pdfs I've got in this one directory so I can just let it run all night?
Raventhon is offline  
Old 07-14-2007, 04:46 PM   #71
harpum
Enthusiast
harpum began at the beginning.
 
Posts: 47
Karma: 24
Join Date: Jan 2007
Device: Axim 51v/LG chocolate
How about adding TOC support.
PDFRead already supported pdf file TOC.
Whenever I try to search a specific in very big book. It takes a lot of time.
harpum is offline  
Old 07-14-2007, 04:55 PM   #72
athlonkmf
Guru
athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.
 
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
Quote:
Originally Posted by harpum View Post
How about adding TOC support.
PDFRead already supported pdf file TOC.
Whenever I try to search a specific in very big book. It takes a lot of time.
Rasterfarian already does a TOC-conversion if the PDF has a TOC.
athlonkmf is offline  
Old 07-15-2007, 10:48 AM   #73
harpum
Enthusiast
harpum began at the beginning.
 
Posts: 47
Karma: 24
Join Date: Jan 2007
Device: Axim 51v/LG chocolate
Sorry. And Can I control margin?

Quote:
Originally Posted by athlonkmf View Post
Rasterfarian already does a TOC-conversion if the PDF has a TOC.
I am sorry. I did not know that.
It works very well.

-----------------
And I have a question about margin.

Jury already mentioned about this.
After I crop pdf, I can see the margin in lrf.
I think rasterfarian put some margin automatically.
Is there some option to control margin?

thanks.

Last edited by harpum; 07-15-2007 at 06:55 PM.
harpum is offline  
Old 07-17-2007, 02:21 AM   #74
gahau
Junior Member
gahau began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2007
Device: PRS-500
argg i have been messing with it again and again!

i have try many setting and i am still fustrated!
can someone or alex post their setting to make my pdf look like one of alex convertion (the one where he shows his science book converted)
all my convertion look ok... but still it not as sharp...

noob need help...
gahau is offline  
Old 07-17-2007, 06:42 AM   #75
athlonkmf
Guru
athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.athlonkmf ought to be getting tired of karma fortunes by now.
 
Posts: 714
Karma: 1014039
Join Date: May 2007
Device: Sony PRS-500, Sony PRS-505, Kindle 3, Sony PRS350, iPad 64GB
Quote:
Originally Posted by harpum View Post
I am sorry. I did not know that.
It works very well.

-----------------
And I have a question about margin.

Jury already mentioned about this.
After I crop pdf, I can see the margin in lrf.
I think rasterfarian put some margin automatically.
Is there some option to control margin?

thanks.
when the PDF-page is 4:3 the margin would be minimized, otherwise, the reader will automaticly set margins.
In the defaults.cmd in the rasterfarianfolder, you will be able to set the margins manually. But as said, it will only work on 4:3-sizes.
athlonkmf is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Beta Test of Major New Features Starson17 Calibre 45 05-17-2010 10:55 AM
PRS-500 RasterFarian patched and available again! NatCh Sony Reader Dev Corner 7 05-25-2009 05:16 PM
PRS-500 rasterfarian question drogo Sony Reader Dev Corner 2 10-05-2007 10:18 AM
PRS-500 Crop in RasterFarian 2.5 ddavtian Sony Reader Dev Corner 4 08-01-2007 07:40 PM
RasterFarian V2.5 Beta for Sony Reader released Alexander Turcic Sony Reader 0 04-17-2007 02:53 PM


All times are GMT -4. The time now is 10:05 PM.


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