<commit_before># List files under their current status
require 'git-media/status'

module GitMedia
  module List

    def self.run!(opts)
      @server = GitMedia.get_transport
      self.list_files(opts)
    end

    def self.list_files(opts, server=@server)
      refs = GitMedia::Status.get_status(opts[:dir], server)
      # Set all opts to true if no specific one was given
      if !opts.values_at(:unpulled, :not_on_server, :pulled, :deleted, :unpushed, :cached).any?
        opts.each { |key, value| opts[key] = true }
      end
      puts
      if opts[:unpulled] and refs[:unpulled].size > 0
        GitMedia::Status.display(refs[:unpulled], "Unpulled Media")
        self.display_files(refs[:unpulled])
      end
      if opts[:not_on_server] and refs[:not_on_server].size > 0
        GitMedia::Status.display(refs[:not_on_server], "Media missing on server")
        self.display_files(refs[:not_on_server])
      end
      if opts[:pulled] and refs[:pulled].size > 0
        GitMedia::Status.display(refs[:pulled], "Pulled Media")<commit_msg>Update display for missing on server files<commit_after># List files under their current status
require 'git-media/status'

module GitMedia
  module List

    def self.run!(opts)
      @server = GitMedia.get_transport
      self.list_files(opts)
    end

    def self.list_files(opts, server=@server)
      refs = GitMedia::Status.get_status(opts[:dir], server)
      # Set all opts to true if no specific one was given
      if !opts.values_at(:unpulled, :not_on_server, :pulled, :deleted, :unpushed, :cached).any?
        opts.each { |key, value| opts[key] = true }
      end
      puts
      if opts[:unpulled] and refs[:unpulled].size > 0
        GitMedia::Status.display(refs[:unpulled], "Unpulled Media")
        self.display_files(refs[:unpulled])
      end
      if opts[:not_on_server] and refs[:not_on_server].size > 0
        GitMedia::Status.display(refs[:not_on_server], "Media missing on server")
        self.display_files(refs[:not_on_server], true)
      end
      if opts[:pulled] and refs[:pulled].size > 0
        GitMedia::Status.display(refs[:pulled], "Pulled Media")
{'fraction_non_alphanumeric': 0.12179188054129725, 'fraction_numerical': 0.0027998133457769483, 'mean_word_length': 3.340080971659919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7181848', 'n_tokens_mistral': 709, 'n_tokens_neox': 688, 'n_words': 166}