Skip to content

Python scraper based on AI

add

VinciGit008e4a8e86a845
diff --git a/commit_and_push.sh b/commit_and_push.sh
new file mode 100755
index 00000000..14f39ef1
--- /dev/null
+++ b/commit_and_push.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Script: commit_and_push.sh
+# Description: This script performs pylint checks on specified Python files,
+# adds them to the Git repository, commits the changes with a provided message,
+# and pushes the changes to the remote repository.
+
+# Usage: ./commit_and_push.sh <commit_message>
+# <commit_message>: The message to be used for the Git commit.
+
+# Check if an argument is provided
+if [ $# -eq 0 ]; then
+ echo "Usage: $0 <commit_message>"
+ exit 1
+fi
+
+# Extract the commit message from the argument
+commit_message="$1"
+
+# Run Pylint on the specified Python files
+pylint scrapegraphai/**/*.py scrapegraphai/*.py examples/*.py tests/*.py
+
+# Add the modified files to the Git repository
+git add .
+
+# Commit the changes with the provided message
+git commit -m "$commit_message"
+
+# Push the changes to the remote repository
+git push