bumble.sf.net language and parsing

plain text

una aplicaciÿn web para transformar texto en html **

[webdir http://bumble.sf.net/lang/web] [faq] q: que es todo eso? Los archivos dentro de este directorio son un intento de crear un sistema para dejar que gente puedan escribir paginas web sin utilizar

Html


. El html es el metodo mas común para crear páginas web pero tiene unas desventajas. Una de ellas es de es un poco complicado para aprender bien y para escribir bien y tambien el autor no se puede fijarle bién en el trabajo de escribir sin preocuparse con problemas técnicas de html. Entonces una solucion es escribir in un formato mas sencillo y luego utilizar algún software para trasformar el texto hasta html. Eso, para mi, es la mejor solución. Una otra es utilizar un programa como 'dreamweaver' que se llama un wysiwyg editor. q: Como puedo utilizar este sistema? Descargar el archivo 'Web.jar' primero. Segundo comprobar que tienes un maquina virtual de java en tu ordenador. Vale, eso es un caja de pandora, en alguna manera, porque como puedes comprobar este? Si usas Microsoft Windows apretar 'Inicio' → 'Ejecutar' y luego dactylo-graphear (teclar) 'cmd' si tienes Windows xp, y si tienes Windows 98, teclar 'command' Luego, una caja de commandos va a aparecer, espero que si, que es negro, y que en quien tu puedes teclar commandos directamente al ordenador como en los dias antiguos de

Dos


. Ahora, tecla 'java'. Si mires, por ejemplo- java no se reconoce como un comando interno ... blah blah entonces tienes un problema, Ahora intenta con 'jview'. Si recibes el mismo mensaje es muy probable que no tienes una maguina virtual de java y tienes que obtenir uno para usar los codigos en este sitio. No es muy complicado, y tampoco cuesta dinera pero puede costar un poco de tiempo. Si tienes paciencia, va http://java.sun.com y descargar un maquina virtual. Cuando todo esta aposto, tecla por ejemplo- java -cp Web.jar FaqDocument archivo-texto > archivo-html Este comando trasforma el archiva en html. q: Aquesta sistema es un wiki? No precisamente pero aparecido. Un wiki usa codigos para formatear el documento pero este sistema intenta evitar el uso de codigos para que el documento texto siempre permanezca 'limpio' en una manera de hablar. Eso quiere decir que el documento es facil para leer y para mantener para toda persona que puedan leer el lenguaje. q: ¿Puedo transformar a otros formatos que HTML?

Las clases contienen la habilidad de transformar al formato DocBook XML pero esta función tiene muchos bichos todavía. q: Que es un wiki?

El inventor del Wiki es Ward Cunningham http://c2.com/ y es una manera de editar documentos del WWW sin utilizar HTML. También hay una philosophía de la libertad del lector a editar todo lo que quiera, que en principio parece muy anarquista pero resulta en realidad, muy util. (Por ejemplo http://www.wikipedia.org) q: ¿Que hay en el directorio "edit"? este link:///edit/ ectorio contiene un editor de texto que esté diseñado para editar fichas que sean ubicado en servidores remotos de tipo SSH.

q: ¿Como escribo en documento FAQ (preguntas mas frequentes)?

Puedes mirar, por ejemplo la ficha link://web.es.txt, que es la ficha que estás leyendo ahora. Empiezas con el código [ FAQ ] y terminas con el código [/ FAQ ]. Luego escribes preguntas empezando con q y un colon.

q: ¿Que significan los códigos en las fichas de texto?

Son una manera para conseguir estructura en un documento de texto que no tiene otro formato. Hay muchas maneras para conseguir eso, como XML, HTML etc pero todas maneras tienen sus ventajas y desventajas. These are a way to provide some structure in an unstructured text document. The codes indicate to the transformation engines the sort of text which it is dealing with. For example this faq document is enclosed in [ faq] [ /faq] tags to indicate to the transformation engine that it is dealing with an FAQ style document. Html also uses tags, but many more. The idea of this transformation engine is to use as few tags as possible and to make them of a semantic nature rather than of a visual or layout nature. For example, the FAQ tags say something about the 'meaning' of the text within the tags rather than saying anything about how the document should be layed out or formatted when it is displayed visually. The idea of this is to remove from the writer the burden of having to decide how the document should look when he or she is attempting to write. The writer can decide how the document should look afterwards. Also, if you look at the link://web-faq.txt 'text file' which these HTML pages were generated from, you will see that the 'source' is quite clean. That is to say there are very few tags in the text files, which makes them easier to read and I believe easier to maintain. This is based on the principle that it is better and more creative to think about one sort of thing at a time. q: Are there any similar systems to this available? There are many wiki systems available, many of them far more powerful than the current system. There are also some systems which emphasize having minimal tags in the source files for example the http://daringfireball.net/projects/markdown/ 'Markdown' system. The markdown system seems to have the same philosophy as the current system. Also there appears to be a http://www.michelf.com/projects/php-markdown/ 'Php Markdown'. These systems are no doubt much more advance than the current one, and you would be well advised to use them if you want to create a web site. The current system is only in its initial stages and may not be continued. It appears that Markdown still allows the writer to put formatting code into the text document. Therefore I feel that my system has a slightly different outlook from Markdown. This system attempts to encourage the writer to think about semantic content rather than visual content, but does not force the writer to categorize his or her writing. http://paginas.fe.up.pt/~villate/parsewiki/ This is a system which can transform to other formats apart from html but uses a normal style wiki syntax. q: Why not use XML for the document format?

Xml


is a strict format which requires or at least encourages the author to make decisions about the categories of information which his or her writing will be dealing with, but often writers do not wish to make these sort of decisions or are not able to make these decisions because their ideas about the nature of what they are writing about are vague and will develope during the course of their writing. For this reason I prefer a non strict format which attempts to make guesses about the semantic content of the text. q: Is it possible to change the format for the faq document? Most wiki systems and text transformations use regular expressions but this system actually parses the text document to find the structures. This is slower and more complex than a regular expression system but it allows more precise control of the way the document is transformed and allows a type of 'query' to be made of the document about its content. For example the FAQ class can determine how many questions there are in the document and how many answers where as a regular expression system would have difficulty in finding that information. This means that the syntax of the text documents is determined by the parsing which the objects do of the document and so to change the document syntax requires changing those parsing routines. In some cases this is simple but in other cases not so simple. q: What other documents are available? There is a brief link:///bumble-faq.html 'faq' in the top level directory which is That file describes the overall bent of this site. There is also an FAQ in the link:///lang directory of this site. q: What does the '[dir]' tag mean? This code instructs the transforming engine to insert a directory listing in the outputted html document. The directory listing is the listing of a directory on the computer where the transformation engine is run, which would usually be the web-server. q: What does the '[image]' tag mean? This tag instruct the transformation engine to insert an image in the rendered document. For example- '[image http://server. href="net/logo.gif]' ">net/logo.gif]' should insert the logo image in the faq document. However the exact location in the document is not really controllable at the moment. q: What does the '[webdir]' tag mean? This tag allows the insertion of a set of links from another web-page in the rendered document. For example- '[webdir http://www.yahoo.com]' would insert all the links from the yahoo page into the rendered document. Please note that this component is only in a development stage. For example the links from the page are not transformed to make them useable from a different server. q: What does the '[gloss]' tag mean? This tag starts a glossary section. q: What does the '[howto]' tag mean? This tag starts a procedure section. A procedure section contains a series of steps which represents a set of instructions of how to do something. This tag and functionality is not properly implemented. q: How can I stop a tag from being transformed by the code? You can enclose the tag in single quote characters as I have done in the examples above. (Actually only the leading quote matters). If there had not been enclosed in quotes they would have been transformed by the code engine. q: Can I put footnotes in a document? In theory this should be possible and is handled by the link://FootnoteSection.java class and other classes, but the functionality is still in a developmental phase q: Is this page dynamically generated? No. which means that the file listing which may occur on this page may not be entirely up-to-date. q: what is in the /edit/ ectory? This directory contains the beginnings of a text editor written in java. The editor is orientated towards saving on a ssh server via sftp. this is mainly because this is the only way to save to the sourceforge server. q: Can I use lists in documents? There is a link://PlainList.java class which will recognize and render lists in Html but I have left it out of the faq document class for reasons of simplicity. There is also a link://PlainListDocument.java class which is a document which can contain some text and a list. But this is not that useful really. The syntax of a list is, for example-