The trivial-yenc Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The trivial-yenc Reference Manual

This is the trivial-yenc Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:42:49 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

trivial-yenc

Common lisp tools for decoding yenc files. It uses split-sequence.

(ql:quickload :trivial-yenc)

(trivial-yenc:decode-part instream directory) => part number or nil

See examples test1 and test2.

test1 opens a yenc file (two roads), decodes and displays the poem from the file.

test2 decodes a multi-part binary, joystick.jpg.

(defun test2 ()
  "decode multipart messages to create joystick.jpg"
  (with-open-file (in  (asdf:system-relative-pathname 'trivial-yenc "test/yenc2/00000020.ntx" )
		       :element-type '(unsigned-byte 8))
    (decode-part in (asdf:system-relative-pathname 'trivial-yenc "test/yenc2/")))
  (with-open-file (in  (asdf:system-relative-pathname 'trivial-yenc "test/yenc2/00000021.ntx" )
		       :element-type '(unsigned-byte 8))
   (decode-part in (asdf:system-relative-pathname 'trivial-yenc "test/yenc2/")))   )

decode-part skips message headers, parses =ybegin line. If it's a multipart, it parses the next =ypart line. With enough information, it yydecodes the data that follows and writes it to a file in the directory specified. (test2) reads yenc files, but in real life you can stream the data right from the newsserver...

See:

Todo:


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 trivial-yenc

Author

Stacksmith <fpgasm@apple2.x10.mx>

License

MIT

Description

Decode yenc file to a binary file

Dependency

split-sequence

Source

trivial-yenc.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 trivial-yenc.asd

Location

trivial-yenc.asd

Systems

trivial-yenc (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 trivial-yenc/package.lisp

Parent

trivial-yenc (system)

Location

package.lisp

Packages

trivial-yenc


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 trivial-yenc/trivial-yenc.lisp

Dependency

package.lisp (file)

Parent

trivial-yenc (system)

Location

trivial-yenc.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 trivial-yenc

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: decode-part IN PATH

decode stream in and write file in path directory. Return part number or nil

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: test1 ()

decode two-roads.yenc into two-roads.out; load the output file and print to screen.

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: test2 ()

decode a multi-part binary from two files.

Package

trivial-yenc

Source

trivial-yenc.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: =yend
Package

trivial-yenc

Source

trivial-yenc.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: bytes-to-string LINE

convert vector of bytes to a string

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: bytes-to-vec LINE

convert vector of bytes to a string

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: decode-data VEC OUT

decode bytes in vec into out stream

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: decode-line IN OUT

decode a line of encoded data from in and output to out

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: decode-lines IN OUT
Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: header-prim STR START END

parse a simple header consisting of pure name=value pairs

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: header-ybegin IN
Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: header-ybegin- STR

read a parameter line starting with =ybegin; return an alist.

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: header-ypart IN
Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: header-ypart- STR
Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: param-to-pair PARAM

convert string x=y to (x . y), converting y to a number if possible

Package

trivial-yenc

Source

trivial-yenc.lisp (file)

Function: read-bytes IN
Package

trivial-yenc

Source

trivial-yenc.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, trivial-yenc.asd: The trivial-yenc<dot>asd file
File, Lisp, trivial-yenc/package.lisp: The trivial-yenc/package<dot>lisp file
File, Lisp, trivial-yenc/trivial-yenc.lisp: The trivial-yenc/trivial-yenc<dot>lisp file

L
Lisp File, trivial-yenc.asd: The trivial-yenc<dot>asd file
Lisp File, trivial-yenc/package.lisp: The trivial-yenc/package<dot>lisp file
Lisp File, trivial-yenc/trivial-yenc.lisp: The trivial-yenc/trivial-yenc<dot>lisp file

T
trivial-yenc.asd: The trivial-yenc<dot>asd file
trivial-yenc/package.lisp: The trivial-yenc/package<dot>lisp file
trivial-yenc/trivial-yenc.lisp: The trivial-yenc/trivial-yenc<dot>lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   B   D   F   H   P   R   T  
Index Entry  Section

B
bytes-to-string: Internal functions
bytes-to-vec: Internal functions

D
decode-data: Internal functions
decode-line: Internal functions
decode-lines: Internal functions
decode-part: Exported functions

F
Function, bytes-to-string: Internal functions
Function, bytes-to-vec: Internal functions
Function, decode-data: Internal functions
Function, decode-line: Internal functions
Function, decode-lines: Internal functions
Function, decode-part: Exported functions
Function, header-prim: Internal functions
Function, header-ybegin: Internal functions
Function, header-ybegin-: Internal functions
Function, header-ypart: Internal functions
Function, header-ypart-: Internal functions
Function, param-to-pair: Internal functions
Function, read-bytes: Internal functions
Function, test1: Exported functions
Function, test2: Exported functions

H
header-prim: Internal functions
header-ybegin: Internal functions
header-ybegin-: Internal functions
header-ypart: Internal functions
header-ypart-: Internal functions

P
param-to-pair: Internal functions

R
read-bytes: Internal functions

T
test1: Exported functions
test2: Exported functions

Jump to:   B   D   F   H   P   R   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   =  
S  
Index Entry  Section

=
=yend: Internal special variables

S
Special Variable, =yend: Internal special variables

Jump to:   =  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S   T  
Index Entry  Section

P
Package, trivial-yenc: The trivial-yenc package

S
System, trivial-yenc: The trivial-yenc system

T
trivial-yenc: The trivial-yenc system
trivial-yenc: The trivial-yenc package

Jump to:   P   S   T