Eskil

Check-in [bcf8c3d856]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added pdf plugin
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bcf8c3d85639ac1df103b0bc6e3840f7aca574c4
User & Date: peter 2015-03-18 21:27:51.955
Context
2015-03-18
23:25
Allow plugins to yield if Eskil is run in Tcl 8.6 or newer check-in: 0ac12f1aa4 user: peter tags: trunk
21:27
Added pdf plugin check-in: bcf8c3d856 user: peter tags: trunk
21:01
Added flag -pluginallow check-in: ff7f4e9633 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Changes.
1
2
3

4
5
6
7
8
9
10
2015-03-18
 Added command line flag "-pluginallow" to allow a plugin to run in a standard
 interpreter instead of a safe one.


2015-03-17
 Added command line flag "-sep" to set a separator for table-like files
 like CSV.

2015-03-16
 Added csv plugin.



>







1
2
3
4
5
6
7
8
9
10
11
2015-03-18
 Added command line flag "-pluginallow" to allow a plugin to run in a standard
 interpreter instead of a safe one.
 Added pdf plugin.

2015-03-17
 Added command line flag "-sep" to set a separator for table-like files
 like CSV.

2015-03-16
 Added csv plugin.
Changes to htdocs/changes.wiki.
1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
<title>Changes</title>

Upcoming changes (not yet released):

  *  Mercurial support for Directory Diff, Commit, Revert and Log.
  *  Plugins can read ::argv to know the given command line.
  *  New plugin for CSV files
  *  Added option -sep, to set a separator that makes input be interpreted
     in a table like manner.

  *  Added option -pluginallow to run plugins in a standard interpreter instead
     of a safe one. Thus a plugin could use e.g. exec.

Changes in v2.7 (2015-03-09):

  *  Directory Diff support for GIT, Fossil and Subversion.
     Directly browse and compare two revisions.









>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<title>Changes</title>

Upcoming changes (not yet released):

  *  Mercurial support for Directory Diff, Commit, Revert and Log.
  *  Plugins can read ::argv to know the given command line.
  *  New plugin for CSV files
  *  Added option -sep, to set a separator that makes input be interpreted
     in a table like manner.
  *  New plugin for PDF files
  *  Added option -pluginallow to run plugins in a standard interpreter instead
     of a safe one. Thus a plugin could use e.g. exec.

Changes in v2.7 (2015-03-09):

  *  Directory Diff support for GIT, Fossil and Subversion.
     Directly browse and compare two revisions.
Added plugins/pdf.tcl.








































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
##Eskil Plugin : Compare text from PDF files. (needs pdftotext)

# Example file for a plugin.
# A plugin must start exactly like this one.
# The text after : is the summary you can get at the command line

# This plugin runs input through the external tool pdftotext.
# Thus it must be run together with the -pluginallow flag.
# Anything given in -plugininfo is passed as parameters to pdftotext.

# A plugin must define this procedure to do the job.
# side: left or right
# chi:  An input channel for reading the original file.
# cho:  An output channel for writing the processed file.
proc PreProcess {side chi cho} {
    if {[info commands exec] eq ""} {
        puts $cho "PDF plugin must be run with -pluginallow"
        return 1
    }
    if {[auto_execok pdftotext] eq ""} {
        puts $cho "PDF plugin needs external tool 'pdftotext' to run"
        return 1
    }
    if {[catch {llength $::Info}]} {
        puts $cho "PDF plugin needs -plugininfo parameter to be a list"
        return 1
    }
    if {[catch {exec pdftotext {*}$::Info - - <@ $chi >&@ $cho}]} {
        puts $cho "**************************************"
        puts $cho "PDF plugin got an error from pdftotext"
    }

    # Signal that the file after processing should be used both
    # for comparison and for displaying.
    return 1
}