|
Post by alexfish on Jul 14, 2019 16:55:50 GMT 1
Well Well Found main bit as regards xterm 'Color mode & mask main one been color mode in this module it allows rgb 255 which will not run in xterm but will work in likes of mlterm will have to put switch in for mode ie bits like -color 16 or -color 255 now running checks on xterm max stride Update looks like xterm row stride max about 700 & mlterm will work at 1024 BR Alex Update in the demo have use freetype method of iterating char[n] through the string anyone wondered why utf8 fonts did not show have change the method to using Get Code point from utf 8 then i find the problem if a char is two or more bytes wide then the char will iter forward * number of bytes Ā will show in the terminal a Ā?
Hence = bug now changing to method of iterating used in other libs xterm with ttf fonts pick of bug fixes :: + now implements advance algo for separation when using UTF8 Job now 100% Attachments:
|
|
|
Post by alexfish on Jul 16, 2019 11:45:26 GMT 1
Hi All Showing a Picky of final module font2sixel BR Alex Attachments:
|
|
|
Post by vovchik on Jul 16, 2019 16:19:46 GMT 1
Dear Alex,
Looks great!!!!
With kind regards, vovchik
|
|
|
Post by alexfish on Jul 19, 2019 19:46:13 GMT 1
Thanks Vovchik took some doing , although not best method it is the fastest. Now now testing the interface , did discover one big Nasty with some gtk vte + lx terms in short the method ; in One need all the info and have ability to catch width chars in the call getchar so PickY , the info shows all info and All utf8 This does not work in some terminal ? not going to go into the why's it is not Worth It. How ever now putting final bits together this is utf8 input + mouse controls that are use to find the info on MouseButton click event BR Alex The picky Attachments:
|
|
|
Post by alexfish on Jul 20, 2019 1:28:27 GMT 1
Hi All Now got All modules in place the libs now use lib curl lib tidy lib sixel lib freetype lib gpm << mouse control + method to block events hence all bits are now done in memory see screenshot BR Alex Attachments:
|
|
|
Post by vovchik on Jul 20, 2019 10:44:21 GMT 1
Dear Alex,
Very impressive, I must say!
With kind regards, vovchik
|
|
|
Post by alexfish on Jul 20, 2019 21:04:10 GMT 1
Dear Alex, Very impressive, I must say! With kind regards, vovchik Thanks getting sixel into the terminal with Terminal text proved a Tuffy pleased I be using lib gpm To block events and keep track of the ioctl etc; sequentially a real tuft nut to crack. Now I 'possible' see why some text mode browsers opt for separate screen to display the graphics; Those bits are now sorted from where I sit Will be busy as from Tomorrow, hence hope for libs to be updated next week-end BR Alex
|
|
|
Post by alexfish on Jul 21, 2019 17:06:46 GMT 1
Hi All Just a little update as can see now have lib-sixel working in memory. it be good and found out something amazing but can also be a pitta > Gifs yes can have web view in a terminal and if the view has a gif it will play There again I sat and Scratched My head on how to kill the loop , now need to look further I say Scratch , sinc was in middle of reading rpi blogs / re testing scroll back function where by can use middle scroll button to hold the view in place , and then scroll down or up while the page is loading then on the blogs site there someone playing with an object at quote And There I got stuck Sorted can add line like this in sixel status = sixel_encoder_setopt(encoder,'l',"disable"); if (SIXEL_FAILED(status)) { goto error; } Then will play gif once and rest of page will still load BR Alex Picky's Attachments:
|
|
|
Post by alexfish on Aug 4, 2019 17:48:58 GMT 1
Hi All
Back to reality::
in the models there was a method to transform tables :: general terms this bit is in most browser/text-browsers
in some cases the method is not perfect when dealing with the likes of this forum
so have had another shot at my original indexing method :: previous bits failed
and more so when tidy deprecated the method of find attributes by name::
to get around this one has to iterate through the attribute and if have value read it
anyway have got a success on latest attempt to index the colums and rows for all states :: I hope says he
algo wise not easy to place the indexing since now have to go through 3 recursive calls in one function
so here is proof, may not make sense since now need all info as mentioned above because of a deprecated.
in general terms the number enclosed in LEFT [] indicates the column position and those columns have width
so for instance there could be 6 columns per page width ,
and part of this forum output
[1] <div>id: wrapper:
[1] <div>id: banner-container: <div>role: banner-container: [1] <h2>id: banner: [1] <a>id: logo: <a>href: logo: [1] (1) <text>The BAsic CONverter Forum [2] <a>id: navigation-skip: <a>href: navigation-skip: <a>accesskey: navigation-skip: <a>class: navigation-skip: <a>title: navigation-skip: [1] (1) <text>Skip Navigation [3] [4] <a>href: #: <a>accesskey: #: <a>title: #: <a>onclick: #: [5] <div>id: navigation-menu: <div>class: navigation-menu: [1] [1] <a>class: state-active: <a>href: state-active: [1] (1) <text>Home [2] [1] <a>href: /help: [1] (1) <text>Help [3] [1] <a>href: /search: [1] (1) <text>Search [4] [1] <a>href: http://www.basic-converter.org: [2] <p>id: welcome: [1] (1) <text>Welcome Guest. Please [2] <a>href: https://login.proboards.com/login/3081746/1: [1] (1) <text>Login [3] (3) <text> or [4] <a>href: https://login.proboards.com/register/3081746: [1] (1) <text>Register [5] (5) <text>. [2] <div>id: navigation-tree:
[1] <div>class: nav-tree-wrapper: [1] <td>id: nav-tree-branch-0: <li>class: nav-tree-branch-0: [1] <div>itemscope: itemscope: <div>itemtype: itemscope: [1] <a>href: /: <a>itemprop: /: [2] <td>id: nav-tree-branch-1: <li>class: nav-tree-branch-1: [1] <div>itemscope: itemscope: <div>itemtype: itemscope: [1] <a>href: /: <a>itemprop: /: [2] <div>class: popup_html: [1] <td>class: nav-tree-cat-1: [1] <a>href: /#category-1: [2] <div>class: clear: [1] <td>class: nav-tree-board-5: [1] <a>href: http://basic-converter.proboards.com/board/5/news: [2] <div>class: clear: [2] <td>class: nav-tree-board-3: [1] <a>href: http://basic-converter.proboards.com/board/3/documentation: [2] <div>class: clear: [3] <td>class: nav-tree-board-2: [1] <a>href: http://basic-converter.proboards.com/board/2/code-projects: [2] <div>class: clear: [4] <td>class: nav-tree-board-4: [1] <a>href: http://basic-converter.proboards.com/board/4/troubleshooting-area: [2] <div>class: clear: [5] <td>class: nav-tree-board-1: [1] <a>href: http://basic-converter.proboards.com/board/1/bugs-features: [2] <div>class: clear:
[3] <div>id: ad1:
[4] <div>id: content: <div>role: content: [1] <a>name: category-1: <a>id: category-1: [2] <div>class: container boards:
[1] <div>class: title-bar bbcode:
[1] <div>class: title_wrapper: [1] [1] (1) <text>General [2] <div>class: content cap-bottom: [1] <tabel>class: list: <table>role: list: [1] [1] <th>class: icon: [2] <th>class: main: [1] (1) <text>Board [3] <th>class: threads: [1] (1) <text>Threads [4] <th>class: posts: [1] (1) <text>Posts [5] <th>class: latest last: [1] (1) <text>Last Post
a bit more work to do now as regards parsing the above to pure text
BR Alex
|
|
|
Post by alexfish on Aug 13, 2019 18:32:20 GMT 1
Hi All in with What is in the above post I had to do a bit more work to the table function hence have now got a Spanning function this was needed to try and get the bits into place as per this forum type html{framework} setup and it works in this kind of fashion, and algo wise easy to use' example code and terminal results below. in with that the front end is now recursive IE no need to drop a session menu wise option starts are Search (engine) Get (get site) File (local html) each loops around until type 'q' for quit then can use the Options again or q To exit the app links work by left double click to select and middle button click to pass to the stdin So getting there , still trying to sort final broken bits that appear in the tidy bits Where if have embedded tags esp in <li> <img> <a> </> hence here have added a callback function to find the main parent of the childs, now have the full line of text but need to format them, BR Alex the table bits :: this is done line by line since need to allow column formatting within the table/grid like this Forum cout << "Tables -------------------------------------------------------------------------\n\n"; Table(20,CENTER,"Headers-Centered,tab2,tab3 ,tab4",1);
Table(20,LEFT,"This,That,and,Bits",1);
Table(20,LEFT,"This,That,and,Bits",1);
Table(20,LEFT,"This,That,and,Bits",1);
Table(20,RIGHT,"ToTheRight,10,20,30",1)
cout << "\nSpanning Colmns ----------------------------------------------------------------\n"; // TableSpan is Right Aligned Table_Span(40,"Minty\n25.00") cout << "\n"; Table_Span(20,"More\nThen\nthan\nthis") cout << "\n"; Table_Span(10,"More\nThen\nthan\nthis\n\nTHAT\nWAS\nOK") cout << "\n"; Table_Span(20,"Less") cout << "\n"; // table formatting allows extending to the right , if bit set to 0. Table(20,RIGHT,"This,That,and,Bits",0);
Table_Span(8,"beyond\nthe\ntable") cout << "\n"; cout << "First bit"; Table_Span(15,"This bit") Table_Span(25,"And a bit More here") Table_Span(27,"And a bit More here") cout << "\n"; Test Results Tables -------------------------------------------------------------------------
Headers-Centered tab2 tab3 tab4 This That and Bits This That and Bits This That and Bits ToTheRight 10 20 30
Spanning Colmns ---------------------------------------------------------------- Minty 25.00 More Then than this More Then than this THAT WAS OK Less This That and Bits beyond the table First bit This bit And a bit More here And a bit More here
|
|
|
Post by alexfish on Aug 14, 2019 13:11:55 GMT 1
Hi All
Now have done the format[algo] that will at least sort this forum bits
what you see here is LESS the code to finally pass to the table/table_span
have trimed the bottom line
[1] The BAsic CONverter Forum [2] Skip Navigation [3] [4] Home [5] Help [6] Search [7] Goto the BaCon website Welcome Guest. Please [8] Login or [9] Register. [10] The BAsic CONverter Forum [11] Home [12] General [13] News [14] Documentation [15] Code Projects [16] Troubleshooting area [17] Bugs, features General Board Threads Posts Last Post [18] [19] News News and announcements Moderator: [20] Pjot 95 841 [21] BaCon 3.9.1 released by [22] Pjot Jul 28, 2019 7:05:15 GMT 1 [23] [24] Documentation - 1 Viewing Tutorials & demonstrations Moderator: [25] Pjot 132 1,840 [26] getting C STRUCTURES and C++ classes by [27] bigbass Aug 11, 2019 4:48:53 GMT 1 [28] [29] Code Projects Programs, challenges, competitions Moderator: [30] Pjot 207 4,350 [31] html2text (c++) by [32] alexfish Aug 13, 2019 18:32:20 GMT 1 [33] [34] Troubleshooting area Problems, issues, tips & tricks Moderator: [35] Pjot 394 2,891 [36] HUG to display their widgets in the web browser (broadwayd) by [37] bigbass Jul 5, 2019 17:16:51 GMT 1 [38] [39] Bugs, features Report a bug, request a feature Moderator: [40] Pjot 241 2,284 [41] cancat error in <> camparison. by [42] bigbass Aug 11, 2019 0:23:17 GMT 1 Legend [43] New Posts [44] No New Posts Forum Information & Statistics
[45] Threads and Posts Total Threads: 1,069 Total Posts: 12,206 Last Updated: [46] html2text (c++) by [47] alexfish ( Aug 13, 2019 18:32:20 GMT 1 ) [48] Recent Threads - [49] Recent Posts - [50] RSS Feed [51] Members Total Members: 205 Newest Member: [52] phebus33 Most Users Online: 144 ( Aug 22, 2013 23:04:29 GMT 1 ) [53] View today's birthdays
[54] Users Online 0 Staff, 0 Members, 3 Guests.
[55] Users Online in the Last 24 Hours 1 Staff, [56] 2 Members, 132 Guests. [57] vovchik, [58] alexfish, [59] Pjot [60] Click here to remove banner ads from this forum. This Forum Is Hosted For FREE By [61] ProBoards Get Your Own [62] Free Forum ! [63] Terms of Service |
BR Alex
|
|
|
Post by alexfish on Aug 14, 2019 18:37:05 GMT 1
And So to find where to cut example of bits from above with the back looking to parent Nodes <tr> <td> [51] <img> <td> <table> <tbody> <tr> <th> Members <tr> <td> Total Members: 205 <tr> <td> Newest Member: [52] <a> phebus33 <tr> <td> Most Users Online: 144 <span> ( <abbr> Aug 22, 2013 23:04:29 GMT 1 ) <tr> <td> [53] <a> View today's birthdays <tr> <td> <table> <tr> <td> [54] <img> <td> <table> <tbody> <tr> <th> Users Online <tr> <td> 0 Staff, 0 Members, 3 Guests. <tr> <td> <tr> <td> <table> <tr> <td> [55] <img> <td> <table> <tbody> <tr> <th> Users Online in the Last 24 Hours <tr> <td> 1 Staff, [56] <a> 2 Members, 132 Guests. <tr> <td> [57] <a> vovchik, [58] <a> alexfish, [59] <a> Pjot <div> <iframe> <script> <iframe> <script> <footer> <div> [60] <a> Click here to remove banner ads from this forum . ?? say in bottom line there is a <div> node so Peter <Pjot> will be end of line, by same token the iframe and footer have back tested google search and youtube + the bacon web site .. all ok there the link number scheme works ok as well , have been testing youtube + have been updating the other formatting bits as well as the table and spanning methods + method of using widechars for certain bits ?? results & now ready for the actual table / span & formating
[1] The BAsic CONverter Forum [2] Skip Navigation [3]
[4] Home [5] Help [6] Search [7] Goto the BaCon website Welcome Guest. Please [8] Login or [9] Register.
[10] The BAsic CONverter Forum [11] Home
[12] General
[13] News [14] Documentation [15] Code Projects [16] Troubleshooting area [17] Bugs, features
General
Board Threads Posts Last Post [18] [19] News News and announcements Moderator: [20] Pjot 95 841 [21] BaCon 3.9.1 released by [22] Pjot Jul 28, 2019 7:05:15 GMT 1 [23] [24] Documentation - 1 Viewing Tutorials & demonstrations Moderator: [25] Pjot 132 1,840 [26] getting C STRUCTURES and C++ classes by [27] bigbass Aug 11, 2019 4:48:53 GMT 1 [28] [29] Code Projects Programs, challenges, competitions Moderator: [30] Pjot 207 4,350 [31] html2text (c++) by [32] alexfish Aug 13, 2019 18:32:20 GMT 1 [33] [34] Troubleshooting area Problems, issues, tips & tricks Moderator: [35] Pjot 394 2,891 [36] HUG to display their widgets in the web browser (broadwayd) by [37] bigbass Jul 5, 2019 17:16:51 GMT 1 [38] [39] Bugs, features Report a bug, request a feature Moderator: [40] Pjot 241 2,284 [41] cancat error in <> camparison. by [42] bigbass Aug 11, 2019 0:23:17 GMT 1
Legend
[43] New Posts [44] No New Posts
Forum Information & Statistics
[45] Threads and Posts Total Threads: 1,069 Total Posts: 12,206 Last Updated: [46] html2text (c++) by [47] alexfish ( Aug 13, 2019 18:32:20 GMT 1 ) [48] Recent Threads - [49] Recent Posts - [50] RSS Feed [51] Members Total Members: 205 Newest Member: [52] phebus33 Most Users Online: 144 ( Aug 22, 2013 23:04:29 GMT 1 ) [53] View today's birthdays
[54] Users Online 0 Staff, 0 Members, 3 Guests.
[55] Users Online in the Last 24 Hours 1 Staff, [56] 2 Members, 132 Guests. [57] vovchik, [58] alexfish, [59] Pjot
[60] Click here to remove banner ads from this forum.
This Forum Is Hosted For FREE By [61] ProBoards Get Your Own [62] Free Forum ! [63] Terms of Service | [64] Privacy | [65] Cookies | [66] FTC Disclosure | [67] Report Abuse | [68] Report Ad | [69] Consent BR Alex
|
|
|
Post by vovchik on Aug 14, 2019 21:25:59 GMT 1
Dear Alex,
Good going. Hope to see some code whenever you are ready to post it.
With kind regards, vovchik
|
|
|
Post by alexfish on Aug 15, 2019 19:29:52 GMT 1
Dear Alex, Good going. Hope to see some code whenever you are ready to post it. With kind regards, vovchik Hi Vovchik Not far away in some terms , html5 is like a long 'winding tube' with LOTS of Spikes on the inside and those spikes can be different but mean the same and very costly in terms of data usage esp when some of that info is packed in several css files and thousand's of lines called 'script" did not that can have 5,000 line of code to digest & end result can be a few as 50 lines of useful info; Well that's my Gripe of the day gone here trying to get away with Minimal: blagh so on final bits of getting the bits out of the above bits:: re table and spans now got the algo working to sort the table if have paragraphs an br tags in them here is sample output of work in progress <tr><td><img> [18] <td><span><a> [19] News <br><p>News and announcements <p>Moderator: <a> [20] Pjot <td>95 <td>841 <td><a> [21] BaCon 3.9.1 released <br>by <a> [22] Pjot <br><span><abbr>Jul 28, 2019 7:05:15 GMT 1 = row0 col 0: [18] row0 col 1:[19] News row1 col 1: row2 col 1:News and announcements row3 col 1:Moderator: [20] Pjot row0 col 1:95 row0 col 2:841 row0 col 3:[21] BaCon 3.9.1 released row1 col 3:by [22] Pjot row2 col 3:Jul 28 row0 col 3: 2019 7:05:15 GMT 1 the weekend is nearly here so think in terms of code example , about 10 days away, Thanks again BR Alex
|
|
|
Post by alexfish on Aug 15, 2019 19:50:59 GMT 1
Further to the above not that it appears in true table format two items appear in one column but if apply true logic in table form the on of the bits falls out of Scope as here row0 col 0: [18] row0 col 1:[19] News row1 col 1: row2 col 1:News and announcements row3 col 1:Moderator: [20] Pjot row0 col 2:95 row0 col 3:841 row0 col 4:[21] BaCon 3.9.1 released row1 col 4:by [22] Pjot row2 col 4:Jul 28 row0 col 5: 2019 7:05:15 GMT 1
<< THIS BIT So some html push that last bit to the bottom of the results IE Example of a often use html2text [Terms of Service](https://www.proboards.com/tos) | [Privacy](https://www.proboards.com/privacy "Privacy") | [Cookies](https://www.proboards.com/privacy#cookies "Cookies") | [FTC Disclosure](http://www.viglink.com/policies/ftc) | [Report Abuse](https://www.proboards.com/report-abuse) | Report Ad | Consent
*[Jul 5, 2019 17:16:51 GMT 1]: Jul 5, 2019 17:16:51 GMT 1 *[Aug 22, 2013 23:04:29 GMT 1]: Aug 22, 2013 23:04:29 GMT 1 *[Aug 13, 2019 18:32:20 GMT 1]: Aug 13, 2019 18:32:20 GMT 1 *[Aug 11, 2019 4:48:53 GMT 1]: Aug 11, 2019 4:48:53 GMT 1 *[Aug 11, 2019 0:23:17 GMT 1]: Aug 11, 2019 0:23:17 GMT 1 *[Jul 28, 2019 7:05:15 GMT 1]: Jul 28, 2019 7:05:15 GMT 1 so hoping the above Algo is correct in terms that one of bits is spanned and then further to need to apply method to separate the two bits that appear to be joined BR Alex
|
|