You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(15) |
Oct
(21) |
Nov
(18) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(43) |
Feb
(35) |
Mar
(78) |
Apr
(65) |
May
(163) |
Jun
(169) |
Jul
(137) |
Aug
(77) |
Sep
(47) |
Oct
(27) |
Nov
(43) |
Dec
(68) |
2004 |
Jan
(61) |
Feb
(39) |
Mar
(11) |
Apr
(42) |
May
(86) |
Jun
(82) |
Jul
(24) |
Aug
(26) |
Sep
(37) |
Oct
(62) |
Nov
(131) |
Dec
(43) |
2005 |
Jan
(31) |
Feb
(56) |
Mar
(65) |
Apr
(165) |
May
(106) |
Jun
(97) |
Jul
(65) |
Aug
(150) |
Sep
(78) |
Oct
(115) |
Nov
(41) |
Dec
(26) |
2006 |
Jan
(50) |
Feb
(39) |
Mar
(56) |
Apr
(67) |
May
(89) |
Jun
(68) |
Jul
(116) |
Aug
(65) |
Sep
(58) |
Oct
(103) |
Nov
(28) |
Dec
(52) |
2007 |
Jan
(92) |
Feb
(60) |
Mar
(124) |
Apr
(96) |
May
(69) |
Jun
(79) |
Jul
(25) |
Aug
(22) |
Sep
(7) |
Oct
(17) |
Nov
(27) |
Dec
(32) |
2008 |
Jan
(57) |
Feb
(87) |
Mar
(51) |
Apr
(43) |
May
(56) |
Jun
(62) |
Jul
(25) |
Aug
(82) |
Sep
(58) |
Oct
(42) |
Nov
(38) |
Dec
(86) |
2009 |
Jan
(50) |
Feb
(33) |
Mar
(84) |
Apr
(90) |
May
(109) |
Jun
(37) |
Jul
(22) |
Aug
(51) |
Sep
(93) |
Oct
(86) |
Nov
(31) |
Dec
(62) |
2010 |
Jan
(33) |
Feb
(57) |
Mar
(62) |
Apr
(43) |
May
(30) |
Jun
(49) |
Jul
(20) |
Aug
(40) |
Sep
(152) |
Oct
(38) |
Nov
(15) |
Dec
(32) |
2011 |
Jan
(29) |
Feb
(25) |
Mar
(65) |
Apr
(45) |
May
(27) |
Jun
(11) |
Jul
(14) |
Aug
(8) |
Sep
(13) |
Oct
(117) |
Nov
(60) |
Dec
(19) |
2012 |
Jan
(23) |
Feb
(32) |
Mar
(24) |
Apr
(41) |
May
(56) |
Jun
(24) |
Jul
(15) |
Aug
(11) |
Sep
(26) |
Oct
(21) |
Nov
(12) |
Dec
(31) |
2013 |
Jan
(32) |
Feb
(24) |
Mar
(39) |
Apr
(44) |
May
(44) |
Jun
(8) |
Jul
(9) |
Aug
(12) |
Sep
(34) |
Oct
(19) |
Nov
(5) |
Dec
(9) |
2014 |
Jan
(22) |
Feb
(12) |
Mar
(7) |
Apr
(2) |
May
(13) |
Jun
(17) |
Jul
(8) |
Aug
(10) |
Sep
(7) |
Oct
(4) |
Nov
|
Dec
(39) |
2015 |
Jan
(13) |
Feb
(12) |
Mar
(12) |
Apr
(40) |
May
(5) |
Jun
(22) |
Jul
(3) |
Aug
(42) |
Sep
(5) |
Oct
(10) |
Nov
|
Dec
(10) |
2016 |
Jan
(9) |
Feb
(43) |
Mar
(5) |
Apr
(14) |
May
(17) |
Jun
(5) |
Jul
(5) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(4) |
Dec
(18) |
2017 |
Jan
(28) |
Feb
(29) |
Mar
(9) |
Apr
(23) |
May
(48) |
Jun
(5) |
Jul
(32) |
Aug
(9) |
Sep
(13) |
Oct
(13) |
Nov
(6) |
Dec
(4) |
2018 |
Jan
(6) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
(5) |
Jun
(17) |
Jul
(12) |
Aug
(15) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
(6) |
Mar
(3) |
Apr
(5) |
May
(10) |
Jun
(6) |
Jul
(6) |
Aug
|
Sep
(11) |
Oct
(18) |
Nov
(10) |
Dec
(7) |
2020 |
Jan
(3) |
Feb
(14) |
Mar
(2) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(1) |
Aug
(11) |
Sep
(8) |
Oct
|
Nov
(1) |
Dec
(14) |
2021 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
(8) |
May
(23) |
Jun
(7) |
Jul
(10) |
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(10) |
Dec
(2) |
2022 |
Jan
|
Feb
(21) |
Mar
|
Apr
(3) |
May
(7) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
(18) |
Feb
|
Mar
(1) |
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
2025 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(3) |
Jun
(6) |
Jul
(22) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Dariusz S. <dsuch-docutils@m.zato.io> - 2015-03-06 14:16:27
|
On 06/03/15 15:11, jay gray | gmail wrote: > Try unicode. > For example I use this: > .. |_| unicode:: 0x80 > To insert a trimmed space. > > For example: word |_| word. > The builder will replace |_| with the specified Unicode symbol (a trimmed space). > A good technique is to build a unicode symbols table (either a .rst or a .txt file), then use the insert directive (via epilog) to > insert the table at the end of every file. > Then you don't have to worry about adding the declaration every time you create a new page. Hi Jay, thanks for the tip - I'll give it a go, I wasn't aware of this approach. cheers, -- Dariusz Suchojad https://zato.io ESB, SOA, REST, APIs and Cloud Integrations in Python |
From: Dariusz S. <dsuch-docutils@m.zato.io> - 2015-03-06 13:18:47
|
Hello, I'm on docutils 0.12 and I'm having a bit of difficulties with making links containing characters in Chinese to work. Consider the example over here converted to HTML using rst2html .. https://zato.io/support/docutils/link-cn.txt https://zato.io/support/docutils/link-cn.html .. which works as expected as long as the contents in ``_ is within ASCII but fails as soon as Chinese copy is included. Will appreciate any assistance on that front - it's difficult to use Chinese texts and docutils without the feature. cheers, -- Dariusz Suchojad https://zato.io ESB, SOA, REST, APIs and Cloud Integrations in Python |
From: Doug H. <do...@do...> - 2015-02-17 14:07:37
|
> On Feb 16, 2015, at 11:45 PM, Ben Finney <ben...@be...> wrote: > > David Goodger <go...@py...> writes: > >> On Mon, Feb 16, 2015 at 11:47 AM, Alistair Lynn >> <al...@st...> wrote: >>> Currently, docutils on PyPI only has the source distribution. Is >>> there any possibility that wheels for Python 2 and Python 3 could >>> appear there as well? >> >> Sure, there's a possibility. Somebody just has to be interested enough >> and have enough time to do it. > > Making the wheel distributions appear at the Docutils site would need > authorisation to upload them, right? > > Who has that authority, and what would that person need to do to permit > upload of a new type of distribution? They need to be added as a maintainer on PyPI. The site recognizes wheel files automatically, so nothing else needs to be changed. Doug > > I imagine it's the same as “whoever currently uploads an sdist”. So > someone from that set of people would need to be involved also in > uploading wheel distributions. > > -- > \ “I am the product of millions of generations of individuals who | > `\ each fought against a hostile universe and won, and I aim to | > _o__) maintain the tradition.” —Paul Z. Myers, 2009-09-12 | > Ben Finney > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |
From: Ben F. <ben...@be...> - 2015-02-17 04:45:50
|
David Goodger <go...@py...> writes: > On Mon, Feb 16, 2015 at 11:47 AM, Alistair Lynn > <al...@st...> wrote: > > Currently, docutils on PyPI only has the source distribution. Is > > there any possibility that wheels for Python 2 and Python 3 could > > appear there as well? > > Sure, there's a possibility. Somebody just has to be interested enough > and have enough time to do it. Making the wheel distributions appear at the Docutils site would need authorisation to upload them, right? Who has that authority, and what would that person need to do to permit upload of a new type of distribution? I imagine it's the same as “whoever currently uploads an sdist”. So someone from that set of people would need to be involved also in uploading wheel distributions. -- \ “I am the product of millions of generations of individuals who | `\ each fought against a hostile universe and won, and I aim to | _o__) maintain the tradition.” —Paul Z. Myers, 2009-09-12 | Ben Finney |
From: David G. <go...@py...> - 2015-02-16 18:56:55
|
On Mon, Feb 16, 2015 at 11:47 AM, Alistair Lynn <al...@st...> wrote: > Hi– > > Currently, docutils on PyPI only has the source distribution. Is there any possibility that wheels for Python 2 and Python 3 could appear there as well? > > The 2to3 process for installation in Python 3 means docutils can take a while to install, so having a wheel distribution would be very convenient for me, and probably others. Sure, there's a possibility. Somebody just has to be interested enough and have enough time to do it. I've heard of wheels, but I have no idea what is involved in producing them, and little interest or time. The infrastructure of Docutils, including the setup.py script, is all open. Patches are welcome. -- David Goodger <http://python.net/~goodger> |
From: Alistair L. <al...@st...> - 2015-02-16 18:14:22
|
Hi– Currently, docutils on PyPI only has the source distribution. Is there any possibility that wheels for Python 2 and Python 3 could appear there as well? The 2to3 process for installation in Python 3 means docutils can take a while to install, so having a wheel distribution would be very convenient for me, and probably others. Thanks Alistair |
From: Michael P. <mic...@gm...> - 2015-02-15 20:13:20
|
Thanks for drawing attention to PyLit. This looks like a great package -- Gunter do you intend to continue maintaining it? Michael On Sun, Feb 15, 2015 at 11:42 AM, Guenter Milde <mi...@us...> wrote: > On 2015-02-03, Mark Andrews wrote: > > > [-- Type: text/plain, Encoding: --] > > > (I asked the following question on stackoverflow two days ago. It has not > > been given any answers or even comments and very few views, so I was > hoping > > that it would ok to ask it again here.) > > > I would like to extract out the source code verbatim from code directives > > in a restructuredtext string. > > > What follows is my first attempt at doing this, but I would like to know > if > > there is a better (i.e. more robust, or more general, or more direct) way > > of doing it. > > > Let's say I have the following rst text as a string in python: > > > s = ''' > > > My title > >======== > > > Use this to square a number. > > > .. code:: python > > > def square(x): > > return x**2 > > > and here is some javascript too. > > > .. code:: javascript > > > foo = function() { > > console.log('foo'); > > } > > > ''' > > > To get the two code blocks, I could do > > > from docutils.core import publish_doctree > > > doctree = publish_doctree(s) > > source_code = [child.astext() for child in doctree.children if 'code' > > in child.attributes['classes']] > > > Now *source_code* is a list with just the verbatim source code from the > two > > code blocks. I could also use the *attributes* attribute of *child* to > find > > out the code types too, if necessary. > > > It does the job, but is there a better way? > > Looks plain and clean to me. If you are using Docutils anyway, then this is > the way to go. If you want to skip the overhead of parsing the complete > document just to extract code, you could also create a "minimal parser", > that just looks for ".. code::" (or maybe also literal blocks) and copies > the following indented block. (This is what PyLit does.) > > Günter > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > -- Michael G. Prisant <Mic...@gm...> |
From: Guenter M. <mi...@us...> - 2015-02-15 16:42:36
|
On 2015-02-03, Mark Andrews wrote: > [-- Type: text/plain, Encoding: --] > (I asked the following question on stackoverflow two days ago. It has not > been given any answers or even comments and very few views, so I was hoping > that it would ok to ask it again here.) > I would like to extract out the source code verbatim from code directives > in a restructuredtext string. > What follows is my first attempt at doing this, but I would like to know if > there is a better (i.e. more robust, or more general, or more direct) way > of doing it. > Let's say I have the following rst text as a string in python: > s = ''' > My title >======== > Use this to square a number. > .. code:: python > def square(x): > return x**2 > and here is some javascript too. > .. code:: javascript > foo = function() { > console.log('foo'); > } > ''' > To get the two code blocks, I could do > from docutils.core import publish_doctree > doctree = publish_doctree(s) > source_code = [child.astext() for child in doctree.children if 'code' > in child.attributes['classes']] > Now *source_code* is a list with just the verbatim source code from the two > code blocks. I could also use the *attributes* attribute of *child* to find > out the code types too, if necessary. > It does the job, but is there a better way? Looks plain and clean to me. If you are using Docutils anyway, then this is the way to go. If you want to skip the overhead of parsing the complete document just to extract code, you could also create a "minimal parser", that just looks for ".. code::" (or maybe also literal blocks) and copies the following indented block. (This is what PyLit does.) Günter |
From: Brecht M. <bre...@mo...> - 2015-02-13 21:11:16
|
Hello, I've also been thinking about figure and table numbering. Note that there's already the numfig Sphinx package that could prove useful: http://sourceforge.net/p/numfig/wiki/Home/ On 2015-02-12 13:52:12 +0000, engelbert gruber said: > * add numbering of things into docutils internally for all types/classes > * and let these numbers be accessible The builder should also have access to the element ID's, in case it wants to take care of numbering itself. This is already working well for section numbers. > example:: > > .. figure:: picture.png > :scale: 50 % > :alt: map to buried treasure > > Fig.# This is the caption of the figure (a simple paragraph). I would not include "Fig. #". The backend should add also the "Fig." part. Best regards, Brecht |
From: engelbert g. <eng...@gm...> - 2015-02-12 13:52:21
|
no advance made sorry my problem is 1. as reST to me still is a document format not a markup 2. i do not need it so the question is how to get the number information into the tree ? maybe: * add numbering of things into docutils internally for all types/classes * and let these numbers be accessible example:: .. figure:: picture.png :scale: 50 % :alt: map to buried treasure Fig.# This is the caption of the figure (a simple paragraph). * "#" would be replaced by docutils internal figure counter * how writers handle captions is their business * to get numbered equations would require :class: equations * to get unnumbered equations, use :class: unnumbered. as long as the caption does not contain "#" the numbering would not do any harm * a table-of-... would be necessary too AND BEFORE discussion a check of the sandboy latex-variant etal and sphinx is mandatory all the best On 11 February 2015 at 14:29, Andre-Patrick Bubel <ml...@an...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, > > On 07/03/2014 10:25 PM, Guenter Milde wrote: >> On 2014-06-26, Eduard Bopp wrote: >> >>> This enables enumeration and allows me to label and reference my >>> equations using raw LaTeX. While this solves my practical issue, >>> I think it's not exactly an elegant solution. Is there a more >>> straightforward and perhaps target-independent way to achieve >>> this? >> >> Not yet. Numbered equations are on the TODO list.¹ However, as >> there are more objects that may/can/should be numbered (formal >> tables, figures) this should become a generic solution which >> requires some thoughts and efforts. >> >> ¹ http://docutils.sourceforge.net/docs/dev/todo.html > > has there been made any progress on this? > > Andre Bubel > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQQcBAEBCAAGBQJU21lTAAoJEBGM58QktFcoh+8f/0TpqStHxW2XDTLlaDEe0gec > azaB8diYOqVlE+wSTDFAOUIIDkpYpXVqLeXnaEHwZ7L7KyBJ2dEVj30qkTlAj53m > ORWqQSH1Mp5derylHJbE3R8yiD8CIUK+BiNQ/oc88b1EZtF6D+SEcpAKkYtkPSsa > 1Qa7w33vZZcjSACRpZjagkGRT8NwhPDjsLgpEFJ986HnnRCaLwQNmb8Bt9fcWtOt > UEuDGQUScvHpfh0RrfADg5uF2vlabONQCjZ4EpXbRe66nKH82n5iDmVK0OI7lpZ7 > 9fKwWU2biAeqH7m88138/u+HX8lGI/9AflkzawO8O0Cw6xEYDGnbk/dMRFiUPvYh > 9fLPewqhu+xtIfkH7Z3HEWhz29zdqmIv/pzIGcjgak5IMat8KxGmzqXCtSr3r9Zc > Xf865npm4CxmSJO1qomZZ+kY/WZYf/0yJsmnDxuGeYmSyzOWVNKLmGqRgC+ihyuY > CZ1VBaanjtIllepSz4Is6PEG1WO5nh3ipcwC17X1SLVyzlj4mK/yTGQHsofVGlfh > YVZ/Q1zspow0IivYPzG3p7nSYud5VSMHAK2CYPg7vLlpc54YESUqRlDwqNIDj1Lz > jTg/dMQiZJCbrmmE7YfsKrTv4vaRicd9I+NEYhzcAWv3s7ybX8I58pw8LgBnUgv0 > RI09vdEn51GHPuRcja2kRbram71S7+LahjdGZGkl30Of6gZqNoKYqV+Y2hwNzp+O > mOvg200B0zWpbjGbmPWT1cYKWb7geFOCsfVbyL1tai4Ybu2FdbDgUm8V85lzgcKQ > hkyii5mT0JhJ5DqHpwO8SSoVtrInS7G7AdBcYycvhsapfo6Y7ZcfMoD4Vzwt0J5P > z1Stvv41BA2m4kmgDkJmxiUTPMrYQXYX7c5+GU3aUOpnQDCTfmox+cGk7Y29zoCN > u3aq0LE4Biee8Fl7pQwFmqlHA6kFQtzeFTbau5d0DYWAPjqeyFU0bv+9N82mRk5Z > 245yXp/vMiscTdQ2wUAtCwMUz9POY6REp3Vn3lIHwSZBh1FOb9lVD0CcNPXbrz7W > il3oLaPSSUnJ8n0O62qcJ/1WUD5Oi+bFn1jEbBZoJ7Yy78xOQEzkimXhyYoDrxrt > XofswIT3h2Qlh9j3jp1NAm5Kjb3zBI3NH6CKTS6arySm4IsxEODCD2yCydCffVDW > lxNq7iGXsIsOji/42Bvcch1ZcJdECbupKrIcqQT48bwx//C1O1gTs+GddAPvBxAI > /9sH0L+8mRo9ozWihGqWAU85tiGVrab8QJpO49ndUk1yyy6wXj/CeecGe8nHglc6 > O4BpNRNij5MIl4eKNPS8isSI04ZRQDDUJQ76v+Xg9RckAu1gb0lQj9Ra4jMG2/M= > =iYzd > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |
From: Andre-Patrick B. <ml...@an...> - 2015-02-11 13:35:16
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, On 07/03/2014 10:25 PM, Guenter Milde wrote: > On 2014-06-26, Eduard Bopp wrote: > >> This enables enumeration and allows me to label and reference my >> equations using raw LaTeX. While this solves my practical issue, >> I think it's not exactly an elegant solution. Is there a more >> straightforward and perhaps target-independent way to achieve >> this? > > Not yet. Numbered equations are on the TODO list.¹ However, as > there are more objects that may/can/should be numbered (formal > tables, figures) this should become a generic solution which > requires some thoughts and efforts. > > ¹ http://docutils.sourceforge.net/docs/dev/todo.html has there been made any progress on this? Andre Bubel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQQcBAEBCAAGBQJU21lTAAoJEBGM58QktFcoh+8f/0TpqStHxW2XDTLlaDEe0gec azaB8diYOqVlE+wSTDFAOUIIDkpYpXVqLeXnaEHwZ7L7KyBJ2dEVj30qkTlAj53m ORWqQSH1Mp5derylHJbE3R8yiD8CIUK+BiNQ/oc88b1EZtF6D+SEcpAKkYtkPSsa 1Qa7w33vZZcjSACRpZjagkGRT8NwhPDjsLgpEFJ986HnnRCaLwQNmb8Bt9fcWtOt UEuDGQUScvHpfh0RrfADg5uF2vlabONQCjZ4EpXbRe66nKH82n5iDmVK0OI7lpZ7 9fKwWU2biAeqH7m88138/u+HX8lGI/9AflkzawO8O0Cw6xEYDGnbk/dMRFiUPvYh 9fLPewqhu+xtIfkH7Z3HEWhz29zdqmIv/pzIGcjgak5IMat8KxGmzqXCtSr3r9Zc Xf865npm4CxmSJO1qomZZ+kY/WZYf/0yJsmnDxuGeYmSyzOWVNKLmGqRgC+ihyuY CZ1VBaanjtIllepSz4Is6PEG1WO5nh3ipcwC17X1SLVyzlj4mK/yTGQHsofVGlfh YVZ/Q1zspow0IivYPzG3p7nSYud5VSMHAK2CYPg7vLlpc54YESUqRlDwqNIDj1Lz jTg/dMQiZJCbrmmE7YfsKrTv4vaRicd9I+NEYhzcAWv3s7ybX8I58pw8LgBnUgv0 RI09vdEn51GHPuRcja2kRbram71S7+LahjdGZGkl30Of6gZqNoKYqV+Y2hwNzp+O mOvg200B0zWpbjGbmPWT1cYKWb7geFOCsfVbyL1tai4Ybu2FdbDgUm8V85lzgcKQ hkyii5mT0JhJ5DqHpwO8SSoVtrInS7G7AdBcYycvhsapfo6Y7ZcfMoD4Vzwt0J5P z1Stvv41BA2m4kmgDkJmxiUTPMrYQXYX7c5+GU3aUOpnQDCTfmox+cGk7Y29zoCN u3aq0LE4Biee8Fl7pQwFmqlHA6kFQtzeFTbau5d0DYWAPjqeyFU0bv+9N82mRk5Z 245yXp/vMiscTdQ2wUAtCwMUz9POY6REp3Vn3lIHwSZBh1FOb9lVD0CcNPXbrz7W il3oLaPSSUnJ8n0O62qcJ/1WUD5Oi+bFn1jEbBZoJ7Yy78xOQEzkimXhyYoDrxrt XofswIT3h2Qlh9j3jp1NAm5Kjb3zBI3NH6CKTS6arySm4IsxEODCD2yCydCffVDW lxNq7iGXsIsOji/42Bvcch1ZcJdECbupKrIcqQT48bwx//C1O1gTs+GddAPvBxAI /9sH0L+8mRo9ozWihGqWAU85tiGVrab8QJpO49ndUk1yyy6wXj/CeecGe8nHglc6 O4BpNRNij5MIl4eKNPS8isSI04ZRQDDUJQ76v+Xg9RckAu1gb0lQj9Ra4jMG2/M= =iYzd -----END PGP SIGNATURE----- |
From: engelbert g. <eng...@gm...> - 2015-02-11 12:53:04
|
that is a python3 problem not an encoding problem i removed .decode('latin-1').encode('utf-8') 1. latin1 as input is an assumption 2. changing the name without the reference , might break things 3. decode/encode should happen in docutils.io (IMHO) cheers On 11 February 2015 at 08:54, Jorge Scandaliaris <jor...@ya...> wrote: > Hi, > I found an old reference for this problem in Debian's bug tracker [1], where > it was mentioned that a solution was introduced in 0.11-1. I have the same > problem on 0.12 and python 3.4. I have manually applied the changes that I > found in [2] and the problem is solved here. Is it possible that the fix was > applied by Debian and not upstream? > > > Jorge > > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714313 > [2] http://sourceforge.net/p/docutils/patches/113/ > > Minimal example triggering the bug (copy/paste between ---, adapt to use an > existing image): > --------------------------------- > #### > Test > #### > > .. image:: images/test.png > ---------------------------------- > > Result: > > Traceback (most recent call last): > File "/usr/bin/rst2odt", line 29, in <module> > description=description) > File "/usr/lib/python3.4/site-packages/docutils/core.py", line 551, in > publish_cmdline_to_binary > config_section=config_section, enable_exit_status=enable_exit_status) > File "/usr/lib/python3.4/site-packages/docutils/core.py", line 219, in publish > output = self.writer.write(self.document, self.destination) > File "/usr/lib/python3.4/site-packages/docutils/writers/__init__.py", line > 80, in write > self.translate() > File > "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", > line 554, in translate > self.assemble_my_parts() > File > "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", > line 573, in assemble_my_parts > self.store_embedded_files(zfile) > File > "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", > line 598, in store_embedded_files > destination1 = destination.decode('latin-1').encode('utf-8') > AttributeError: 'str' object has no attribute 'decode > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. |
From: Jorge S. <jor...@ya...> - 2015-02-11 07:54:27
|
Hi, I found an old reference for this problem in Debian's bug tracker [1], where it was mentioned that a solution was introduced in 0.11-1. I have the same problem on 0.12 and python 3.4. I have manually applied the changes that I found in [2] and the problem is solved here. Is it possible that the fix was applied by Debian and not upstream? Jorge [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714313 [2] http://sourceforge.net/p/docutils/patches/113/ Minimal example triggering the bug (copy/paste between ---, adapt to use an existing image): --------------------------------- #### Test #### .. image:: images/test.png ---------------------------------- Result: Traceback (most recent call last): File "/usr/bin/rst2odt", line 29, in <module> description=description) File "/usr/lib/python3.4/site-packages/docutils/core.py", line 551, in publish_cmdline_to_binary config_section=config_section, enable_exit_status=enable_exit_status) File "/usr/lib/python3.4/site-packages/docutils/core.py", line 219, in publish output = self.writer.write(self.document, self.destination) File "/usr/lib/python3.4/site-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", line 554, in translate self.assemble_my_parts() File "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", line 573, in assemble_my_parts self.store_embedded_files(zfile) File "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/__init__.py", line 598, in store_embedded_files destination1 = destination.decode('latin-1').encode('utf-8') AttributeError: 'str' object has no attribute 'decode |
From: Mark A. <mja...@gm...> - 2015-02-03 11:54:07
|
(I asked the following question on stackoverflow two days ago. It has not been given any answers or even comments and very few views, so I was hoping that it would ok to ask it again here.) I would like to extract out the source code verbatim from code directives in a restructuredtext string. What follows is my first attempt at doing this, but I would like to know if there is a better (i.e. more robust, or more general, or more direct) way of doing it. Let's say I have the following rst text as a string in python: s = ''' My title ======== Use this to square a number. .. code:: python def square(x): return x**2 and here is some javascript too. .. code:: javascript foo = function() { console.log('foo'); } ''' To get the two code blocks, I could do from docutils.core import publish_doctree doctree = publish_doctree(s) source_code = [child.astext() for child in doctree.children if 'code' in child.attributes['classes']] Now *source_code* is a list with just the verbatim source code from the two code blocks. I could also use the *attributes* attribute of *child* to find out the code types too, if necessary. It does the job, but is there a better way? |
From: Andrew V. S. <st...@al...> - 2015-01-28 09:17:44
|
27.01.15 18:29, David Goodger пишет: > I'm not willing to download all the bits & pieces to try to guess > what's missing. Perhaps someone on the BRO or Pygments development > teams can help you out. > > -- David Goodger Thank you. BRO developer helped me ) Commit is https://github.com/bro/bro/commit/36bc7ba5b5d25cea881db22fb1a5bc2bc5fbc3e4 |
From: David G. <go...@py...> - 2015-01-27 15:30:10
|
I'm afraid there's not enough information there to help you much. The setup is using Sphinx, which uses Docutils, which uses Pygments. It doesn't seem to be a Docutils issue. Pygments raises an exception: "ClassNotFound: no lexer matching the text found". Unfortunately it doesn't tell you *what* text was found, or where. Pygments does code formatting/styling. I suspect that you're missing a formatter/styler for the specific language that Pygments is trying to process. In other words, you may be missing a piece of software (maybe a Pygments plugin) that is required. The output doesn't tell you what file it was processing when the error occurred. That would be useful information. I'm not willing to download all the bits & pieces to try to guess what's missing. Perhaps someone on the BRO or Pygments development teams can help you out. -- David Goodger On Tue, Jan 27, 2015 at 7:07 AM, Andrew V. Stepanov <st...@al...> wrote: > Hello. > > I need to make RPM package for BRO. > > https://www.bro.org/ > > I need to run in SPEC file: make doc > > But it fails with: > > Running Sphinx v1.3a0 > loading pickled environment... not yet created > building [html]: targets for 422 source files that are out of date > updating environment: 422 added, 0 changed, 0 removed > reading sources... [ 0%] broids/index > running test doc/sphinx/ftp-bruteforce.btest ... > reading sources... [ 0%] cluster/index > reading sources... [ 0%] components/binpac/README > > Exception occurred: > File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py", > line 252, in guess_lexer > raise ClassNotFound('no lexer matching the text found') > ClassNotFound: no lexer matching the text found > The full traceback has been saved in /usr/src/tmp/sphinx-err-5Cm0Xi.log, > if you want to report the issue to the developers. > > > Contents of /usr/src/tmp/sphinx-err-5Cm0Xi.log is: > > > # Sphinx version: 1.3a0 > # Python version: 2.7.8 > # Docutils version: 0.13 repository > # Jinja2 version: 2.8-dev > # Loaded extensions: > # rst_directive from > /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py > # bro from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/bro.py > # adapt-toc from > /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/adapt-toc.py > # sphinx.ext.todo from > /usr/lib/python2.7/site-packages/sphinx/ext/todo.pyc > # broxygen from > /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/broxygen.py > # btest-sphinx from > /usr/src/RPM/BUILD/bro-2.3.1/aux/btest/sphinx/btest-sphinx.pyc > Traceback (most recent call last): > File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 254, > in main > app.build(force_all, filenames) > File "/usr/lib/python2.7/site-packages/sphinx/application.py", line > 215, in build > self.builder.build_update() > File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", > line 214, in build_update > 'out of date' % len(to_build)) > File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", > line 234, in build > purple, length): > File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", > line 134, in status_iterator > for item in iterable: > File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line > 474, in update_generator > self.read_doc(docname, app=app) > File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line > 621, in read_doc > pub.publish() > File "/usr/lib/python2.7/site-packages/docutils/core.py", line 217, > in publish > self.settings) > File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", > line 72, in read > self.parse() > File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", > line 78, in parse > self.parser.parse(self.input, document) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", > line 172, in parse > self.statemachine.run(inputlines, document, inliner=self.inliner) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 170, in run > input_source=document['source']) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 239, in run > context, state, transitions) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 460, in check_line > return method(match, context, next_state) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2961, in text > self.section(title.lstrip(), source, style, lineno + 1, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 327, in section > self.new_subsection(title, lineno, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 395, in new_subsection > node=section_node, match_titles=True) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 282, in nested_parse > node=node, match_titles=match_titles) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 195, in run > results = StateMachineWS.run(self, input_lines, input_offset) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 239, in run > context, state, transitions) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 460, in check_line > return method(match, context, next_state) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2726, in underline > self.section(title, source, style, lineno - 1, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 327, in section > self.new_subsection(title, lineno, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 395, in new_subsection > node=section_node, match_titles=True) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 282, in nested_parse > node=node, match_titles=match_titles) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 195, in run > results = StateMachineWS.run(self, input_lines, input_offset) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 239, in run > context, state, transitions) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 460, in check_line > return method(match, context, next_state) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2726, in underline > self.section(title, source, style, lineno - 1, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 327, in section > self.new_subsection(title, lineno, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 395, in new_subsection > node=section_node, match_titles=True) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 282, in nested_parse > node=node, match_titles=match_titles) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 195, in run > results = StateMachineWS.run(self, input_lines, input_offset) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 239, in run > context, state, transitions) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 460, in check_line > return method(match, context, next_state) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2726, in underline > self.section(title, source, style, lineno - 1, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 327, in section > self.new_subsection(title, lineno, messages) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 395, in new_subsection > node=section_node, match_titles=True) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 282, in nested_parse > node=node, match_titles=match_titles) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 195, in run > results = StateMachineWS.run(self, input_lines, input_offset) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 239, in run > context, state, transitions) > File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", > line 460, in check_line > return method(match, context, next_state) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2299, in explicit_markup > nodelist, blank_finish = self.explicit_construct(match) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2311, in explicit_construct > return method(self, expmatch) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2054, in directive > directive_class, match, type_name, option_presets) > File > "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line > 2103, in run_directive > result = directive_instance.run() > File > "/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py", > line 138, in run > lexer = guess_lexer(content) > File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py", > line 252, in guess_lexer > raise ClassNotFound('no lexer matching the text found') > ClassNotFound: no lexer matching the text found > > $ rpm -q python-module-docutils > python-module-docutils-0.13-alt1.svn20140708 > > > https://github.com/bro/bro/tree/master/doc/components/binpac > https://github.com/bro/binpac/blob/master/README > > Could you please help me ? > > > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. -- David Goodger <http://python.net/~goodger> |
From: Alan G I. <ala...@gm...> - 2015-01-27 14:54:21
|
I ran into this bug again today: http://sourceforge.net/p/docutils/bugs/209/ Is there any hope that it will eventually be addressed? Thanks, Alan Isaac |
From: Andrew V. S. <st...@al...> - 2015-01-27 13:07:15
|
Hello. I need to make RPM package for BRO. https://www.bro.org/ I need to run in SPEC file: make doc But it fails with: Running Sphinx v1.3a0 loading pickled environment... not yet created building [html]: targets for 422 source files that are out of date updating environment: 422 added, 0 changed, 0 removed reading sources... [ 0%] broids/index running test doc/sphinx/ftp-bruteforce.btest ... reading sources... [ 0%] cluster/index reading sources... [ 0%] components/binpac/README Exception occurred: File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 252, in guess_lexer raise ClassNotFound('no lexer matching the text found') ClassNotFound: no lexer matching the text found The full traceback has been saved in /usr/src/tmp/sphinx-err-5Cm0Xi.log, if you want to report the issue to the developers. Contents of /usr/src/tmp/sphinx-err-5Cm0Xi.log is: # Sphinx version: 1.3a0 # Python version: 2.7.8 # Docutils version: 0.13 repository # Jinja2 version: 2.8-dev # Loaded extensions: # rst_directive from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py # bro from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/bro.py # adapt-toc from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/adapt-toc.py # sphinx.ext.todo from /usr/lib/python2.7/site-packages/sphinx/ext/todo.pyc # broxygen from /usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/broxygen.py # btest-sphinx from /usr/src/RPM/BUILD/bro-2.3.1/aux/btest/sphinx/btest-sphinx.pyc Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 254, in main app.build(force_all, filenames) File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 215, in build self.builder.build_update() File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 214, in build_update 'out of date' % len(to_build)) File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 234, in build purple, length): File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 134, in status_iterator for item in iterable: File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line 474, in update_generator self.read_doc(docname, app=app) File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line 621, in read_doc pub.publish() File "/usr/lib/python2.7/site-packages/docutils/core.py", line 217, in publish self.settings) File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 72, in read self.parse() File "/usr/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse self.parser.parse(self.input, document) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 172, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 170, in run input_source=document['source']) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2961, in text self.section(title.lstrip(), source, style, lineno + 1, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2726, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2726, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2726, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 327, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection node=section_node, match_titles=True) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run context, state, transitions) File "/usr/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line return method(match, context, next_state) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2299, in explicit_markup nodelist, blank_finish = self.explicit_construct(match) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2311, in explicit_construct return method(self, expmatch) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2054, in directive directive_class, match, type_name, option_presets) File "/usr/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2103, in run_directive result = directive_instance.run() File "/usr/src/RPM/BUILD/bro-2.3.1/build/doc/sphinx_input/ext/rst_directive.py", line 138, in run lexer = guess_lexer(content) File "/usr/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 252, in guess_lexer raise ClassNotFound('no lexer matching the text found') ClassNotFound: no lexer matching the text found $ rpm -q python-module-docutils python-module-docutils-0.13-alt1.svn20140708 https://github.com/bro/bro/tree/master/doc/components/binpac https://github.com/bro/binpac/blob/master/README Could you please help me ? |
From: Ben F. <ben...@be...> - 2015-01-08 06:38:18
|
David Goodger <go...@py...> writes: > On Wed, Jan 7, 2015 at 8:39 PM, Ben Finney <ben...@be...> wrote: > > What I'd like is for any code using this custom Writer, to get that > > behaviour by default (i.e. not need to even know about the > > ‘doctitle_xform’ option). Can the Writer take care of that option in > > such a way that the client code doesn't need to know about it? > > Yes, it can (just monkey-patch the settings object), but it shouldn't. Fair enough. I can understand it makes the API clearer. > Don't you have a front-end app? It should do the configuration. Well, the extra levels of indirection complicate my unit tests. But not hugely, and the result is still good. Thanks for the help. -- \ “I turned to speak to God/About the world's despair; But to | `\ make bad matters worse/I found God wasn't there.” —Robert Frost | _o__) | Ben Finney |
From: David G. <go...@py...> - 2015-01-08 03:26:33
|
On Wed, Jan 7, 2015 at 8:39 PM, Ben Finney <ben...@be...> wrote: > David Goodger <go...@py...> writes: > >> On Wed, Jan 7, 2015 at 7:52 PM, Ben Finney <ben...@be...> wrote: >> > Okay, that is a setting on the Publisher (and, according to the >> > docs, normally set by configuration file or command-line). >> > >> > For the task at hand (if it matters, I am transforming a changelog >> > document to structured release data), I want all the settings to be >> > internally managed. […] >> > >> > In order to modify that setting (‘doctitle_xform’), do I need to make a >> > custom Publisher class too? Or can I have the Writer somehow override >> > it? >> >> Just pass the configuration setting to the standard Publisher or >> convenience function: >> http://docutils.sourceforge.net/docs/api/publisher.html#configuration > > What I'd like is for any code using this custom Writer, to get that > behaviour by default (i.e. not need to even know about the > ‘doctitle_xform’ option). Can the Writer take care of that option in > such a way that the client code doesn't need to know about it? Yes, it can (just monkey-patch the settings object), but it shouldn't. Don't you have a front-end app? It should do the configuration. -- David Goodger <http://python.net/~goodger> |
From: Ben F. <ben...@be...> - 2015-01-08 02:40:01
|
David Goodger <go...@py...> writes: > On Wed, Jan 7, 2015 at 7:52 PM, Ben Finney <ben...@be...> wrote: > > Okay, that is a setting on the Publisher (and, according to the > > docs, normally set by configuration file or command-line). > > > > For the task at hand (if it matters, I am transforming a changelog > > document to structured release data), I want all the settings to be > > internally managed. […] > > > > In order to modify that setting (‘doctitle_xform’), do I need to make a > > custom Publisher class too? Or can I have the Writer somehow override > > it? > > Just pass the configuration setting to the standard Publisher or > convenience function: > http://docutils.sourceforge.net/docs/api/publisher.html#configuration What I'd like is for any code using this custom Writer, to get that behaviour by default (i.e. not need to even know about the ‘doctitle_xform’ option). Can the Writer take care of that option in such a way that the client code doesn't need to know about it? -- \ “Shepherds … look after their sheep so they can, first, fleece | `\ them and second, turn them into meat. That's much more like the | _o__) priesthood as I know it.” —Christopher Hitchens, 2008-10-29 | Ben Finney |
From: David G. <go...@py...> - 2015-01-08 02:29:35
|
On Wed, Jan 7, 2015 at 7:52 PM, Ben Finney <ben...@be...> wrote: > David Goodger <go...@py...> writes: > >> On Tue, Jan 6, 2015 at 11:20 PM, Ben Finney <ben...@be...> wrote: >> > What I want is: >> > >> > ===== >> > $ rst2pseudoxml < foo.txt >> > <document source="<stdin>"> >> > <section ids="first-section" names="first\ section"> >> > <title> >> > First Section >> > <paragraph> >> > Lorem ipsum, dolor sit amet. >> > ===== >> > >> > In fact, I'm accessing this document programmatically using a custom >> > Writer. How can I get the parsing result I want? >> >> http://docutils.sourceforge.net/docs/user/config.html#doctitle-xform > > Thanks. Okay, that is a setting on the Publisher (and, according to the > docs, normally set by configuration file or command-line). > > For the task at hand (if it matters, I am transforming a changelog > document to structured release data), I want all the settings to be > internally managed. > > So far I've only needed to make a custom Writer class and a custom > Translator class. Unit tests for those are already cumbersome; I would > really prefer not to need creating yet another custom class. > > In order to modify that setting (‘doctitle_xform’), do I need to make a > custom Publisher class too? Or can I have the Writer somehow override > it? Just pass the configuration setting to the standard Publisher or convenience function: http://docutils.sourceforge.net/docs/api/publisher.html#configuration -- David Goodger <http://python.net/~goodger> |
From: Ben F. <ben...@be...> - 2015-01-08 01:55:47
|
David Goodger <go...@py...> writes: > On Tue, Jan 6, 2015 at 11:20 PM, Ben Finney <ben...@be...> wrote: > > What I want is: > > > > ===== > > $ rst2pseudoxml < foo.txt > > <document source="<stdin>"> > > <section ids="first-section" names="first\ section"> > > <title> > > First Section > > <paragraph> > > Lorem ipsum, dolor sit amet. > > ===== > > > > In fact, I'm accessing this document programmatically using a custom > > Writer. How can I get the parsing result I want? > > http://docutils.sourceforge.net/docs/user/config.html#doctitle-xform Thanks. Okay, that is a setting on the Publisher (and, according to the docs, normally set by configuration file or command-line). For the task at hand (if it matters, I am transforming a changelog document to structured release data), I want all the settings to be internally managed. So far I've only needed to make a custom Writer class and a custom Translator class. Unit tests for those are already cumbersome; I would really prefer not to need creating yet another custom class. In order to modify that setting (‘doctitle_xform’), do I need to make a custom Publisher class too? Or can I have the Writer somehow override it? -- \ “Never express yourself more clearly than you are able to | `\ think.” —Niels Bohr | _o__) | Ben Finney |
From: David G. <go...@py...> - 2015-01-07 15:44:11
|
On Tue, Jan 6, 2015 at 11:20 PM, Ben Finney <ben...@be...> wrote: > Ben Finney <ben...@be...> writes: > >> But if the document has only one top-level section > > Sorry, I gave the wrong example. Here is an example that shows the > behaviour: > >> the special case applies and I don't get the sections as I want: >> >> ===== >> $ cat foo.txt >> First Section >> ============= >> >> Lorem ipsum, dolor sit amet. >> >> $ rst2pseudoxml < foo.txt >> <document ids="first-section" names="first\ section" source="<stdin>" title="First Section"> >> <title> >> First Section >> <paragraph> >> Lorem ipsum, dolor sit amet. >> ===== > > What I want is: > > ===== > $ rst2pseudoxml < foo.txt > <document source="<stdin>"> > <section ids="first-section" names="first\ section"> > <title> > First Section > <paragraph> > Lorem ipsum, dolor sit amet. > ===== > > In fact, I'm accessing this document programmatically using a custom > Writer. How can I get the parsing result I want? http://docutils.sourceforge.net/docs/user/config.html#doctitle-xform -- David Goodger <http://python.net/~goodger> |
From: Ben F. <ben...@be...> - 2015-01-07 05:21:48
|
Ben Finney <ben...@be...> writes: > But if the document has only one top-level section Sorry, I gave the wrong example. Here is an example that shows the behaviour: > the special case applies and I don't get the sections as I want: > > ===== > $ cat foo.txt > First Section > ============= > > Lorem ipsum, dolor sit amet. > > $ rst2pseudoxml < foo.txt > <document ids="first-section" names="first\ section" source="<stdin>" title="First Section"> > <title> > First Section > <paragraph> > Lorem ipsum, dolor sit amet. > ===== What I want is: ===== $ rst2pseudoxml < foo.txt <document source="<stdin>"> <section ids="first-section" names="first\ section"> <title> First Section <paragraph> Lorem ipsum, dolor sit amet. ===== In fact, I'm accessing this document programmatically using a custom Writer. How can I get the parsing result I want? -- \ “… a Microsoft Certified System Engineer is to information | `\ technology as a McDonalds Certified Food Specialist is to the | _o__) culinary arts.” —Michael Bacarella | Ben Finney |