diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cae2026..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -etc/config.yaml -cron/ -plexReport.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9c98c9d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +FROM phusion/baseimage:0.9.18 +MAINTAINER ninthwalker + +# Set correct environment variables +ENV HOME /root +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 + +# Use baseimage-docker's init system +CMD ["/sbin/my_init"] + +#copy plexReport files +COPY root/ / + +#add new web_email_body.erb +RUN mkdir -p /etc/my_init.d +ADD /root/add_new_file.sh /etc/my_init.d/add_new_file.sh + +# Configure user nobody to match unRAID's settings + RUN \ + usermod -u 99 nobody && \ + usermod -g 100 nobody && \ + usermod -d /home nobody && \ + chown -R nobody:users /home + +RUN \ +add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ +add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ +apt-get update -q && \ +apt-get install -qy ruby ruby-dev git make gcc && \ +apt-get clean -y && \ +rm -rf /var/lib/apt/lists/* && \ +cd /opt/gem && \ +gem install bundler -v 1.12.3 && \ +bundle install + +VOLUME /config + diff --git a/README.md b/README.md index 551b60f..f275b0c 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,16 @@ -plexWeeklyReport +plexReport ================ -Scripts to generate a weekly email of new additions to Plex. +A dockerized version of bstascavage's original plexReport (https://github.com/bstascavage/plexReport) ## Introduction -This script is meant to send out a summary of all new Plex entries to your server to all of your server's users. +This docker generates an email summary of new additions to Plex to send to your users ## Supported Platforms -* Debian -* Ubuntu 14.04 LTS -* Mac OSX +* unRAID, Other Linux ## Supported Email Clients * Gmail -* Mozilla Thunderbird ## Supported Plex Agents * themoviedb @@ -22,105 +19,51 @@ This script is meant to send out a summary of all new Plex entries to your serve ## Prerequisites -The following are needed to run this script: +The following are needed to run this docker: -1. Ruby installed (at least version 1.9.3) and ruby-dev. -2. For OSX: make sure you have Ruby installed using RVM (This is needed to create a wrapper to weekly run the script through crontab) (see http://railsapps.github.io/installrubyonrails-mac.html. Follow the steps from "Prepare your computer" until "Rails installation options"). -3. themoviedb set as your Agent for your Movie section on your Plex server. +1. Plex. +2. themoviedb set as your Agent for your Movie section on your Plex server. 3. thetvdb.org set as your Agent for your TV section on your Plex server. -4. (Optional) A Gmail account to forward the email (Gmail is the only supported provider, so if you use another, YMMV). +4. A Gmail account to forward the email (Gmail is the only supported provider, so if you use another, YMMV). -## Installation (Linux) +## Installation (unRAID) -1. Clone this repo on your server: +Preferred installation method: From the Community Applications 'APPS' section in unRAID. +You can also install by adding the following template repository to unraid: +https://github.com/ninthwalker/docker-templates/ - `git clone https://github.com/bstascavage/plexReport.git` -2. Change to the plexReport directory -3. Run the initial_setup script: +After installing, run the following commands from the command line: +(This initial_setup only has to be done once. Reinstalls of the docker do not require it) - `./initial_setup.sh` +`docker exec -it plexReport ./initial_setup.sh` -4. If you want to run your script with different commandline parameters, you'll need to edit the crontab. See here for reference: http://www.adminschoice.com/crontab-quick-reference - -## Installation (OS X) -Part 1: Install plexReport +Follow Prompts. -1. Clone this repo on your server: +plexReport can be run with the following command from unraid: - `git clone https://github.com/bstascavage/plexReport.git` -2. Change to the plexReport directory -3. Install the blunder gem (http://bundler.io/) +`docker exec plexReport plexreport [-options]` - `gem install bundler` -4. Install the gem dependecies: +You can now edit the `config.yaml` (and optionally `email_body.erb`) with your own settings in your appdata dir. +See `/config/config.yaml.example` and below for details. - `bundle install` -5. Setup the config file in `etc/config.yaml`. See `etc/config.yaml.example` and below for details -6. Run `bin/plexreport` to execute the script -It should work correctly - +To schedule the report to occur regulary please use the new cron system for unRAID 6: -Part 2: Create Ruby Wrapper +Edit the "plexreport_schedule.cron" file found in the plexreport appdata folder with your own time/date. +Copy that file to the following location. Each time unraid is started it will load your plexreport_schedule. -Now to have the script run once a week through crontab, you have to create an RVM alias by doing the following steps: -(Note: You need an RVM alias because launchd, cron, and other process schedulers operate in discrete bash shell environments. Simply calling ruby from inside your launchd or cron script will not work; that will invoke the non-RVM ruby that OS X shipped with. Instead, you need an RVM alias, which will run your file through RVM's ruby, from inside launchd.) +`/boot/config/plugins/dynamix/` -1. Determine your ruby version by entering +To have it added immediately without restarting unRAID, at the command prompt type `update_cron`. - `which ruby` - this should results in: - `/Users/you/.rvm/rubies/ruby-2.2.0/bin/ruby` - ruby-2.2.0 is your ruby version +See this page for help creating a time/date in cron: http://abunchofutils.com/u/computing/cron-format-helper/ -2. Create a wrapper by entering +## Config - `rvm alias create plexReport ruby-2.2.0@plexReport` - Note: Replace ruby-2.2.0 with the version that you have determined in step 1 - -3. Test the wrapper by entering - - `$rvm_path/wrappers/plexReport/ruby /bin/plexReport.rb -t` - Note: Replace with the path leading to your plexReport directory - - It should run and exit properly (be patient it might take a few minutes). - -4. Next determine the absolute path to your wrapper. Just run +By default, the config file is located in `/config/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: - `echo $rvm_path` - it should result in something like this /users/esw1187/.rvm/ - - Substitute '$rvm_path' in the wrapper call with the absolute rvm path obtaine above and run it again by entering - - `/users/ersw1187/.rvm/wrappers/plexReport/ruby /path_to/plexReport/bin/plexReport.rb` - -5. Create bash script to run the Rub code by doing the following: - - Create a file on your desktop named 'plexReport.sh' and open it with TextEdit +###### email_body.erb - - Copy the following two lines in the file - `export LC_ALL=en_US.UTF-8` - `export LANG=en_US.UTF-8` - - - Add the wrapper call you just tested in step 4 to the file that you have just tested. E.g. - `/users/ersw1187/.rvm/wrappers/plexReport/ruby /path_to/plexReport/bin/plexReport` - -6. Copy plexReport.sh to /user/local/bin directory - -7. Go to the /usr/local/bin directory and set the correct permissions by entering - `chmod u+x plexReport.sh` - -8. Add the following line to your crontab (sudo crontab -e) - - `15 11 * * 5 /usr/local/bin/plexReport.sh` - (This will run it every Friday at 11:15. To change the time, see crontab documentation: - http://www.adminschoice.com/crontab-quick-reference - -## Upgrading - -To upgrade your code, cd to your plexReport directory and run `./update.sh` - -## Config file - -By default, the config file is located in `/etc/plexReport/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: +This file can be edited with CSS/HTML if you want to modify the look of the email. ###### email `title` - Banner title for the email body. Required. @@ -153,7 +96,9 @@ By default, the config file is located in `/etc/plexReport/config.yaml`. If you ## Command-line Options -Once installed, you can run the script by simply running `plexreport`. If you need to reinstall or reconfigure the program, run `plexreport-setup`. All commandline options can be seen by running `plexReport --help` +Once installed, you can run the script by simply running `plexreport` from within the docker image container. + +If you need to reconfigure the program configs, first delete the existing config files and rerun '. /initial_setup.sh`. All commandline options can be seen by running `plexreport --help` ##### Options: `-n, --no-plex-email` - Do not send emails to Plex friends. Can be used with the `recipients_email` and `recipients` config file option to customize email recipients. @@ -169,11 +114,9 @@ Once installed, you can run the script by simply running `plexreport`. If you n New Episodes: ![alt tag](http://i.imgur.com/hWzHl2x.png) - New Seasons: ![alt tag](http://i.imgur.com/sBy62Ty.png) - New Movies: ![alt tag](http://i.imgur.com/E3Q85uU.png) diff --git a/images/plex.png b/images/plex.png index 4bc48f7..61213e4 100644 Binary files a/images/plex.png and b/images/plex.png differ diff --git a/initial_setup.sh b/initial_setup.sh deleted file mode 100755 index 366eb88..0000000 --- a/initial_setup.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Bash script that copies plexreport files to various directories -# and walks the user through the initial setup -# - -PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/etc/plexReport' - -/bin/echo "Creating plexreport library at /var/lib/plexReport" -/bin/mkdir -p $PLEX_REPORT_LIB -/bin/echo "Creating plexreport conf directory at /etc/plexReport" -/bin/mkdir -p $PLEX_REPORT_CONF - -/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" -/bin/cp -r bin/* /usr/local/sbin -/bin/echo "Moving plexreport libraries to /var/lib/plexreport" -/bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexreport" -/bin/cp -r etc/* $PLEX_REPORT_CONF - -/bin/echo "Creating /etc/plexreport/config.yaml" -/usr/bin/touch /etc/plexReport/config.yaml -/bin/echo "Creating /var/log/plexReport.log" -/usr/bin/touch /var/log/plexReport.log - -/bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler -/usr/local/bin/bundle install - -/bin/echo "Running /usr/local/sbin/plexreport-setup" -/usr/local/sbin/plexreport-setup - -/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" -read CRON_DAY -/bin/echo "What hour should the script run? (00-23)" -read CRON_HOUR -/bin/echo "What minute in that hour should the script run? (00-59)" -read CRON_MINUTE - -/bin/echo "Adding /usr/local/sbin/plexreport to crontab" -/usr/bin/crontab -l > mycron -/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron -/usr/bin/crontab mycron -/bin/rm mycron - -/bin/echo "Setup complete!" diff --git a/root/add_new_file.sh b/root/add_new_file.sh new file mode 100755 index 0000000..a26ecf5 --- /dev/null +++ b/root/add_new_file.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Added to check if new web_email_body.erb file exists, if not, add. +if [ -f /config/web_email_body.erb ]; then + echo # new line, do nothing +else + # copy new file + cp /opt/config/web_email_body.erb /config/ + chmod -R 666 /config/web_email_body.erb +fi diff --git a/root/initial_setup.sh b/root/initial_setup.sh new file mode 100755 index 0000000..e5aacda --- /dev/null +++ b/root/initial_setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +#walks the user through the initial setup +echo + +if [ -f /config/config.yaml ]; then + echo "Config files detected. Using existing config" + echo # move to a new line +else + # begin initial setup + cp /opt/config/* /config/ + chmod -R 666 /config/* + /usr/local/sbin/plexreport-setup + echo "Setup complete! Please read directions for running this on a schedule." +fi diff --git a/root/opt/config/config.yaml b/root/opt/config/config.yaml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/opt/config/config.yaml @@ -0,0 +1 @@ + diff --git a/etc/config.yaml.example b/root/opt/config/config.yaml.example similarity index 100% rename from etc/config.yaml.example rename to root/opt/config/config.yaml.example diff --git a/etc/email_body.erb b/root/opt/config/email_body.erb similarity index 98% rename from etc/email_body.erb rename to root/opt/config/email_body.erb index a9ff6a4..bdccf2a 100644 --- a/etc/email_body.erb +++ b/root/opt/config/email_body.erb @@ -339,7 +339,7 @@ background: #CC0000 !important;
+

