Last modified: 2014-01-03 16:25:50 UTC
This issue was converted from https://jira.toolserver.org/browse/DRTRIGON-88. Summary: Enable Beautiful Soup power for Subster Issue type: New Feature - A new feature of the product, which has yet to be developed. Priority: Major Status: Closed Assignee: drtrigon <dr.trigon@surfeu.ch> ------------------------------------------------------------------------------- From: drtrigon <dr.trigon@surfeu.ch> Date: Wed, 23 Feb 2011 20:13:19 ------------------------------------------------------------------------------- Introduce a template parameter like e.g. 'beautifulsoup=True' to switch to mode where all tag become: <!--SUBSTER-BS:html.head.title.contents--><!--SUBSTER-BS:html.head.title.contents--> and their content get replaced with the data retrieved from: eval("BeautifulSoup().html.head.title.contents") which means the text after 'BS:' gets executed as python code (more or less). Attention for violent code intrusion... ![][1] [1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif
------------------------------------------------------------------------------- From: drtrigon <dr.trigon@surfeu.ch> Date: Tue, 19 Jul 2011 12:15:53 ------------------------------------------------------------------------------- Simple code intrusion with ';' is not possible as it seams (which is good): > Traceback (most recent call last): File "test.py", line 774, in <module> print eval('BeautifulSoup.BeautifulSoup(a).%s' % item[1]) File "<string>", line 1 BeautifulSoup.BeautifulSoup(a).body; print 'hallo' ^ SyntaxError: invalid syntax But there are some points to consider, though: http://lybniz2.sourceforge.net/safeeval.html
------------------------------------------------------------------------------- From: drtrigon <dr.trigon@surfeu.ch> Date: Tue, 19 Jul 2011 12:18:09 ------------------------------------------------------------------------------- Code done in r129. Some first tests in http://de.wikipedia.org/w/index.php?title=Benutzer:DrTrigon/Spielwiese&diff=91416840&oldid=91416714
------------------------------------------------------------------------------- From: drtrigon <dr.trigon@surfeu.ch> Date: Tue, 19 Jul 2011 12:21:19 ------------------------------------------------------------------------------- As mentioned: code done in r129. The feature is not documented yet because in testing stage only. If it works well, it has to be documented and included into 'substersim.py'.
This bug was imported as RESOLVED. The original assignee has therefore not been set, and the original reporters/responders have not been added as CC, to prevent bugspam. If you re-open this bug, please consider adding these people to the CC list: Original assignee: dr.trigon@surfeu.ch CC list: dr.trigon@surfeu.ch