Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 19/12/2009, à 20:58

BluePrint

Installation sep-offprint

Bonjour, j'aimerais installer un application libre pour créer des documents pdf depuis la stanford encyclopedia.

Merci de votre attention.

Voici les instructions données en anglais (que je comprends...), j'ai fait toutes les démarches mais je m'y suis perdu:

Vous pouvez les retrouver : http://johnmacfarlane.net/sep-offprint.html

sep-offprint

sep-offprint is a perl script that makes offprints from Stanford Encyclopedia of Philosophy articles.

© 2006–7 John MacFarlane. This script may be freely used and modified. There are no guarantees or warranties of any kind. If you find a way to improve it, I would appreciate hearing about it.
Installing sep-offprint

You can download sep-offprint here or clone the git repository:

git://github.com/jgm/sep-offprint.git

To use the sep-offprint script, you will need Perl and two (free) external programs:

    * Ghostscript
    * html2ps (Download the tarball or zip file, extract, and run the install script.)

If you are running linux or unix (including Mac OS X), you may already have Ghostscript. You can check by issuing the command:

which ps2pdf

If it returns a pathname, then you probably have Ghostscript.

You’ll also need the Perl modules in LWP (Library for WWW in Perl). Your perl installation may already contain LWP; if not, you can install it using cpan:

cpan -i LWP

(Accept all the defaults.)

On a *nix system, you will want to put sep-offprint in your path (e.g. in your ~/bin directory) and make it executable:

chmod +x sep-offprint

You can then run it from any directory by typing:

sep-offprint plato

If this doesn’t work, you may have to modify the first line of the script, which tells it where to find perl. Replace /usr/bin/perl in the first line of the script with the path to perl on your system. To find this path, type:

which perl


Using sep-offprint

To make a PDF offprint from the “Frege” article, just type:

sep-offprint frege

If all goes well, the file frege.pdf will be created in your working directory (so make sure you don’t already have a file by that name, or it will be overwritten). If you have not put sep-offprint in your path as described above, you will have to put the sep-offprint script in your working directory and type

perl sep-offprint frege

instead of the command above.

To find the official name of an entry, look at the URL. For example, the URL for my article on logical constants is http://plato.stanford.edu/entries/logical-constants. The part after entries/ is the official name. So, to generate an offprint, we’d type:

sep-offprint logical-constants

Or, if you want, use the whole URL:

sep-offprint http://plato.stanford.edu/entries/logical-constants

If you want to create an offprint from an entry on your local computer (say, one that you are editing), use a file:// URL. For example, if your entry lives in the directory /home/mmm/entries/truth, you can use

sep-offprint file:///home/mmm/entries/truth

to create an offprint from it. (The old --localpath option has been removed, as this is now the preferred way to create offprints from local entries.)

By default, sep-offprint creates PDF offprints with two pages per side, in landscape mode, using letter size paper and a 14 point Times font. All of these defaults can be changed using command-line options. Thus, to create a postscript file instead of a PDF, with just one page per sheet and A4 paper, type:

sep-offprint --1up --ps --paper a4 frege

This command will produce a file called frege.ps in the working directory.

To create a PDF with larger print and a sans-serif font, type:

sep-offprint --size 16pt --font Helvetica frege

Here is a full list of options, with defaults indicated by *:

--1up                  print one page per sheet, portrait orientation
--2up                  print two pages per sheet, landscape orientation*
--ps                   produce postscript (PS) output
--pdf                  produce PDF output*
--output FILENAME      name of output file (defaults to ENTRYNAME.ps|pdf)
--font FONT            specify font (Times*, Helvetica, Palatino, Courier)
--size SIZE            specify font size (10pt, 12pt, 14pt*, 16pt)
--align ALIGN          specify alignment (left, justified*)
--paper PAPERSIZE      specify paper size (letter*, legal, a4)
--linkcolor COLOR      specify color of hyperlinks (black*, gray, blue, ...)
--help                 this message
--version              prints version number


Ubuntu 10.04
Asus X52J iCore5 AMD 64, 4G RAM, 600G DD

Hors ligne