1. a text versions of docs for Eu?
- Posted by SunPsych08 Jun 07, 2014
- 1615 views
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
2. Re: a text versions of docs for Eu?
- Posted by jimcbrown (admin) Jun 07, 2014
- 1619 views
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
You want a plain text markup-free version of the docs? Right now this doesn't seem to be directly supported by the tools we have (eudoc generates a creole marked up file, and the creole program generates either tex or html). We could always just run 'lynx -force_html -dump' on the outputed html to create a set of plain text documents, though...
3. Re: a text versions of docs for Eu?
- Posted by SunPsych08 Jun 07, 2014
- 1544 views
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
You want a plain text markup-free version of the docs? Right now this doesn't seem to be directly supported by the tools we have (eudoc generates a creole marked up file, and the creole program generates either text or html). We could always just run 'lynx -force_html -dump' on the outputed html to create a set of plain text documents, though...
Yes, a plain text markup-free version of the API reference (rather than the whole docs) is what i really had in mind, if it's not a big ask. Otherwise, no problem; i can carry on with what we've already got, for which i'm very grateful
sunpsych
4. Re: a text versions of docs for Eu?
- Posted by _tom (admin) Jun 09, 2014
- 1527 views
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
Here is a sample of "plain text" API that is easy to produce. It is a portion of the std/console.e include file. Is this what you are looking for?
_tom
Console Information has_console include console.e namespace console public function has_console() determines if the process has a console (terminal) window. Returns: An atom, 1 if there is more than one process attached to the current console, 0 if a console does not exist or only one process (Euphoria) is attached to the current console. Comments: On Unix systems always returns 1 . On Windows client systems earlier than Windows XP the function always returns 0 . On Windows server systems earlier than Windows Server 2003 the function always returns 0 . Example 1: include std/console.e if has_console() then printf(1, "Hello Console!") end if key_codes include console.e namespace console public function key_codes(object codes = 0) gets and sets the keyboard codes used internally by Euphoria. Parameters: codes : Either a sequence of exactly 256 integers or an atom (the default). Returns: A sequence, of the current 256 keyboard codes, prior to any changes that this function might make. Comments: When codes is a atom then no change to the existing codes is made, otherwise the set of 256 integers in codes completely replaces the existing codes. Example 1: include std/console.e sequence kc kc = key_codes() -- Get existing set. kc[KC_LEFT] = 263 -- Change the code for the left-arrow press. key_codes(kc) -- Set the new codes. Key Code Names These are the names of the index values for each of the 256 key code values. See Also: :key_codes KC_LBUTTON include console.e namespace console public constant KC_LBUTTON set_keycodes include console.e namespace console public function set_keycodes(object kcfile) changes the default codes returned by the keyboard. Parameters: kcfile : Either the name of a text file or the handle of an opened (for reading) text file. Returns: An integer, 0 means no error. -1 means that the supplied file could not me loaded in to a :map. -2 means that a new key value was not an integer. -3 means that an unknown key name was found in the file. Comments: The text file is expected to contain bindings for one or more keyboard codes. The format of the files is a set of lines, one line per key binding, in the form KEYNAME = NEWVALUE. The KEYNAME is the same as the constants but without the "KC_" prefix. The key bindings can be in any order. Example 1: -- doskeys.txt file containing some key bindings F1 = 260 F2 = 261 INSERT = 456 set_keycodes( "doskeys.txt" ) See Also: :key_codes
5. Re: a text versions of docs for Eu?
- Posted by SunPsych08 Jun 09, 2014
- 1471 views
Hello,
Is it possible please to have a text version of the documentation for the latest release of Eu? I appreciate being able to edit, copy/paste, and print portions of the documentation that i happen to be studying at any particular time.
Thank you,
sunpsych
Here is a sample of "plain text" API that is easy to produce. It is a portion of the std/console.e include file. Is this what you are looking for?
_tom
Console Information has_console include console.e namespace console public function has_console() ..... etc...
Yes, that would be perfect and very much appreciated.
sunpsych
6. Re: a text versions of docs for Eu?
- Posted by _tom (admin) Jun 10, 2014
- 1514 views
You can download the file plain.txt which is the current OpenEuphoria documentation. Most of the Creole markup has been removed.
The link is: https://drive.google.com/file/d/0B4wfRhusHmUbTU81ZzVhV0t2Y3M/edit?usp=sharing
You can also create your own version by running this utility. Adjust the program to your needs.
_tom
-- clean.ex -- https://drive.google.com/file/d/0B4wfRhusHmUbTU81ZzVhV0t2Y3M/edit?usp=sharing -- Create your own "plain text documentation." -- * Vist http://scm.openeuphoria.org/ -- ** Download a fresh copy of OpenEuphoria source code -- ** Download eudoc -- * From the /euphoria/docs folder run eudoc.ex -- ** eui eudoc.ex -a manual.af -o foo.txt -- ** The result is "foo.txt" a documentation file formatted using Creole markup. -- * To remove most of the Creole markup run this basic cleanup program: ------------------------------------------------------------------------------------------ include std/io.e include std/console.e include std/text.e include std/search.e include std/sequence.e sequence raw = read_lines( "foo.txt") sequence peeled = {} for i=1 to length(raw) do sequence line = raw[i] if begins( "%%", line ) then -- ignore elsif begins( "!!", line) then -- ignore elsif begins( "@", line ) then -- ignore elsif begins( "<<", line ) then -- ignore elsif begins( "= ", line ) then peeled = append(peeled, line[3..$] ) --peeled = append(peeled, "" ) elsif begins( "== ", line ) then peeled = append(peeled, line[4..$] ) --peeled = append(peeled, "" ) elsif begins( "=== ", line ) then peeled = append(peeled, line[5..$]) --peeled = append(peeled, "") elsif begins( "==== ", line) then peeled = append(peeled, line[6..$]) --peeled = append(peeled, "") elsif begins( "===== ", line ) then peeled = append(peeled, line[7..$]) peeled = append(peeled, "") elsif begins( "* ", line ) then peeled = append(peeled, line[3..$]) elsif begins( "** ", line ) then peeled = append(peeled, line[4..$]) elsif begins( "*** ", line) then peeled = append(peeled, line[5..$]) elsif begins( "# ", line ) then peeled = append(peeled, line[3..$]) elsif begins( "## ", line) then peeled = append(peeled, line[4..$]) elsif begins( "### ", line ) then peeled = append(peeled, line[5..$]) elsif begins( "<eucode>", line) then peeled = append(peeled, line[9..$]) elsif begins( "<//eucode>", line) then -- NOTE: only one slash here (wiki formatting problem!) peeled = append(peeled, line[10..$]) elsif begins( "{{{", line) then peeled = append(peeled, "") elsif begins( "}}}", line) then peeled = append(peeled, "") else peeled = append(peeled, line) end if end for for i=1 to length(peeled) do sequence line = peeled[i] line = fix( "**", line ) line = fix( "##", line ) line = fix( "[[", line ) line = fix( "]]", line ) line = fix( `//`, line ) peeled[i] = line end for function fix( sequence needle, sequence haystack ) integer n = 1 while n>0 do n = match( needle, haystack ) if n then haystack = haystack[1..n-1] & haystack[n+2..$] end if end while return haystack end function write_lines( "plain.txt", peeled) display( "done\n" )
7. Re: a text versions of docs for Eu?
- Posted by SunPsych08 Jun 10, 2014
- 1434 views
You can download the file plain.txt which is the current OpenEuphoria documentation. Most of the Creole markup has been removed.
The link is: https://drive.google.com/file/d/0B4wfRhusHmUbTU81ZzVhV0t2Y3M/edit?usp=sharing
You can also create your own version by running this utility. Adjust the program to your needs.
_tom
-- clean.ex
Thank you _tom. That's just what i needed.
Regards,
sunpsych