Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Access Check - Account manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Access Check - Account manager
Commits
ee3c1f69
Commit
ee3c1f69
authored
7 years ago
by
Guillaume ROUSSE
Browse files
Options
Downloads
Patches
Plain Diff
drop unused executables
parent
a3b7e158
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/create-database-code.pl
+0
-43
0 additions, 43 deletions
bin/create-database-code.pl
bin/make_pdf_from_pod.pl
+0
-118
0 additions, 118 deletions
bin/make_pdf_from_pod.pl
with
0 additions
and
161 deletions
bin/create-database-code.pl
deleted
100755 → 0
+
0
−
43
View file @
a3b7e158
#!/usr/bin/perl
## Initialize Rose::DB code given the DB structure
use
strict
;
use
warnings
;
use
lib
qw(lib conf)
;
use
Rose::
DB
;
use
Rose::DB::Object::
Loader
;
use
Getopt::
Long
;
use
Conf
;
my
%options
;
unless
(
GetOptions
(
\
%options
,
'
database=s
'))
{
die
"
Unknown options.
";
}
my
$dbname
=
$options
{'
database
'}
||
$
Conf::
global
{'
database_name
'};
$loader
=
Rose::DB::Object::
Loader
->
new
(
db_dsn
=>
'
dbi:
'
.
$
Conf::
global
{'
database_type
'}
.
'
:dbname=
'
.
$dbname
.
'
;host=
'
.
$
Conf::
global
{'
database_host
'},
db_username
=>
$
Conf::
global
{'
database_user
'},
db_password
=>
$
Conf::
global
{'
database_password
'},
db_options
=>
{
AutoCommit
=>
1
,
ChopBlanks
=>
1
},
class_prefix
=>
'
IdPAccountManager::Data
',
#with_unique_keys => 0,
);
$loader
->
make_modules
(
with_managers
=>
1
,
module_dir
=>
'
/tmp
',
#with_relationships => ['one to many','many to one']
);
printf
"
Database-related code created in /tmp/IdPAccountManager. You should copy this code in lib/ directory
\n
";
This diff is collapsed.
Click to expand it.
bin/make_pdf_from_pod.pl
deleted
100644 → 0
+
0
−
118
View file @
a3b7e158
#!/usr/bin/env perl
use
Modern::
Perl
;
## script to generate a single PDF file with all POD documentation
## Based on https://gist.github.com/wki/2277444
BEGIN
{
if
(
@ARGV
!=
2
)
{
print
STDERR
"
usage: $0 DIR OUTPUT
\n
";
exit
1
;
}
}
{
# a simple class that uses App::pod2pdf to create pdfs containing many pod files
# The hierarchical outline is generated on the fly while traversing directories
package
MultiPDF
;
use
Moose
;
use
Path::
Class
;
use
App::
pod2pdf
;
has
parser
=>
(
is
=>
'
ro
',
isa
=>
'
App::pod2pdf
',
lazy
=>
1
,
default
=>
sub
{
App::
pod2pdf
->
new
},
);
has
pdf
=>
(
is
=>
'
ro
',
isa
=>
'
PDF::API2
',
lazy
=>
1
,
builder
=>
'
_build_pdf
',
);
sub
_build_pdf
{
my
$self
=
shift
;
$self
->
parser
->
{
pdf
},;
}
sub
process_file
{
my
$self
=
shift
;
my
$file
=
shift
;
say
"
processing file:
$file
";
$self
->
parser
->
parse_from_file
(
$file
->
stringify
);
$self
->
parser
->
formfeed
;
return
$self
;
}
sub
process_dir
{
my
$self
=
shift
;
my
$dir
=
Path::Class::
Dir
->
new
(
shift
);
my
%structure
;
# { _outline => PDF::API2::Outline }
$dir
->
recurse
(
depthfirst
=>
1
,
callback
=>
sub
{
my
$file
=
shift
;
return
if
!-
f
$file
||
$file
->
basename
!~
m{[.](?:pm|pod|pl) \z}xms
;
## Look for POD tags to skip files without documentation
my
$fh
=
$file
->
open
or
die
"
Failed to open
"
.
$file
->
basename
;
my
$has_pod
=
0
;
while
(
<
$fh
>
)
{
$has_pod
=
1
if
(
/^=head1/
);
}
close
$fh
;
return
unless
(
$has_pod
);
my
$nr_pages
=
$self
->
pdf
->
pages
;
$self
->
process_file
(
$file
);
my
$name
=
$file
->
basename
;
$name
=~
s{[.]\w+ \z}{}xms
;
my
$tree
=
\
%structure
;
my
$outline
=
$structure
{
_outline
}
||=
$self
->
pdf
->
outlines
->
outline
;
foreach
my
$part
(
grep
{
$_
ne
'
.
'
}
$file
->
relative
(
$dir
)
->
dir
->
dir_list
,
$name
)
{
$tree
=
$tree
->
{
$part
}
||=
{
_outline
=>
$outline
->
outline
};
$outline
=
$tree
->
{
_outline
};
$outline
->
title
(
$part
);
}
$outline
->
dest
(
$self
->
pdf
->
openpage
(
$nr_pages
));
}
);
return
$self
;
}
sub
print
{
my
$self
=
shift
;
$self
->
parser
->
output
;
}
sub
save_as
{
my
$self
=
shift
;
my
$path
=
shift
;
$self
->
pdf
->
saveas
(
$path
);
}
}
MultiPDF
->
new
->
process_dir
(
$ARGV
[
0
])
->
save_as
(
$ARGV
[
1
]);
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