@@ -355,6 +355,38 @@ background: #CC0000 !important;

<%= $config['email']['title'] %>

<%= I18n.l Time.now.to_date, format: :long %>


+ + <% if movies != [] %> +

<%= I18n.t :new_movies %>:

+ + <% movies.each do |movie| %> +
-

+ +
+ + +
+
+ + + +
+
<%= movie[:title] %> (<%= movie[:date] %>)
+

<%= movie[:tagline] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

+ <% end %> +

<%= movie[:synopsis] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

+ <% else %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

+ <% end %> +
@@ -365,7 +397,7 @@ background: #CC0000 !important; <% new_episodes.each do |episode| %>
+ <% end %> + <% end %> + +

<% if new_episodes != [] %>

<%= I18n.t :new_episodes %>:

+
-
@@ -383,13 +415,13 @@ background: #CC0000 !important; <% end %> <% end %> -
+

<% if new_seasons != [] %>

<%= I18n.t :new_seasons %>:

<% new_seasons.each do |season| %>
+
-
@@ -407,36 +439,6 @@ background: #CC0000 !important; <% end %>
- <% if movies != [] %> -

<%= I18n.t :new_movies %>:

- - <% movies.each do |movie| %> -
- -
- - -
-
- - - -
-
<%= movie[:title] %> (<%= movie[:date] %>)
-

