将标题放入lisps中
这是一个有点不同的要求,我想嵌入到每个lisp程序的顶部,用大号字母表示lisp的名称。大号字母可以说是一个单词的多行注音。有人知道任何代码或方法吗。我知道如何合并两个文件等也许这会帮助你-一定要添加其余字母和数字的定义。
;Make Headers for Files - return a list of strings (04-X-2012)
(defun MakeHeader( theHeader / listHeader index item letter listPrint listLetters )
(setq listLetters
'(("A" " AAAAAAA " "A A" "A A" "A A" "AAAAAAAAA" "A A" "A A" "A A" "A A")
("B" "BBBBBBBB " "B B" "B B" "B B" "BBBBBBBB " "B B" "B B" "B B" "BBBBBBBB ")
("G" " GGGGGGG " "G G" "G " "G " "G GG " "G G" "G G" "G G" " GGGGGGG ")
("I" "I" "I" "I" "I" "I" "I" "I" "I" "I")
("L" "L " "L " "L " "L " "L " "L " "L " "L " "LLLLLLLLL")))
(setq index 1
listHeader '())
(repeat (1- (length (car listLetters)))
(setq stringLine ";")
(setq item 1)
(repeat (strlen theHeader)
(setq letter (strcase (substr theHeader item 1)))
(if (setq listPrint (assoc letter listLetters))
(setq stringLine (strcat stringLine " " (nth index listPrint)))
)
(setq item (1+ item))
)
(setq listHeader (append listHeader
(list stringLine)))
(setq index (1+ index))
)
listHeader
)
用法:
(MakeHeader "BIGAL") http://www.network-science.de/ascii/ 谢谢李,我一直在寻找的网站上有一切你只需要知道这个词搜索。 __ __ _
\ \ / / | |
\ \_/ /___ _ _ __ _____ _____| | ___ ____ __ ___ ___
\ / _ \| | | | | '__/ _ \ \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
| | (_) | |_| | | | |__/\ vv /__/ | (_| (_) | | | | | |__/
|_|\___/ \__,_| |_|\___| \_/\_/ \___|_|\___\___/|_| |_| |_|\___|
太酷了 花了半个小时的时间学习不同风格的精彩节目。
Msasu你们在这个阶段看过网页了吗?我会剪切粘贴。一旦你们选择了一种基于文本字符串的多行strcat样式,我可以用lisp。如果我有时间的话,我将尝试使用monotxt和mtext在lisp中作为标题。C1+A1+D1+T1+U1+T1+O1+R1下一行C2+。。。。
粘贴的ABCD。。。。Z TO WORD使用alt+鼠标的方式对不知道的人进行列剪切,例如下面的粘贴到记事本以获得正确的视图 要使用,只需将文本样式编辑为2.5高,然后将文本更改为writeline以供文件使用。
; banner text lisp by BIGAL Oct 2012
(defun readlines ()
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans1 (strcat ans1 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans2 (strcat ans2 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans3 (strcat ans3 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans4 (strcat ans4 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans5 (strcat ans5 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans6 (strcat ans6 new_line))
(SETQ Y (+ Y 1))
(setq new_line (nth y newfonts))
(setq ans7 (strcat ans7 new_line))
)
(defun xfonts ()
(setq y 0)
(repeat z
(if (= (nth Y newfonts) newchar)
(readlines)
)
(setq y (+ y 1))
) ;end repeat
); end defun
; this start point
(setq words (getstring "\nEnter title no spaces.."))
(SETQ WORDLEN (strlen words))
; need dummy value to start
(SETQ ANS1 ";"
ANS2 ";"
ANS3 ";"
ANS4 ";"
ANS5 ";"
ANS6 ";"
ANS7 ";"
)
;make a list of all the lines
(setq fo (open "c:/alan/stuff/extra fonts A-Z.TXT" "r"))
(while (setq new_line (read-line fo))
(setq newfonts (cons new_line newfonts))
)
(setq newfonts (reverse newfonts))
(close fo)
(setq z (length newfonts))
(setq x 1)
(repeat wordlen
(setq newchar (substr words x 1))
(xfonts)
(setq x (+ x 1))
)
(COMMAND "TEXT" "0,0" "" ans1)
(cOMMAND "TEXT" "0,-2.5" "" ans2)
(cOMMAND "TEXT" "0,-5.0" "" ans3)
(cOMMAND "TEXT" "0,-7.5" ""ans4)
(cOMMAND "TEXT" "0,-10.0" "" ans5)
(cOMMAND "TEXT" "0,-12.5" "" ans6)
(cOMMAND "TEXT" "0,-15.0" "" ans7)
(setq ans1 NIL
ans2 NIL
ans3 NIL
ans4 NIL
ans5 NIL
ans6 NIL
ans7 NIL
NEWFONTS NIL
)
(PRINC) ; exit quitely
示例文件开始时需要空行
A
###
## ##
## ##
## ##
#########
## ##
## ##
B
########
## ##
## ##
########
## ##
## ##
########
C
######
## ##
##
##
##
## ##
######
D
########
## ##
## ##
## ##
## ##
## ##
########
E
########
##
##
######
##
##
########
F
########
##
##
######
##
##
##
G
######
## ##
##
## ####
## ##
## ##
######
H
## ##
## ##
## ##
#########
## ##
## ##
## ##
I
####
##
##
##
##
##
####
J
##
##
##
##
## ##
## ##
######
K
## ##
## ##
####
#####
####
## ##
## ##
L
##
##
##
##
##
##
########
M
## ##
### ###
#### ####
## ### ##
## ##
## ##
## ##
N
## ##
### ##
######
## ## ##
######
## ###
## ##
O
#######
## ##
## ##
## ##
## ##
## ##
#######
P
########
## ##
## ##
########
##
##
##
Q
#######
## ##
## ##
## ##
#### ##
## ##
##### ##
R
########
## ##
## ##
########
## ##
## ##
## ##
S
######
## ##
##
######
##
## ##
######
T
########
##
##
##
##
##
##
U
## ##
## ##
## ##
## ##
## ##
## ##
#######
V
## ##
## ##
## ##
## ##
## ##
## ##
###
W
## ##
######
######
######
######
######
######
X
## ##
## ##
## ##
###
## ##
## ##
## ##
Y
## ##
####
####
##
##
##
##
Z
########
##
##
##
##
##
########
1
##
####
##
##
##
##
######
2
#######
## ##
##
#######
##
##
#########
3
#######
## ##
##
#######
##
## ##
#######
4
##
## ##
## ##
## ##
#########
##
##
5
########
##
##
#######
##
## ##
######
6
#######
## ##
##
########
## ##
## ##
#######
7
########
## ##
##
##
##
##
##
8
#######
## ##
## ##
#######
## ##
## ##
#######
9
#######
## ##
## ##
########
##
## ##
#######
0
#####
## ##
## ##
## ##
## ##
## ##
#####
页:
[1]