Skip to content

An intuitive GUI-based Python application allowing a user to effortlessly search files on Perforce Helix Core utilizing specific search patterns.

License

Notifications You must be signed in to change notification settings

spmohara/P4-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P4 Search

Overview

This project was created to automate the searching of files on Perforce Helix Core to easily locate existing Extron Python device drivers containing specific patterns. Due to lack of admin privileges on my work computer, I was unable to use the P4Python library, so instead I leveraged Python to send CLI grep commands to workaround this limitation. Although this is not the most ideal or efficient approach, it did at least provide a solution to my problem.

Description

An intuitive GUI-based Python application allowing a user to effortlessly search files on Perforce Helix Core utilizing specific search patterns.

Features

  • Ability to search using literal text or regular expression patterns
  • Option to select case sensitivity of search patterns
  • Line number references to the original file
  • User-friendly message boxes and tooltips to guide users step-by-step

Download latest released version here

Usage

GUI Initialize

Path field:

GUI Path field

  • Specifies the folder path to search.

Pattern field using literal text:

GUI Pattern field literal text

  • Specifies the literal text to match.

Pattern field using regular expression:

GUI Pattern field regex

  • Specifies the regular expression to match.

Case Sensitive checkbox:

GUI Case Sensitive checkbox

  • Specifies the case sensitivity of search pattern.

Search button:

GUI Search button

  • Initiates the file search.
  • The Enter key can also be used.

Status label:

GUI Status label

  • Shows the progress of the file search.
    • Idle means no file search is currently being performed.
    • In Progress means the file search is in progress.
    • Completed means the file search has completed successfully.

Version label:

GUI Version label

  • Shows the current version of the application.

Examples

Output example with matches found:

GUI Output example matches

Output example with no matches found:

GUI Output example no matches

Error Messages

Missing path field:

MsgBox Missing path

  • Indicates the Path field is empty.

Invalid path field:

MsgBox Invalid path

  • Indicates the Path field contains an invalid folder path.

Missing pattern field:

MsgBox Missing pattern

  • Indicates the Pattern field is empty.

User not logged in:

MsgBox User not logged in

  • Indicates the user is not logged in.
  • Open the Perforce Helix Visual Client (P4V) software to login and then select the Retry button.
  • Selecting the Cancel button will close the error message.

User session expired:

MsgBox User session expired

  • Indicates the current user session has expired.
  • Open the Perforce Helix Visual Client (P4V) software to login and then select the Retry button.
  • Selecting the Cancel button will close the error message.

No such client:

MsgBox No such client

  • Indicates the client (or user) lacks permission to access local files.
  • Either create a new workspace and specify the correct client for 'Workspace name' field, or edit existing workspace.
    • Note: Editing an existing workspace may cause local workspace files to no longer be available.
  • Selecting the Cancel button will close the error message.

Client root conflict:

MsgBox Client root conflict

  • Indicates the Path field points to a different folder that isn't the client's root.
  • Either create a new workspace and specify the desired folder path for 'Workspace root' field, or edit existing workspace.
    • Note: Editing an existing workspace may cause local workspace files to no longer be available.
  • Selecting the Cancel button will close the error message.

Dependencies

  • Python 3.6 or above
  • PySimpleGUI 4.60.5
  • Windows

License

Licensed under the MIT License

About

An intuitive GUI-based Python application allowing a user to effortlessly search files on Perforce Helix Core utilizing specific search patterns.

Topics

Resources

License

Stars

Watchers

Forks

Languages