<%= movie[:tagline] %>

- <% if $options[:detail_email] %> -

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

- <% end %> -

<%= movie[:synopsis] %>

- <% if $options[:detail_email] %> -

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

- <% else %> -

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

- <% end %> -
- <% end %> - <% end %> -

<%= I18n.t :thanks_sentence %>

diff --git a/root/opt/config/plexReport.log b/root/opt/config/plexReport.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/opt/config/plexReport.log @@ -0,0 +1 @@ + diff --git a/root/opt/config/plexreport_schedule.cron b/root/opt/config/plexreport_schedule.cron new file mode 100644 index 0000000..598dde0 --- /dev/null +++ b/root/opt/config/plexreport_schedule.cron @@ -0,0 +1,3 @@ +# Sends a weekly Plex Report email on Friday's at 10:30hrs. See http://www.adminschoice.com/crontab-quick-reference for cron help. +30 10 * * 5 docker exec plexReport plexreport &> /dev/null + diff --git a/root/opt/config/web_email_body.erb b/root/opt/config/web_email_body.erb new file mode 100644 index 0000000..bdccf2a --- /dev/null +++ b/root/opt/config/web_email_body.erb @@ -0,0 +1,458 @@ + + + + + + + + + +
+
+ + +
+
+ + +
+ + + + +
+

