works_ feb 01, 2025, 13058 bytes
* convert html2text output text
to plain text table using emacs 29
* assumptions
* emacs version 29
* output contains "|"
* convert html table to plain text
html2text -width 500 -nobs -utf8 -o table.txt table.html
* remove all [ _ ] "underscores"
from table.txt file
* open table.txt in emacs
* select entire text
* execute command:
M-x table-capture
* use defaults except for
* column delimiter: |
* row delimiter: ctrl + o
* voila plain text table is created
* finally, execute command:
M-x table-unrecognize
* proof
* table.html
Characteristic |
Category |
Percentage |
Mean |
Standard deviation |
Age |
Young age(< 35) |
41.30 |
41.96 |
13.32 |
Middle age(36-50) |
36.96 |
Old age(> 50) |
21.74 |
Education |
Illiterate |
26.09 |
5.75 |
4.30 |
Primary level (I-V) |
26.09 |
Higher secondary (VI-XII) |
43.47 |
Higher education (under graduate/ Post graduate) |
4.35 |
Family size |
Small (up to 4 member) |
32.61 |
6.6 |
3.20 |
Medium (5 to 7) |
50.00 |
Large (more than 7) |
17.39 |
Homegarden size (ha) |
Small (<0.002) |
39.13 |
0.011 |
0.0012 |
Medium (0.003-0.006) |
26.17 |
Large (>0.01) |
34.78 |
Knowledge about homegarden |
Poor (upto 10) |
45.65 |
– |
– |
Good (10-20) |
50.00 |
Excellent (above 21) |
4.35 |
* table.txt
_______________________________________________________________________________________________________________
|_________Characteristic___|______________________________Category__________|Percentage|Mean_|Standard_deviation|
| Age |________________________Young_age(<_35)_________|___41.30__|41.96| 13.32 |
| |_______________________Middle_age(36-50)________|___36.96__| | |
|__________________________|__________________________Old_age(>_50)_________|___21.74__|_____|__________________|
| Education |____________________________Illiterate__________|___26.09__|5.75 | 4.30 |
| |_____________________Primary_level_(I-V)________|___26.09__| | |
| |_________________Higher_secondary_(VI-XII)______|___43.47__| | |
|__________________________|Higher_education_(under_graduate/_Post_graduate)|____4.35__|_____|__________________|
| Family size |___________________Small_(up_to_4_member)_______|___32.61__| 6.6 | 3.20 |
| |________________________Medium_(5_to_7)_________|___50.00__| | |
|__________________________|_____________________Large_(more_than_7)________|___17.39__|_____|__________________|
| Homegarden size (ha) |________________________ _Small_(<0.002)________|___39.13__|0.011| 0.0012 |
| |_____________________Medium_(0.003-0.006)_______|___26.17__| | |
|__________________________|__________________________Large_(>0.01)_________|___34.78__|_____|__________________|
|Knowledge about homegarden|_________________________Poor_(upto_10)_________|___45.65__| – | – |
| |___________________________Good_(10-20)_________|___50.00__| | |
|__________________________|_____________________Excellent_(above_21)_______|____4.35__|_____|__________________|
* table.txt with removed underscores
|Characteristic|Category|Percentage|Mean|Standarddeviation|
| Age |Youngage(<35)|41.30|41.96| 13.32 |
| |Middleage(36-50)|36.96| | |
||Oldage(>50)|21.74|||
| Education |Illiterate|26.09|5.75 | 4.30 |
| |Primarylevel(I-V)|26.09| | |
| |Highersecondary(VI-XII)|43.47| | |
||Highereducation(undergraduate/Postgraduate)|4.35|||
| Family size |Small(upto4member)|32.61| 6.6 | 3.20 |
| |Medium(5to7)|50.00| | |
||Large(morethan7)|17.39|||
| Homegarden size (ha) | Small(<0.002)|39.13|0.011| 0.0012 |
| |Medium(0.003-0.006)|26.17| | |
||Large(>0.01)|34.78|||
|Knowledge about homegarden|Poor(upto10)|45.65| – | – |
| |Good(10-20)|50.00| | |
||Excellent(above21)|4.35|||
* plain text table created with emacs 29
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Characteristic |Category |Percentage |Mean |Standard deviation |
| | | | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Age |Young age (<35) |41.30 |41.96 |13.32 |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Middle age (36-50) |36.96 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Old age (>50) |21.74 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Education |Illiterate |26.09 |5.75 |4.30 |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Primary level (I-V) |26.09 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Higher secondary (VI-XII) |43.47 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Higher education (undergraduate/Postgraduate) |4.35 | | |
| | | | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Family size |Small (upto 4 member) |32.61 |6.6 |3.20 |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Medium (5 to 7) |50.00 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Large (more than 7) |17.39 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Homegarden size (ha) |Small (<0.002) |39.13 |0.011 |0.0012 |
| | | | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Medium (0.003-0.006) |26.17 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Large (>0.01) |34.78 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
|Knowledge about homegarden |Poor (upto 10) |45.65 |– |– |
| | | | | |
| | | | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Good (10-20) |50.00 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
| |Excellent (above 21) |4.35 | | |
+---------------------------+----------------------------------------------+------------+---------+-------------------+
end