![]() |
#1 |
useR!
![]() ![]() ![]() ![]() ![]() ![]() Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
More than 40 post(s) in one printable version?
Hello,
I wonder whether Mobileread can introduce an option to show one thread in ONE long printable version. Currently, the maximum number of posts displayed in one printable page is limited to 40. If the thread has more than 40 posts, we will have multiple printable pages and it is harder to convert the entire thread into an ebook format. For example, if I found an interesting thread, I change it into a printable version (Thread Tools - Show Printable Version) and select 'Show 40 post(s) from this thread on one page'. Then I convert the page into LRF using web2lrf. However, this becomes bit more difficult with a thread having more than 40 posts. For instance, we need 5 printable pages to display all the posts in the following thread. https://www.mobileread.com/forums/pri...?t=19142&pp=40 Since this site has many ebook users, I guess some users may use the printable pages to make an ebook file rather than print them on papers. If it is the case, I think it may be beneficial to have an option to display all the posts in one printable page. If it is technically difficult, it is fine. However, if it can be implemented without much problem, such an option can be really helpful. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You should be able to use recursion and --match-regexps with web2lrf to follow the links and convert the entire thread.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
useR!
![]() ![]() ![]() ![]() ![]() ![]() Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
Quote:
First of all, thanks for your excellent program. It makes using Sony Reader better than I ever expected. BTW, I tried the method but I could not get the satisfactory result. For example, starting from this link https://www.mobileread.com/forums/pri...?t=19142&pp=40 I would like to include only the following links in addition to the original link. <a class="smallfont" href="printthread.php?t=19142&pp=40&page=2 " title="Show results 41 to 80 of 193">2</a> <a class="smallfont" href="printthread.php?t=19142&pp=40&page=3 " title="Show results 81 to 120 of 193">3</a> <a class="smallfont" href="printthread.php?t=19142&pp=40&page=4 " title="Show results 121 to 160 of 193">4</a> <a class="smallfont" href="printthread.php?t=19142&pp=40&page=5 " title="Show results 161 to 193 of 193">5</a> However, the following link (self-referencing link) is always included in the printable form and it ended up included twice in the resulting LRF. <a href="printthread.php?t=19142&pp=40">Show 40 post(s) from this thread on one page</a> Is there a way to include this link only once in LRF? I tried this, Code:
web2lrf -u "https://www.mobileread.com/forums/printthread.php?t=19142&pp=40" default -r 1 -t "Reading" -a "Mobileread" --link-levels=1 --ignore-tables --match-regexp="printthread" Code:
web2lrf -u "https://www.mobileread.com/forums/printthread.php?t=19142&pp=40" default -r 1 -t "Reading" -a "Mobileread" --link-levels=1 --ignore-tables --match-regexp="printthread" --link-exclude="printthread.php?t=19142&pp=40$" |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--match-regexp printthread\S+page=\d+
|
![]() |
![]() |
![]() |
#5 |
useR!
![]() ![]() ![]() ![]() ![]() ![]() Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
Hi, Kovid,
Thanks for the tip. However, with the given regular expression, I got an error message looks as follows. ============== D:\My_Documents\Download - Files\00>web2lrf -u "https://www.mobileread.com/forums /printthread.php?t=19142&pp=40" default -r 1 -t "Reading" -a "Mobileread" --link -levels=1 --ignore-tables --match-regexp printthread\S+page=\d+ Downloading . https://www.mobileread.com/forums/pri...?t=19142&pp=40 saved to Traceback (most recent call last): File "convert_from.py", line 194, in <module> File "convert_from.py", line 188, in main File "convert_from.py", line 165, in process_profile WindowsError: [Error 123] The filename, directory name, or volume label syntax i s incorrect: '' =================== I am not familiar with HTML but the problem seems to occur since one of the link from the original url is identical to the url itself. Using the example above, let me denote the original link as A and the links from the original url as B~F. A. original URL: https://www.mobileread.com/forums/pri...?t=19142&pp=40 B. href="printthread.php?t=19142&pp=40&page=2 " C. href="printthread.php?t=19142&pp=40&page=3 " D. href="printthread.php?t=19142&pp=40&page=4 " E. href="printthread.php?t=19142&pp=40&page=5 " F. href="printthread.php?t=19142&pp=40 The problem is F is identical to A. The regular expression seems to remove both A and F leading to the error message. For now, I decided to use the following command. Code:
web2lrf -u "https://www.mobileread.com/forums/printthread.php?t=19142&pp=40" default -r 1 -t "Reading" -a "Mobileread" --link-levels=1 --ignore-tables --match-regexp="printthread" ![]() Again, thanks for your help and providing wonderful program to users. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Fully Converged
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,171
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
|
Hi soilwork,
The limit could be changed to a higher number, but we still need to define a limit for performance reasons. So even if we pushed the limit up to display a maximum of posts of 80 per page, you'd still need to browse to a next page with larger threads. On the positive side, when our mobile edition will be available, it'll be a lot easier to define regular expressions and parse content through mobile devices (including e-readers). |
![]() |
![]() |
![]() |
#7 | |
useR!
![]() ![]() ![]() ![]() ![]() ![]() Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#8 | |
useR!
![]() ![]() ![]() ![]() ![]() ![]() Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Onyx Boox Max 2, Kobo Libra H2O, iRiver Story HD
|
Quote:
This is a slightly revised idea to address the same problem. I wonder whether it is possible to remove the link 'Show 40 post(s) from this thread on one page' when the printable version is already showing 40 posts. For example, https://www.mobileread.com/forums/pri...ad.php?t=22004 have a link to show 40 posts per page. After I click it, it becomes https://www.mobileread.com/forums/pri...?t=22004&pp=40 However, this link still have the same link 'Show 40 post(s) from this thread on one page'. If it is possible to remove this link, the problem I described above will disappear. Then, I can use the web2lrf command to make the printable page into LRF without any duplicate page. Last edited by soilwork; 03-19-2008 at 03:40 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printable life size comparison of Ebook readers inside | scheichxodox | Which one should I buy? | 0 | 03-13-2010 02:56 AM |
Kindle to printable format | cdfite | Introduce Yourself | 4 | 01-04-2010 10:47 AM |
Where to post about sony Ebook Desktop version | HarryPutnam | Reading and Management | 7 | 06-15-2009 06:03 AM |
Printable Electronics Used for Products | Anchoku | News | 7 | 03-06-2007 12:57 AM |