Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docu-tools
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
docu-tools
Commits
663aa6a5
Commit
663aa6a5
authored
11 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
integrated code from a different project
parent
d6578123
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
perl/Gnome-Tomboy/lib/Tomboy.pm
+62
-0
62 additions, 0 deletions
perl/Gnome-Tomboy/lib/Tomboy.pm
with
62 additions
and
0 deletions
perl/Gnome-Tomboy/lib/Tomboy.pm
0 → 100644
+
62
−
0
View file @
663aa6a5
=head1 NAME
Tomboy
=head1 DESCRIPTION
utility functions to work with Tomboy
=head1 SYNOPSIS
use Tomboy;
$text2= $Tomboy::link($text);
$text2= $Tomboy::list_item($text);
=head1 INTERNAL FUNCTIONS
=cut
package
Tomboy
;
use
strict
;
use
UUID
;
sub
link
{
my
$s
=
shift
;
'
<link:internal>
'
.
$s
.
'
</link:internal>
';
}
sub
list_item
{
my
$s
=
shift
;
'
<list-item dir="ltr">
'
.
$s
.
'
</list-item>
';
}
=head2 ts_ISO ($time)
return timestamp in ISO format as used by Tomboy
=cut
sub
ts_ISO
{
my
$time
=
shift
||
time
();
my
@ts
=
localtime
(
$time
);
sprintf
("
%04d-%02d-%02dT%02d:%02d:%02d.0000000+01:00
",
$ts
[
5
]
+
1900
,
$ts
[
4
]
+
1
,
$ts
[
3
],
$ts
[
2
],
$ts
[
1
],
$ts
[
0
]);
}
sub
get_uuid
{
my
(
$uuid
,
$uuid_str
);
UUID::
generate
(
$uuid
);
UUID::
unparse
(
$uuid
,
$uuid_str
);
$uuid_str
;
}
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