Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 `Â_Uã@sŽdZdZddlZdZdZdZGdd„dƒZGd d „d eƒZd d „Zd d„Z e dkrŠe ej ƒdkrje eƒZ neej dƒZ ddlZeje ƒdS)aÇ .h1 Welcome to YAML! YAML is "Yet Another Markup Language" - a markup language which is easier to type in than XML, yet gives us a reasonable selection of formats. The general rule is that if a line begins with a '.', it requires special processing. Otherwise lines are concatenated to paragraphs, and blank lines separate paragraphs. If the line ".foo bar bletch" is encountered, it immediately ends and writes out any current paragraph. It then looks for a parser method called 'foo'; if found, it is called with arguments (bar, bletch). If this is not found, it assumes that 'foo' is a paragraph style, and the text for the first line of the paragraph is 'bar bletch'. It would be up to the formatter to decide whether on not 'foo' was a valid paragraph. Special commands understood at present are: dot image filename - adds the image to the document dot beginPre Code - begins a Preformatted object in style 'Code' dot endPre - ends a preformatted object. z3.3.0éNééõ·c@sXeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dS)Ú BaseParserzÊ"Simplest possible parser with only the most basic options. This defines the line-handling abilities and basic mechanism. The class YAMLParser includes capabilities for a fairly rich story.cCs |jƒdS)N)Úreset)Úself©rú3/tmp/tmp4i9tl1d3/lib64/python/reportlab/lib/yaml.pyÚ__init__9szBaseParser.__init__cCs"d|_d|_g|_g|_t|_dS)NrÚNormal)Ú_lineNoÚ_styleÚ_resultsÚ_bufÚPLAINÚ_mode)rrrr r<s zBaseParser.resetcCs<t|dƒjƒ}x|D]}|j|dd…ƒqW|jƒ|jS)NÚrréÿÿÿÿ)ÚopenÚ readlinesÚreadLineÚendParar)rÚfilenameÚdataÚlinerrr Ú parseFileCs  zBaseParser.parseFilecCs0|jdƒ}x|D]}|j|ƒqW|jƒ|jS)z+Parses the a possible multi-line text blockÚ )Úsplitrrr)rÚ textBlockÚlinesrrrr Ú parseTextMs   zBaseParser.parseTextc CsL|jd|_|jƒ}t|ƒdkrD|jtkr4|jƒn |jj|ƒ�n|ddk�r<|jƒ|dd…jƒ}|d|dd…}}t |j |ƒràyt ||ƒ|ŽWn>t k rÜ}z"t jjd||||jfƒ‚WYdd}~XnXnZ|jƒ|jddƒ}t|ƒdk�std|d|jfƒ‚|\}}|dd…|_|jj|ƒn |jj|ƒdS)NrrÚ.z%Parser method: %s(*%s) %s at line %d ú rzStyle %s but no data at line %d)r ÚlstripÚlenrrrrÚappendrÚhasattrÚ __class__ÚgetattrÚ TypeErrorÚsysÚstderrÚwriteÚAssertionErrorr ) rrÚstrippedÚwordsÚcmdÚargsÚerrZstyletagrrrr rUs.      $zBaseParser.readLinecCs\dj|jƒ}|rL|jtkr8|jjd|jdj|jƒfƒn|jjd|j|fƒg|_d|_dS)Nr"Ú PREFORMATTEDrZ PARAGRAPHr )Újoinrrr3rr%r )rÚtextrrr rzs   zBaseParser.endParacCst|_||_dS)N)r3rr )rZ stylenamerrr ÚbeginPreˆszBaseParser.beginPrecCs|jƒt|_dS)N)rrr)rrrr ÚendPreŒszBaseParser.endPrecCs|jƒ|jjd|fƒdS)NZIMAGE)rrr%)rrrrr Úimage�szBaseParser.imageN) Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrr rrr6r7r8rrrr r2s %rc@s0eZdZdZdd„Zdd„Zdd„Zdd „Zd S) ÚParserz[This adds a basic set of "story" components compatible with HTML & PDF. Images, spacescCs|jjd|fƒdS)zInserts a vertical spacerZVSpaceN)rr%)rZpointsrrr ÚvSpacešsz Parser.vSpacecCs|jjdƒdS)zInserts a frame breakÚ PageBreakÚblahN)r?r@)rr%)rrrr Ú pageBreakžszParser.pageBreakcCs|jƒ|jjd||fƒdS)z8Goes and gets the Python object and adds it to the storyZCustomN)rrr%)rZ moduleNameÚfuncNamerrr Úcustom¢sz Parser.customcCs|jjd|fƒdS)NZNextPageTemplate)rr%)rZ templateNamerrr ÚnextPageTemplate§szParser.nextPageTemplateN)r9r:r;r<r>rArCrDrrrr r=•s r=cCstƒ}|j|ƒS)N)r=r)rÚprrr rªsrcCstƒ}|j|ƒS)N)r=r )rrErrr r ®sr Ú__main__)r<Ú __version__r*rr3Z BULLETCHARrr=rr r9r$ÚargvÚresultsÚpprintrrrr Ú'sc