Browse Source

add Build.PL and move git-feed to a bin dir

Brennen Bearnes 7 months ago
parent
commit
c78f2f45cb
2 changed files with 28 additions and 29 deletions
  1. 19
    0
      Build.PL
  2. 9
    29
      bin/git-feed

+ 19
- 0
Build.PL View File

@@ -0,0 +1,19 @@
1
+use Module::Build;
2
+
3
+my $build = Module::Build->new(
4
+
5
+ module_name => 'App::GitFeed',
6
+
7
+ license  => 'gpl',
8
+
9
+ requires => {
10
+   'perl'                  => '5.10.0',
11
+   'XML::Atom::SimpleFeed' => '0.8',
12
+   'HTML::Entities'        => 0,
13
+   'Getopt::Long'          => 0,
14
+   'IPC::System::Simple'   => '0.11',
15
+ }
16
+
17
+);
18
+
19
+$build->create_build_script;

git-feed → bin/git-feed View File

@@ -32,46 +32,26 @@ git configuration, but it seems to work.
32 32
 
33 33
 B<--project_url=...>
34 34
 
35
-=over
36
-
37 35
 Set a URL for the project.
38 36
 
39
-=back
40
-
41 37
 B<--feed_url=...>
42 38
 
43
-=over
44
-
45 39
 Set an explicit URL for the feed itself.
46 40
 
47
-=back
48
-
49 41
 B<--title=...>
50 42
 
51
-=over
52
-
53 43
 Set an explicit title for the feed.  Will otherwise be read from
54 44
 .git/description, if available.
55 45
 
56
-=back
57
-
58 46
 B<--entries=>I<n>
59 47
 
60
-=over
61
-
62 48
 Explicitly request I<n> entries.  Defaults to 10.
63 49
 
64
-=back
65
-
66 50
 B<--author=...>
67 51
 
68
-=over
69
-
70 52
 Explicitly set an author string.  Defaults to git config's current idea of
71 53
 user.name.
72 54
 
73
-=back
74
-
75 55
 =head1 EXAMPLES
76 56
 
77 57
     git-feed --project_url=https://p1k3.com/userland-book/ > feed.xml
@@ -90,8 +70,8 @@ or:
90 70
 ...depending on which one gave me less static on a given system.  I don't
91 71
 really know what I'm doing in the Perl ecosystem any more, though.
92 72
 
93
-Anyway, if you put git-feed in your path, you can probably invoke it like
94
-any other git subcommand:
73
+Anyway, if you put git-feed in your path, you can probably invoke it like any
74
+other git subcommand:
95 75
 
96 76
     git feed > feed.xml
97 77
 
@@ -101,8 +81,8 @@ Brennen Bearnes <bbearnes@gmail.com>
101 81
 
102 82
 =head1 LICENSE
103 83
 
104
-This utility is free software, licensed under the terms of the GPL, v2.
105
-See COPYING for a complete copy of the license.
84
+This utility is free software, licensed under the terms of the GPL, v2.  See
85
+COPYING for a complete copy of the license.
106 86
 
107 87
 =cut
108 88
 
@@ -187,11 +167,11 @@ while ($log =~ m/^([a-z0-9]+) _ (.*) _ (.*)$/gm) {
187 167
   # GitHub or what-have-you.
188 168
 
189 169
   $feed->add_entry(
190
-    title     => $subj,
191
-    link      => $project_url,
192
-    id        => $hash,
193
-    content   => $formatted_commit,
194
-    updated   => $date,
170
+    title   => $subj,
171
+    link    => $project_url,
172
+    id      => $hash,
173
+    content => $formatted_commit,
174
+    updated => $date,
195 175
   );
196 176
 }
197 177