½ºÆ®¸® ±×·¥ ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Chris Withers
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://secure.simplistix.co.uk/
½ºÆ®¸® ±×·¥ ű×
½ºÆ®¸® ±×·¥ ¼³¸í
½ºÆ®¸³ - ¿À - ±×·¥ HTML º¯È¯ ¶óÀ̺귯¸® StriprogramÀº PythonÀ¸·Î ÀÛ¼ºµÈ Strip-O-Gram HTML º¯È¯ ¶óÀ̺귯¸®ÀÔ´Ï´Ù. ÀÌ´Â HTMLÀ» ÀÏ¹Ý ÅؽºÆ®·Î º¯È¯ÇÏ°í HTML¿¡¼ ÁöÁ¤µÈ ű׸¦ Á¦°ÅÇÏ´Â ¶óÀ̺귯¸®ÀÔ´Ï´Ù. ÆÄÀ̽ãÀÇ °æ¿ì Stripogram ÆÐÅ°Áö¸¦ PythonPathÀÇ ¸ðµç Æú´õ·Î º¹»çÇϱ⠸¸ÇϸéµË´Ï´Ù. Distutils°¡ ÀÖ½À´Ï´Ù. TarballÀ» ¾ÐÃà ÇØÁ¦ÇÏ´Â µð·ºÅ丮¿¡¼ ´ÙÀ½À» ½ÇÇàÇÏ¿© ¼³Ä¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. Zopethe Stripogram ÆÐÅ°Áö¸¦À§ÇÑ Python Setup.py ¼³Ä¡ ¼³Ä¡¸¦ Zope Á¦Ç°À¸·Î »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ·¸°ÔÇÏ·Á¸é Zope Á¦Ç° µð·ºÅ丮¿¡ ÆÐÅ°Áö¸¦ ³õ°í Zope¸¦ ´Ù½Ã ½ÃÀÛÇϽʽÿÀ. NB : Zope Á¦Ç°À¸·Î ½ºÆ®¸³ -O-gramÀ» »ç¿ëÇÒ ¶§ 'Stripogram'À» 'Products.Stripogram'Usage (stripogram °¡Á® ¿À±â)¿¡¼ html2text, html2safehtml # dodgy html #ÀÇ µ¢¾î¸®·Î , , ,
¹× ÅÂ±× myLumpOfcoolCleanCollectedHTML = html2safehtml (myLumpOfDodgyHtml, valid_tags = ( 'b', 'a', 'i', 'br', 'p')) # ű׸¦ ó¸®ÇÏÁö ¸¶½Ê½Ã¿À. 4 °³ÀÇ °ø¹é #¿Í 80 ÀÚÀÇ ÆäÀÌÁö¸¦ µé¿© ¾²±â¸¦ »ç¿ëÇϽʽÿÀ. myLumpoftext = html2text (myLumpOfCoolCleanCollectedHtml, ignore_tags = ( 'img',), indent_width = 4, page_width = 80) ÀÛµ¿ÇÏ´Â ¹æ¹ý¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¿øÇÏ´Â °æ¿ì ¼Ò½º¸¦ ÀÐÀ¸½Ê½Ã¿À. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
½ºÆ®¸® ±×·¥ °ü·Ã ¼ÒÇÁÆ®¿þ¾î