Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
latex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
latex
Commits
e7aa5da6
Commit
e7aa5da6
authored
Jan 19, 2018
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
small POD section; renamed conversion subroutine: conversion from latex to PDF, not the other way
parent
d93838c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lc1.pl
+27
-4
27 additions, 4 deletions
lc1.pl
with
27 additions
and
4 deletions
lc1.pl
+
27
−
4
View file @
e7aa5da6
#!/usr/bin/perl
#!/usr/bin/perl
=head1 NAME
lc1.pl
=head1 USAGE
./lc1.pl &
=head1 DESCRIPTION
Upon start, searches for old LaTeX to PDF conversion jobs and perfoms
them. Then the script monitors the current directory for new conversion
jobs and executes them.
=cut
use
strict
;
use
strict
;
use
Filesys::Notify::
Simple
;
use
Filesys::Notify::
Simple
;
...
@@ -30,7 +46,7 @@ sub watch
...
@@ -30,7 +46,7 @@ sub watch
{
{
my
(
$job
,
$tex_file
)
=
(
$
1
,
$
2
);
my
(
$job
,
$tex_file
)
=
(
$
1
,
$
2
);
print
__LINE__
,
"
job=[
$job
] tex_file=[
$tex_file
]
\n
";
print
__LINE__
,
"
job=[
$job
] tex_file=[
$tex_file
]
\n
";
pdf2
latex
(
$job
,
$tex_file
);
latex
2pdf
(
$job
,
$tex_file
);
}
}
elsif
(
$path
=~
m#/var/www/html/dlbt/DLBTUploads/TeiConverter/lc1.pl$#
)
elsif
(
$path
=~
m#/var/www/html/dlbt/DLBTUploads/TeiConverter/lc1.pl$#
)
{
{
...
@@ -73,12 +89,12 @@ sub check_old_jobs
...
@@ -73,12 +89,12 @@ sub check_old_jobs
else
else
{
{
# print __LINE__, " job=[$job] tex_file=[$tex_file]\n";
# print __LINE__, " job=[$job] tex_file=[$tex_file]\n";
pdf2
latex
(
$job
,
$tex_file
);
latex
2pdf
(
$job
,
$tex_file
);
}
}
}
}
}
}
sub
pdf2
latex
sub
latex
2pdf
{
{
my
$jobname
=
shift
;
my
$jobname
=
shift
;
my
$tex_file
=
shift
;
my
$tex_file
=
shift
;
...
@@ -111,7 +127,7 @@ sub pdf2latex
...
@@ -111,7 +127,7 @@ sub pdf2latex
}
}
print
"
converting: [
",
join
('
',
@convert
),
"
]
\n
";
print
"
converting: [
",
join
('
',
@convert
),
"
]
\n
";
sleep
(
5
);
sleep
(
5
);
# wait some time to avoid possible race conditions
system
(
@convert
);
system
(
@convert
);
if
(
-
d
$media_dir
)
if
(
-
d
$media_dir
)
...
@@ -120,3 +136,10 @@ sub pdf2latex
...
@@ -120,3 +136,10 @@ sub pdf2latex
unlink
('
media
')
unlink
('
media
')
}
}
}
}
__END__
=head1 AUTHOR
Gerhard Gonter <ggonter@cpan.org>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment