P2O2 WWW Useful Scripts
PDF at Hand


Created - Apr 31, 2007  |  Modified - Sep 20, 2007

P2O2 WWW Homepage -> Useful Scripts -> PDF at Hand


Setting Demands

  1. Categorized PDF Files
  2. Every Category in One Window
  3. KISS Paradigm

 

Important Remarks

Every PDF file belongs to a given category. They are placed in primary separate subdirectories. If you want a pdf file to be displayed in Xdialog window you must symlink it from secondary directory structure. Xdialog window creates pdf list from one of the secondary subdirectories.

I've written small bash script xnp_pdf.xxxx which use listbox window module from Xdialog widgets. Every new category of PDF files can be displayed by the same script with a few changes to the code defining target directory where the pdf files are stored.

XNP in xnp_pdf.xxxx script name stands for Xdialog Newbie Primer what means that apart from bash code the script contains Xdialog widgets as well.

Script expansion defines pdf category (xnp_pdf.xxxx). xxx stands for:

  • apps - applications
  • dict - dictionaries
  • lin - Linux
  • nbsd - NetBSD system
  • prog - programming
  • tech - technology
  • unix - Unix
  • xbsd - *BSD systems

 

Setting xnp_pdf.xxxx

Every new version of script should have changed descriptive variables. The changes are marked with red color.

    # "exten"(sion) must be changed according to PDF category
    #
    exten="apps"

    # "categ"(ory) is displayed in Xdialog window
    # must be changed according to PDF category
    #
    categ="Applications"

    # constants 
    pdf_path=~/lnbsd/pdf.$exten
    pdf_browser=/usr/pkg/bin/xpdf
    

 

Setting IceWM Menu

Invoking the scripts should be as easy as the scripts themselves. I placed appropriate entries in IceWM menu.

~/.icewm/menu

    menufile "Apps at Hand" folder pp_handy
    menufile  Office folder pp_office
    menufile  Graphics folder pp_graphics
    menufile  Mmedia folder pp_mmedia
    menufile  Networks folder pp_networks
    menufile  Science folder pp_science
    menufile  System folder pp_system
    menufile  Tools folder pp_tools
    separator
    menufile "Pdf.Docs" folder pp_docs_pdf
    menufile "Html.Docs" folder pp_docs_html
    

~/.icewm/pp_docs_pdf

    prog "Apps.pdf"   xpdf_01 xnp_pdf.apps
    prog "Dict.pdf"   xpdf_01 xnp_pdf.dict
    prog "Linux.pdf"  xpdf_01 xnp_pdf.lin
    prog "NetBSD.pdf" xpdf_01 xnp_pdf.nbsd
    prog "Prog.pdf"   xpdf_01 xnp_pdf.prog
    prog "Tech.pdf"   xpdf_01 xnp_pdf.tech
    prog "Unix.pdf"   xpdf_01 xnp_pdf.unix
    prog "xBSD.pdf"   xpdf_01 xnp_pdf.xbsd
    

 

P2O2 Screenshots

[MC window]

Picture 1: MC window with pdf files and their symlinks (click to enlarge)

 

[MC window]

Picture 2: MC window with scripts and their symlinks

 

[Desktop screenshot]

Picture 3: Desktop with IceWM menu, MC window with pdf directories, and Xdialog window with NetBSD pdf files (click to enlarge)

 

[Xdialog window]

Picture 4: Xdialog window with application PDFs

 

[Xdialog window]

Picture 5: Xdialog window with dictionaries PDFs

 

[Xdialog window]

Picture 6: Xdialog window with Linux PDFs

 

[Xdialog window]

Picture 7: Xdialog window with NetBSD PDFs

 

[Xdialog window]

Picture 8: Xdialog window with programming PDFs

 

[Xdialog window]

Picture 9: Xdialog window with technology PDFs

 

[Xdialog window]

Picture 10: Xdialog window with Unix PDFs

 

[Xdialog window]

Picture 11: Xdialog window with *BSD systems PDFs

 

Download Files

1.) lnbsd.handypdf.tar.gz - [114 MB !]

 

[Logo P2O2]

 

[Logo NetBSD]

 

[Logo Open Object Rexx]

 

[Powered by Rexx Logo]

 


Qlist_4Q   [Static website generated with Rexx scripts in NetBSD]