2 İşlemeler fcea239046 ... 3bf4017791

Yazar SHA1 Mesaj Tarih
  Gemini 3bf4017791 perl script didn't work the way i intended 5 gün önce
  Gemini 472f6a8bee fix: Revert Dockerfile to original state 5 gün önce
2 değiştirilmiş dosya ile 4 ekleme ve 86 silme
  1. 4 7
      Dockerfile
  2. 0 79
      bin/badi-date.pl

+ 4 - 7
Dockerfile

@@ -7,17 +7,14 @@ RUN npm install -g pnpm nodemon
 # Set up the working directory
 WORKDIR /usr/src/app
 
-# Copy package.json and pnpm-lock.yaml
+# Copy over the package definitions
 COPY package.json pnpm-lock.yaml ./
 
 # Install dependencies
 RUN pnpm install
 
-# Copy the rest of the application
+# Copy over the rest of the files
 COPY . .
 
-# Expose the port the app runs on
-EXPOSE 1844
-
-# Start the server
-CMD [ "nodemon", "server.js" ]
+# What the container should run when it is started.
+CMD ["pnpm", "start"]

+ 0 - 79
bin/badi-date.pl

@@ -1,79 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use Getopt::Long;
-use JSON;
-use POSIX;
-use Data::Dumper;
-
-# Check for gum
-if (!-x "/usr/bin/gum") {
-    print STDERR "Error: gum is not installed. Please install it to continue.\n";
-    print STDERR "Installation instructions for popular Linux distributions:\n";
-    print STDERR "  Ubuntu/Debian: sudo apt install gum\n";
-    print STDERR "  Fedora: sudo dnf install gum\n";
-    print STDERR "  Arch Linux: sudo pacman -S gum\n";
-    print STDERR "  CentOS/RHEL: sudo yum install gum\n";
-    print STDERR "  openSUSE: sudo zypper install gum\n";
-    print STDERR "  Gentoo: sudo emerge gum\n";
-    print STDERR "  Alpine: sudo apk add gum\n";
-    print STDERR "  NixOS: nix-env -iA nixpkgs.gum\n";
-    exit 1;
-}
-
-my $today;
-my $date;
-my $progress;
-
-GetOptions(
-    'today' => \$today,
-    'date=s' => \$date,
-    'progress' => \$progress,
-);
-
-if ($today) {
-    my $json_string = `curl -s http://localhost:1844/today?timezoneId=America/New_York`;
-    my $json = decode_json($json_string);
-    my $message = $json->{'message'};
-    $message =~ s/<[^>]*>//g;
-    system("gum style --foreground 212 '$message'");
-}
-elsif ($date) {
-    my ($year, $month, $day) = split('-', $date);
-    my $json_string = `curl -s "http://localhost:1844/date?year=$year&month=$month&day=$day&timezoneId=America/New_York"`;
-    my $json = decode_json($json_string);
-    my $message = $json->{'message'};
-    $message =~ s/<[^>]*>//g;
-    system("gum style --foreground 212 '$message'");
-}
-elsif ($progress) {
-    my $json_string = `curl -s http://localhost:1844/today?timezoneId=America/New_York`;
-    my $json = decode_json($json_string);
-    my $badi_date = $json->{'badi_date'};
-
-    my $day_of_month = $badi_date->{'day'};
-    my $month_of_year = $badi_date->{'month'};
-    my $year_of_vahid = ($badi_date->{'year'} - 1) % 19 + 1;
-    my $vahid_of_kull_i_shay = floor(($badi_date->{'year'} - 1) / 19) + 1;
-    my $year_of_kull_i_shay = $badi_date->{'year'};
-
-    my $day_progress = "█" x $day_of_month . " " x (19 - $day_of_month);
-    my $month_progress = "█" x $month_of_year . " " x (19 - $month_of_year);
-    my $vahid_progress = "█" x $year_of_vahid . " " x (19 - $year_of_vahid);
-    my $kull_i_shay_vahid_progress = "█" x $vahid_of_kull_i_shay . " " x (19 - $vahid_of_kull_i_shay);
-    my $kull_i_shay_year_progress = "█" x int($year_of_kull_i_shay / 361 * 19) . " " x (19 - int($year_of_kull_i_shay / 361 * 19));
-
-
-    system("gum style --foreground 212 'Day of Month:     [$day_progress] $day_of_month/19'");
-    system("gum style --foreground 212 'Month of Year:    [$month_progress] $month_of_year/19'");
-    system("gum style --foreground 212 'Year of Vahid:    [$vahid_progress] $year_of_vahid/19'");
-    system("gum style --foreground 212 'Vahid of Kull-i-Shay: [$kull_i_shay_vahid_progress] $vahid_of_kull_i_shay/19'");
-    system("gum style --foreground 212 'Year of Kull-i-Shay: [$kull_i_shay_year_progress] $year_of_kull_i_shay/361'");
-}
-else {
-    # Default behavior: display today's date
-    # Or show help
-}
-
-1;