+ +
+
+
+ + + + + <% new_episodes.each do |episode| %> +
+ +
+

<%= $config['email']['title'] %>

+

<%= I18n.l Time.now.to_date, format: :long %>

+
+ + <% if movies != [] %> +

<%= I18n.t :new_movies %>:

+ + <% movies.each do |movie| %> +
+ +
+ + +
+
+ + + +
+
<%= movie[:title] %> (<%= movie[:date] %>)
+

<%= movie[:tagline] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

+ <% end %> +

<%= movie[:synopsis] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

+ <% else %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

+ <% end %> +
+ +
+ <% end %> + <% end %> + +

+ <% if new_episodes != [] %> +

<%= I18n.t :new_episodes %>:

+
+ +
+ + +
+
+ + + +
+
<%= episode[:series_name] %>
+

<%= episode[:episode_number] %> - <%= episode[:title] %>

+

<%= episode[:synopsis] %>

+

<%= I18n.t :network %>: <%= episode[:network] %>

+

<%= I18n.t :air_date %>: <%= episode[:airdate] %>

+
+ <% end %> + <% end %> + +

+ <% if new_seasons != [] %> +

<%= I18n.t :new_seasons %>:

+ <% new_seasons.each do |season| %> +
+ +
+ + +
+
+ + + +
+
<%= season[:series_name] %>
+

