⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bk2site.1

📁 一百个病毒的源代码 包括熊猫烧香等 极其具有研究价值
💻 1
📖 第 1 页 / 共 3 页
字号:
.\" Copyright (C) 1999 Jose M. Vidal.\" .\" Permission is granted to any individual or institution to use, copy, or.\" redistribute this software so long as all of the original files are.\" included, that it is not sold for profit, and that this copyright notice.\" is retained..\" http://bk2site.sourceforge.net.\" bk2site-dev@lists.sourceforge.net.\" groff -man -Tascii bk2site.1.\".de EX		\"Begin example.ne 5.if n .sp 1.if t .sp .5.nf.in +.5i...de EE.fi.in -.5i.if n .sp 1.if t .sp .5...ta .3i .6i .9i 1.2i 1.5i 1.8i.TH bk2site 1 "19 January 2000".SH NAME bk2site \- convert a Netscape Navigator bookmark file into a yahoo-like website with slashdot-like news..SH SYNOPSIS.B bk2site [-nd] [-f .I config-file.B ] [-d.I dest-dir.B ] [-t.I name.B ] [-f1.I basetemplate.B ] [-f1.I othertemplate.B ] [-o.I outputfile.B ] .B ] [-xbel.I outputfile.B ][-ns] [-nc] [-old.I days.B ] [--help] [.I mainbookmarkfile.B ] [.I bookmarkfile.B ...].SH DESCRIPTIONConverts a Netscape Navigator bookmark file into a yahoo-like websitewith slashdot-like news. It is typically run as a cron job so as tokeep your website automatically updated. Customization is achievedthru the template files and the .bk2siterc file, as explainedbelow. All the options can also be given in the .bk2siterc file..SH OPTIONS.IP -nDon't use a subdirectory hierachy. Use ugly long filenames. Thisoption is useful for tree depth limited providers like geocities..IP "-f config-file"Use the configuration file.I config-fileinstead of.IR ~/.bk2sitercand.IR /etc/bk2site/dot.bk2siterc ..IP "-d dest-dir"Local directory for generated files.  Default is /home/httpd/html/ oras given in.IR /etc/bk2site/dot.bk2sitercand .IR ~/.bk2siterc .IP "-t name" Name of top-level bookmark folder to use. If ommited bk2site willconvert whole bookmark file..IP "-f1 basetemplate" Index template file for top index.  .IP "-f2 othertemplate"Template for the other pages. .IP "-o outputfile"Output bookmark file. All the bookmarks that form the website areoutput to this file in Netscape bookmark file format..IP "-xbel outputfile"Output bookmark file in XML Bookmarks Exchange Language (XBEL).All the bookmarks that form the website are output to this file..IP -nsDo NOT generate the website. This is useful if you just want togenerate the bookmarkfile or some other files, as specified in~/.bk2siterc..IP -ncDo NOT put HTML comments in the output..IP "-old days"Number of days (default is 30) after which a bookmark is no longernew..SH FILES.I /etc/bk2site/dot.bk2siterc.RSThe system configuration file. It is always read first..RE.I ~/.bk2siterc.RSThe user configuration file. It is read after the global configuration file and before the one specified in the -f argument. Values set later always override previously set values. That is, the user configuration file overrides values set in the globla configuration file..SH Quick StartThe minimum .I ~/.bk2siterc you will need, if you run your own webserver with files in/home/http/html (as is the default in most distributions) is:.EXdestdir /home/httpd/htmlsearch /home/httpd/cgi-bin/urls.dbextrafilebase /etc/bk2site/newbase.htmlextrafilename new.html.EE.SH SUMMARYbk2site simply reads your bookmarks file and generates a bunch offiles which form a yahoo-like site, with the option of using one ofyour folders to generate a set of slashdot-like news.In order to customize its output, you need to set up (at least)three files..I indexbase.html.I otherbase.htmland your own .I ~/.bk2siterc.Samples of these three files are included with the distribution andshould be found under /etc/bk2site or /usr/doc/bk2site..IP indexbase.html This file forms the template for your top-levelindex. That is, the page everyone will see first. This file must be alegal html file and contain the comments as described below..IP otherbase.htmlIt is the template for all the other files. It also needs to havecomments, as described below..IP ~/.bk2siterc.Edit the .I /etc/bk2site/dot.bk2siterc file and copy it to.I ~/.bk2sitercThe sample file has lots of comments, so read it. Also,a sample.I ~/.bk2sitercis given at the end of this manual page. This file tellsbk2site where to find indexbase.html and otherbase.html.PPThere can also be extra configuration files if you wish to generateextra output (for example, you might wish to generate an xml file tobe read by MyNetscape.com, or a plain text file to be used in anautomate monthly newsletter). The extra template files are given withthe "extrafilebase" and "extrafilename" variables in your.I ~/.bk2sitercBasically, bk2site supports 5 different sections in your document. Each section refers to the type of URLS that will be output by bk2site at that point. They are:.IP folderfolders from your bookmarkfile.IP urlurls (leafs) from your bookmarkfile.IP newaddurls of the most recently, sorted by most-recently-created.IP newsurls from the newstopfolder, sorted by most-recently-created..IP tophitsurls with the most hits, sorted by number of hits (as given by urllog).IP newsandnewaddcombines the urls in news and newadd and sorts them by most-recently-created..PPEach section is replaced by bk2site with the appropiate urls. Forexample, the folder section is replaced with the URLs for theappropiate folders, while the url section is replaced by the leafurls. Exactly how these URLs will look depends on the values you giveto the different variables within each section.The easiest way to understand how it works is to look at at the samplefiles. Lets look at the folders (in Yahoo! these are known as the"categories"). In the sample otherbase.html you will find somethinglike:.EX<!--bk2site:begin folder--><!--bk2site:top <table width="100%"><tr><td><ul>--><!--bk2site:template <li><A HREF="%URL"><B>%TITLE</B></A> <I>(%LEAFS)</I> %CONDDASH <small>%COMMENT</small>--><!--bk2site:separator </ul></td><td><ul>--><!--bk2site:bottom </ul></td></tr></table><hr>--><!--bk2site:cols 2--><!--bk2site:maxnum 0--><!--bk2site:end-->.EEThese comments guide how bk2site generates the html for thefolders. Each section must always start with the <!--bk2site:beginsection-type--> and end with <!--bk2site:end-->. Within each sectionsection-type--> there are a number of variables (e.g. top, template,section-type--> separator), each one of these variables is followed by section-type--> the value we are assigning to it.The whole section will be replaced, in the output file, by the codegenerated by bk2site. The section begins with: .IP "<!--bk2site:begin folder-->"Tells bk2site that this is the place where we want to place thefolders..PPAfter the begin statemend we see a number of variables, each one isassigned a value. The function of each variable is:.IP top If there are folders to print, print the value of this variable (inthis case <tablewidth="100%"><tr><td><ul>) before any folders..IP templateEach folder is printed using the template given by the value of thisvariable (in this case <li><AHREF="%URL"><B>%TITLE</B></A><I>(%LEAFS)</I> %CONDDASH<small>%COMMENT</small>). You can insert many directives, which areall in capitals and preceded with a %. These directives will bereplaced with the appropiate values. All the directives are explainedbelow..IP colsTells us to print the folders in colums. In this example we aresetting this value to 2. This simply inserts the value of "separator"after the appropiate number of elements..IP separatorAfter each column is over, we print this separator in order to startthe next colum..IP bottom If there are folders to print, print the value of thisvariable after all folders have been printed..IP maxnumThe maximum number of folders to print. If 0 or ommited, then we print all the folder that exist in the bookmark file..IP daysoldDo not include any folders or urls that were created more than15 days ago. If 0 or omitted then we print all folders..IP betweenPlaces the contents of this variable between every two items, but notat the beginning or at the end; and not when the separator is beingprinted. This is sometimes useful..IP startnumThis would tell bk2site to start printing on the 15th element..PPThere are other special comments that can appear anywhere in atemplate file and do not need to be within a section. They will bereplaced. In their place bk2site will put some appropiate HTML code..IP "<!--bk2site:navigatebar-->"Gets replaced by the navigationbar. This is only useful in otherbase.html. This is not a variable and should not be set to any value. .IP "<!--bk2site:title-->"Gets replaced by the title (current foldername), prepended by the "title" defined in .bk2siterc..IP "<!--bk2site:include /home/me/myfile.html-->"Includes myfile.html atthe place where the comment is placed. myfile.html can itself includeany of the tags. It eliminates any occurances of %QUERY, %ESCQUERY and%NUMBER in the included file. Its a great way to include headers and%footers that are common to all your pages. Also, instead of a fileyou can also specify a URL..IP "<!--bk2site:include:search /home/me/myfile.html-->" As above, butleaves %QUERY, %ESCQUERY and %NUMBER. Also, instead of a fileyou can also specify a URL..IP "<!--bk2site:date-->"Gets replaced by the current date and time..IP "<!--bk2site:path-->"Gets replaced by the path to the current file being written. Thisis only useful in otherbase base pages since the path we are talkingabout is just the path that bk2site creates to mirror your folder structure.That is, it is NOT the absolute path on your filesystem, it is onlythe set of directories that must be traversed from the top of thetree in order to get to the current page. This comment is useful whenyou need to reference the page you are on. (e.g. asking google to findother pages related to that one.).PPYou can get sample copies of base files, showing how all these uglycomment can be used, at the bk2site homepagehttp://bk2site.sourceforge.net.SH DirectivesThese are replaced for their appropiate values when they appear in atemplate. They get instantiated for each url or folder..IP %URLthe URL.IP %NOACCENTURLthe URL where all accented, and other strange characters, have beenreplaced by equivalent values..IP %TITLEthe title.IP %NOACCENTTITLEthe title where all accented, and other strange characters, have beenreplaced by equivalent values..IP %COMMENTthe comment,.IP %FILLCOMMENTthe comment, its justified for 80 columns, to make it look nice..IP %NOACCENTCOMMENTthe comment where all accented, and other strange characters, have beenreplaced by equivalent values..IP %SHORTCOMMENT(x)the first x characters of the comment, where x is an integer..IP %LONGCOMMENTthe comment in one long line with any carriage-returns or newlines

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -