longcat-ai 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: longcat-ai
3
+ Version: 1.0.0
4
+ Summary: Autonomous AI Bot Developer (Auto Code Edit & Create)
5
+ Home-page: https://pypi.org/project/longcat-ai/
6
+ Author: BotMaster
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: requests
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: requires-dist
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ # Longcat AI 🤖🚀
23
+
24
+ **Longcat AI** is a powerful, autonomous AI-driven coding assistant and web automation tool. It doesn't just give you advice; it **actually writes and edits code directly in your local environment.**
25
+
26
+ Powered by the **LongCat-2.0-Preview** model, this tool acts as your personal Junior Developer who can read your files, understand your project structure, and perform autonomous updates.
27
+
28
+ ---
29
+
30
+ ## 🔥 Key Features
31
+
32
+ - 🧠 **Autonomous Coding:** Request a new script, and Longcat will create the file and write the code for you.
33
+ - 🛠️ **AI Code Editing:** Ask to fix bugs or add features to existing files. Longcat reads the file, identifies the logic, and applies the changes automatically.
34
+ - 📂 **Context Awareness:** Automatically scans your current directory to understand which scripts and files are available.
35
+ - 🤖 **Smart File Management:** Uses specialized markers (`[WRITE:]` and `[READ:]`) to interact with your filesystem without manual copy-pasting.
36
+ - 🗣️ **Hinglish Support:** Communicates in friendly Hinglish (Hindi + English), making it easy to use for everyone.
37
+
38
+ ---
39
+
40
+ ## 🚀 Installation
41
+
42
+ Install the package globally via pip:
43
+
44
+ ```bash
45
+ pip install longcat-ai
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 🛠️ Usage
51
+
52
+ ### 1. Launch the Tool
53
+ Open your terminal in any project folder and type:
54
+ ```bash
55
+ longcat
56
+ ```
57
+
58
+ ### 2. Initial Setup
59
+ On your first run, the tool will ask for your **Longcat API Key**. You can get your key from [api.longcat.chat](https://api.longcat.chat). The key is stored securely in your home directory (`~/.longcat_config.json`).
60
+
61
+ ### 3. Example Commands
62
+ - *"Bhai, ek Python script bana de jo Bitcoin ki price track kare."* (Creates a new file)
63
+ - *"Mera api.sh check kar aur usme error fix kar."* (Reads and edits existing file)
64
+ - *"Is folder mein kaun-kaun si scripts hain?"* (Lists files with AI analysis)
65
+
66
+ ---
67
+
68
+ ## ☕ Support / Buy Me a Coffee
69
+
70
+ If this tool saved you time or helped you build something cool, feel free to support the developer!
71
+
72
+ 💬 **Telegram:** [@WISEMONEYMAKER](https://t.me/WISEMONEYMAKER)
73
+
74
+ ---
75
+
76
+ ## 📄 License
77
+ MIT License - Feel free to use and extend!
@@ -0,0 +1,56 @@
1
+ # Longcat AI 🤖🚀
2
+
3
+ **Longcat AI** is a powerful, autonomous AI-driven coding assistant and web automation tool. It doesn't just give you advice; it **actually writes and edits code directly in your local environment.**
4
+
5
+ Powered by the **LongCat-2.0-Preview** model, this tool acts as your personal Junior Developer who can read your files, understand your project structure, and perform autonomous updates.
6
+
7
+ ---
8
+
9
+ ## 🔥 Key Features
10
+
11
+ - 🧠 **Autonomous Coding:** Request a new script, and Longcat will create the file and write the code for you.
12
+ - 🛠️ **AI Code Editing:** Ask to fix bugs or add features to existing files. Longcat reads the file, identifies the logic, and applies the changes automatically.
13
+ - 📂 **Context Awareness:** Automatically scans your current directory to understand which scripts and files are available.
14
+ - 🤖 **Smart File Management:** Uses specialized markers (`[WRITE:]` and `[READ:]`) to interact with your filesystem without manual copy-pasting.
15
+ - 🗣️ **Hinglish Support:** Communicates in friendly Hinglish (Hindi + English), making it easy to use for everyone.
16
+
17
+ ---
18
+
19
+ ## 🚀 Installation
20
+
21
+ Install the package globally via pip:
22
+
23
+ ```bash
24
+ pip install longcat-ai
25
+ ```
26
+
27
+ ---
28
+
29
+ ## 🛠️ Usage
30
+
31
+ ### 1. Launch the Tool
32
+ Open your terminal in any project folder and type:
33
+ ```bash
34
+ longcat
35
+ ```
36
+
37
+ ### 2. Initial Setup
38
+ On your first run, the tool will ask for your **Longcat API Key**. You can get your key from [api.longcat.chat](https://api.longcat.chat). The key is stored securely in your home directory (`~/.longcat_config.json`).
39
+
40
+ ### 3. Example Commands
41
+ - *"Bhai, ek Python script bana de jo Bitcoin ki price track kare."* (Creates a new file)
42
+ - *"Mera api.sh check kar aur usme error fix kar."* (Reads and edits existing file)
43
+ - *"Is folder mein kaun-kaun si scripts hain?"* (Lists files with AI analysis)
44
+
45
+ ---
46
+
47
+ ## ☕ Support / Buy Me a Coffee
48
+
49
+ If this tool saved you time or helped you build something cool, feel free to support the developer!
50
+
51
+ 💬 **Telegram:** [@WISEMONEYMAKER](https://t.me/WISEMONEYMAKER)
52
+
53
+ ---
54
+
55
+ ## 📄 License
56
+ MIT License - Feel free to use and extend!
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="longcat-ai",
5
+ version="1.0.0",
6
+ author="BotMaster",
7
+ description="Autonomous AI Bot Developer (Auto Code Edit & Create)",
8
+ long_description=open("README.md").read(),
9
+ long_description_content_type="text/markdown",
10
+ url="https://pypi.org/project/longcat-ai/",
11
+ package_dir={"": "src"},
12
+ packages=find_packages(where="src"),
13
+ install_requires=[
14
+ "requests",
15
+ ],
16
+ classifiers=[
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ],
21
+ python_requires='>=3.6',
22
+ entry_points={
23
+ 'console_scripts': [
24
+ 'longcat=longcat_ai:main',
25
+ ],
26
+ },
27
+ )
@@ -0,0 +1,141 @@
1
+ import requests
2
+ import time
3
+ import logging
4
+ from pathlib import Path
5
+
6
+ # ✅ Logging setup
7
+ logging.basicConfig(
8
+ level=logging.INFO,
9
+ format="%(asctime)s - %(levelname)s - %(message)s",
10
+ handlers=[
11
+ logging.FileHandler("scraper.log"),
12
+ logging.StreamHandler()
13
+ ]
14
+ )
15
+ logger = logging.getLogger(__name__)
16
+
17
+ # ✅ URLs to scrape
18
+ urls = [
19
+ "https://invest-tracing.com/",
20
+ "https://invest-tracing.com/latest-hyips.html",
21
+ "https://invest-tracing.com/scam-hyips.html",
22
+ ]
23
+
24
+ # ✅ Robust Headers
25
+ headers = {
26
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
27
+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
28
+ "Accept-Language": "en-US,en;q=0.5",
29
+ "Accept-Encoding": "gzip, deflate, br",
30
+ "Connection": "keep-alive",
31
+ }
32
+
33
+ # ✅ Retry settings
34
+ MAX_RETRIES = 3
35
+ RETRY_DELAY = 5 # seconds
36
+ TIMEOUT = 30 # seconds
37
+
38
+ # ✅ Output folder
39
+ OUTPUT_DIR = Path("scraped_pages")
40
+ OUTPUT_DIR.mkdir(exist_ok=True)
41
+
42
+
43
+ def download_page(url: str, retries: int = MAX_RETRIES) -> str | None:
44
+ """Download page with retry logic"""
45
+ for attempt in range(1, retries + 1):
46
+ try:
47
+ logger.info(f"⏳ Downloading: {url} (Attempt {attempt}/{retries})")
48
+
49
+ r = requests.get(
50
+ url,
51
+ headers=headers,
52
+ timeout=TIMEOUT,
53
+ allow_redirects=True
54
+ )
55
+ r.raise_for_status() # Raise error for bad status codes
56
+
57
+ logger.info(f"✅ Success! Status: {r.status_code}, Size: {len(r.text)} bytes")
58
+ return r.text
59
+
60
+ except requests.exceptions.Timeout:
61
+ logger.warning(f"⏱️ Timeout on attempt {attempt}")
62
+
63
+ except requests.exceptions.ConnectionError:
64
+ logger.warning(f"🔌 Connection error on attempt {attempt}")
65
+
66
+ except requests.exceptions.HTTPError as e:
67
+ logger.warning(f"❌ HTTP Error: {e}")
68
+ if r.status_code == 404:
69
+ logger.error(f"🚫 Page not found: {url}")
70
+ return None # No point retrying 404
71
+
72
+ except requests.exceptions.RequestException as e:
73
+ logger.warning(f"⚠️ Request error: {e}")
74
+
75
+ # Wait before retry
76
+ if attempt < retries:
77
+ wait_time = RETRY_DELAY * attempt # Exponential backoff
78
+ logger.info(f"⏳ Waiting {wait_time}s before retry...")
79
+ time.sleep(wait_time)
80
+
81
+ logger.error(f"❌ Failed after {retries} attempts: {url}")
82
+ return None
83
+
84
+
85
+ def save_page(content: str, filename: str) -> bool:
86
+ """Save page content to file"""
87
+ try:
88
+ filepath = OUTPUT_DIR / filename
89
+ with open(filepath, "w", encoding="utf-8") as f:
90
+ f.write(content)
91
+ logger.info(f"💾 Saved: {filepath}")
92
+ return True
93
+ except Exception as e:
94
+ logger.error(f"❌ Failed to save {filename}: {e}")
95
+ return False
96
+
97
+
98
+ def main():
99
+ """Main function to scrape all pages"""
100
+ logger.info("=" * 50)
101
+ logger.info("🚀 Starting Web Scraper")
102
+ logger.info(f"📄 Total URLs: {len(urls)}")
103
+ logger.info("=" * 50)
104
+
105
+ results = {
106
+ "success": 0,
107
+ "failed": 0,
108
+ "skipped": 0
109
+ }
110
+
111
+ for i, url in enumerate(urls, start=1):
112
+ logger.info(f"\n{'─' * 40}")
113
+ logger.info(f"[{i}/{len(urls)}] Processing: {url}")
114
+
115
+ # Download page
116
+ content = download_page(url)
117
+
118
+ if content:
119
+ filename = f"page_{i}.html"
120
+ if save_page(content, filename):
121
+ results["success"] += 1
122
+ else:
123
+ results["failed"] += 1
124
+ else:
125
+ results["failed"] += 1
126
+
127
+ # Small delay between requests (be polite to server)
128
+ if i < len(urls):
129
+ time.sleep(2)
130
+
131
+ # Summary
132
+ logger.info("\n" + "=" * 50)
133
+ logger.info("📊 SCRAPING SUMMARY")
134
+ logger.info(f"✅ Success: {results['success']}")
135
+ logger.info(f"❌ Failed: {results['failed']}")
136
+ logger.info(f"⏭️ Skipped: {results['skipped']}")
137
+ logger.info("=" * 50)
138
+
139
+
140
+ if __name__ == "__main__":
141
+ main()
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: longcat-ai
3
+ Version: 1.0.0
4
+ Summary: Autonomous AI Bot Developer (Auto Code Edit & Create)
5
+ Home-page: https://pypi.org/project/longcat-ai/
6
+ Author: BotMaster
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: requests
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: requires-dist
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ # Longcat AI 🤖🚀
23
+
24
+ **Longcat AI** is a powerful, autonomous AI-driven coding assistant and web automation tool. It doesn't just give you advice; it **actually writes and edits code directly in your local environment.**
25
+
26
+ Powered by the **LongCat-2.0-Preview** model, this tool acts as your personal Junior Developer who can read your files, understand your project structure, and perform autonomous updates.
27
+
28
+ ---
29
+
30
+ ## 🔥 Key Features
31
+
32
+ - 🧠 **Autonomous Coding:** Request a new script, and Longcat will create the file and write the code for you.
33
+ - 🛠️ **AI Code Editing:** Ask to fix bugs or add features to existing files. Longcat reads the file, identifies the logic, and applies the changes automatically.
34
+ - 📂 **Context Awareness:** Automatically scans your current directory to understand which scripts and files are available.
35
+ - 🤖 **Smart File Management:** Uses specialized markers (`[WRITE:]` and `[READ:]`) to interact with your filesystem without manual copy-pasting.
36
+ - 🗣️ **Hinglish Support:** Communicates in friendly Hinglish (Hindi + English), making it easy to use for everyone.
37
+
38
+ ---
39
+
40
+ ## 🚀 Installation
41
+
42
+ Install the package globally via pip:
43
+
44
+ ```bash
45
+ pip install longcat-ai
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 🛠️ Usage
51
+
52
+ ### 1. Launch the Tool
53
+ Open your terminal in any project folder and type:
54
+ ```bash
55
+ longcat
56
+ ```
57
+
58
+ ### 2. Initial Setup
59
+ On your first run, the tool will ask for your **Longcat API Key**. You can get your key from [api.longcat.chat](https://api.longcat.chat). The key is stored securely in your home directory (`~/.longcat_config.json`).
60
+
61
+ ### 3. Example Commands
62
+ - *"Bhai, ek Python script bana de jo Bitcoin ki price track kare."* (Creates a new file)
63
+ - *"Mera api.sh check kar aur usme error fix kar."* (Reads and edits existing file)
64
+ - *"Is folder mein kaun-kaun si scripts hain?"* (Lists files with AI analysis)
65
+
66
+ ---
67
+
68
+ ## ☕ Support / Buy Me a Coffee
69
+
70
+ If this tool saved you time or helped you build something cool, feel free to support the developer!
71
+
72
+ 💬 **Telegram:** [@WISEMONEYMAKER](https://t.me/WISEMONEYMAKER)
73
+
74
+ ---
75
+
76
+ ## 📄 License
77
+ MIT License - Feel free to use and extend!
@@ -0,0 +1,9 @@
1
+ README.md
2
+ setup.py
3
+ src/longcat_ai/__init__.py
4
+ src/longcat_ai.egg-info/PKG-INFO
5
+ src/longcat_ai.egg-info/SOURCES.txt
6
+ src/longcat_ai.egg-info/dependency_links.txt
7
+ src/longcat_ai.egg-info/entry_points.txt
8
+ src/longcat_ai.egg-info/requires.txt
9
+ src/longcat_ai.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ longcat = longcat_ai:main
@@ -0,0 +1 @@
1
+ requests
@@ -0,0 +1 @@
1
+ longcat_ai