<%= I18n.t :seasons, count: season[:season].length %><%= season[:season].min %>-<%= season[:season].max %>

+

<%= season[:synopsis] %>

+

<%= I18n.t :network %>: <%= season[:network] %>

+
+
+ <% end %> + <% end %> + +
+ + +
+
+

<%= I18n.t :thanks_sentence %>

+
+
+
+ + + diff --git a/Gemfile b/root/opt/gem/Gemfile similarity index 100% rename from Gemfile rename to root/opt/gem/Gemfile diff --git a/Gemfile.lock b/root/opt/gem/Gemfile.lock similarity index 100% rename from Gemfile.lock rename to root/opt/gem/Gemfile.lock diff --git a/bin/plexreport b/root/usr/local/sbin/plexreport similarity index 97% rename from bin/plexreport rename to root/usr/local/sbin/plexreport index 6aae5da..e75e684 100755 --- a/bin/plexreport +++ b/root/usr/local/sbin/plexreport @@ -62,13 +62,13 @@ class PlexReport def initialize begin - $config = YAML.load_file('/etc/plexReport/config.yaml') + $config = YAML.load_file('/config/config.yaml') rescue Errno::ENOENT => e abort('Configuration file not found. Exiting...') end begin - $logger = Logger.new('/var/log/plexReport.log') + $logger = Logger.new('/config/plexReport.log') if $options[:verbose] $logger.level = Logger::DEBUG @@ -369,8 +369,9 @@ def main new_seasons = new_episodes[:seasons] new_episodes = new_episodes[:new] - YAML.load_file('/etc/plexReport/config.yaml') - template = ERB.new File.new("/etc/plexReport/email_body.erb").read, nil, "%" + YAML.load_file('/config/config.yaml') + template = ERB.new File.new("/config/email_body.erb").read, nil, "%" + webtemplate = ERB.new File.new("/config/web_email_body.erb").read, nil, "%" mail = MailReport.new($config, $options) if (movies.empty? && new_seasons.empty? && new_episodes.empty?) @@ -380,6 +381,10 @@ def main mail.sendMail(template.result(binding)) + output = File.new("/config/plexreport.html","w") + output << webtemplate.result(binding) + output.close + $logger.info("Script complete. Ran in #{Time.now - startTime} seconds") end main() diff --git a/bin/plexreport-setup b/root/usr/local/sbin/plexreport-setup similarity index 92% rename from bin/plexreport-setup rename to root/usr/local/sbin/plexreport-setup index 814cbdd..e196ec3 100755 --- a/bin/plexreport-setup +++ b/root/usr/local/sbin/plexreport-setup @@ -17,7 +17,7 @@ class Setup def initialize begin $config = Hash.new -# $config = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), '../etc/config.yaml') ) +# $config = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), '/config/config.yaml') ) rescue Errno::ENOENT => e abort('Configuration file not found. Exiting...') end @@ -78,7 +78,7 @@ class Setup end $config['mail']['username'] = ask("Enter your SMTP username/email address (For Gmail, use email address)") { |q| q.echo = true } - $config['mail']['password'] = ask("Enter your email password (This will only be saved in etc/config.yaml)") { |q| q.echo = "*" } + $config['mail']['password'] = ask("Enter your email password (This will only be saved in config.yaml)") { |q| q.echo = "*" } $config['mail']['from'] = ask("Display name of the sender (default: Plex Server)") { |q| q.echo = true } if $config['mail']['from'].empty? @@ -101,8 +101,8 @@ class Setup self.setPlexApiKey self.setEmail - File.open('/etc/plexReport/config.yaml', 'w') {|f| f.write $config.to_yaml } - puts "Writing information to /etc/plexReport/config.yaml" + File.open('/config/config.yaml', 'w') {|f| f.write $config.to_yaml } + puts "Writing information to config.yaml" end end diff --git a/lib/locales/de.yml b/root/var/lib/plexReport/locales/de.yml similarity index 95% rename from lib/locales/de.yml rename to root/var/lib/plexReport/locales/de.yml index 752564d..9e55b0a 100644 --- a/lib/locales/de.yml +++ b/root/var/lib/plexReport/locales/de.yml @@ -58,7 +58,7 @@ de: director: "Regie" from: "für" genre: "Genre" - help_page_sentence: "Ein Problem? Diese Seite gefällt Ihnen? Sie möchten helfen? Dann schauen Sie doch einmal auf meiner github-Seite vorbei!" + help_page_sentence: "Ein Problem? Diese Seite gefällt Ihnen? Sie möchten helfen? Dann schauen Sie doch einmal auf meiner github-Seite vorbei!" imdb_rating: "IMDB-Rating" minutes: "Minuten" network: "Sender" diff --git a/lib/locales/en.yml b/root/var/lib/plexReport/locales/en.yml similarity index 97% rename from lib/locales/en.yml rename to root/var/lib/plexReport/locales/en.yml index 42561fe..08fe657 100644 --- a/lib/locales/en.yml +++ b/root/var/lib/plexReport/locales/en.yml @@ -58,7 +58,7 @@ en: director: "Director" from: "from" genre: "Genre" - help_page_sentence: "Have an issue? Like what you see? Want to help? Then please check out my github page" + help_page_sentence: "Have an issue? Like what you see? Want to help? Then please check out my github page" imdb_rating: "IMDB Rating" minutes: "minutes" network: "Network" diff --git a/lib/locales/fr.yml b/root/var/lib/plexReport/locales/fr.yml similarity index 96% rename from lib/locales/fr.yml rename to root/var/lib/plexReport/locales/fr.yml index 226ecfd..00e1db7 100644 --- a/lib/locales/fr.yml +++ b/root/var/lib/plexReport/locales/fr.yml @@ -58,7 +58,7 @@ fr: director: "Réalisateur" from: "pour" genre: "Genre" - help_page_sentence: "Vous avez un problème ? Vous aimez ? Vous voulez aider ? Venez visiter la page github du projet" + help_page_sentence: "Vous avez un problème ? Vous aimez ? Vous voulez aider ? Venez visiter la page github du projet" imdb_rating: "Note IMDB" minutes: "minutes" network: "Chaine" diff --git a/lib/mailReport.rb b/root/var/lib/plexReport/mailReport.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/mailReport.rb rename to root/var/lib/plexReport/mailReport.rb diff --git a/lib/omdb.rb b/root/var/lib/plexReport/omdb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/omdb.rb rename to root/var/lib/plexReport/omdb.rb diff --git a/lib/plex.rb b/root/var/lib/plexReport/plex.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/plex.rb rename to root/var/lib/plexReport/plex.rb diff --git a/lib/plexTv.rb b/root/var/lib/plexReport/plexTv.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/plexTv.rb rename to root/var/lib/plexReport/plexTv.rb diff --git a/lib/themoviedb.rb b/root/var/lib/plexReport/themoviedb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/themoviedb.rb rename to root/var/lib/plexReport/themoviedb.rb diff --git a/lib/thetvdb.rb b/root/var/lib/plexReport/thetvdb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/thetvdb.rb rename to root/var/lib/plexReport/thetvdb.rb diff --git a/update.sh b/update.sh deleted file mode 100755 index 89c8907..0000000 --- a/update.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Bash script to pull the newest code from Github and copy it to the correct locations -PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/etc/plexReport' - -/bin/echo "Grabbing newest code from https://github.com/bstascavage/plexReport" -/usr/bin/git pull - -/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" -/bin/cp -r bin/* /usr/local/sbin -/bin/echo "Moving plexreport libraries to /var/lib/plexReport" -/bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexReport" -/bin/cp -r etc/* $PLEX_REPORT_CONF - -/bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler -/usr/local/bin/bundle install - -/bin/echo "Upgrade complete"