simple-vcs 1.2.0__tar.gz → 1.3.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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simple-vcs
3
- Version: 1.2.0
4
- Summary: A beautiful and simple version control system with a modern terminal interface
3
+ Version: 1.3.0
4
+ Summary: A beautiful and simple version control system with a stunning terminal interface
5
5
  Home-page: https://github.com/muhammadsufiyanbaig/simple_vcs
6
6
  Author: Muhammad Sufiyan Baig
7
7
  Author-email: Muhammad Sufiyan Baig <send.sufiyan@gmail.com>
@@ -44,13 +44,14 @@ Dynamic: requires-python
44
44
 
45
45
  A simple version control system written in Python that provides basic VCS functionality similar to Git - now with a **beautiful modern terminal interface**!
46
46
 
47
- ## ✨ New in Version 1.2.0
47
+ ## ✨ New in Version 1.3.0
48
48
 
49
- **Stunning Visual Interface** - SimpleVCS now features a gorgeous terminal interface powered by Rich:
50
- - 🎨 **Colored Output** - Color-coded messages for success, warnings, and errors
51
- - 📊 **Beautiful Tables** - Commit history and status displayed in elegant tables
52
- - 📦 **Styled Panels** - Information presented in clean, bordered boxes
53
- - 🌟 **Professional Look** - Modern, easy-to-read formatting throughout
49
+ **Enhanced Visual Experience** - SimpleVCS now features an even more stunning terminal interface:
50
+ - 🎨 **Enhanced Init** - Beautiful header, tree structure, and quick start guide
51
+ - 📜 **Gorgeous Log** - Double-bordered tables with highlighted current commit and legend
52
+ - 💡 **Rich Help** - Custom help interface with examples and organized commands
53
+ - 🌈 **Professional Design** - Centered headers, better spacing, and visual hierarchy
54
+ - ⭐ **Better UX** - Empty state messages, statistics, and helpful tips throughout
54
55
 
55
56
  ## Features
56
57
 
@@ -327,6 +328,16 @@ Project Link: [https://github.com/muhammadsufiyanbaig/simple_vcs](https://github
327
328
 
328
329
  ## Changelog
329
330
 
331
+ ### Version 1.3.0
332
+ - **Enhanced Init Command**: Beautiful header, tree visualization, and quick start guide
333
+ - **Gorgeous Log Display**: Double-bordered tables with current commit highlighting
334
+ - **Custom Help Interface**: Rich-formatted help with organized commands and examples
335
+ - **Better Visual Hierarchy**: Centered headers, improved spacing, and alignment
336
+ - **Enhanced Empty States**: Helpful messages when no commits exist
337
+ - **Statistics Display**: Show total commits, current commit, and filters in log
338
+ - **Legend Support**: Clear explanations of symbols and formatting
339
+ - **Professional Polish**: Refined colors, borders, and overall presentation
340
+
330
341
  ### Version 1.2.0
331
342
  - **Beautiful Terminal Interface**: Complete visual overhaul with Rich library
332
343
  - **Colored Output**: Green for success, yellow for warnings, red for errors
@@ -2,13 +2,14 @@
2
2
 
3
3
  A simple version control system written in Python that provides basic VCS functionality similar to Git - now with a **beautiful modern terminal interface**!
4
4
 
5
- ## ✨ New in Version 1.2.0
5
+ ## ✨ New in Version 1.3.0
6
6
 
7
- **Stunning Visual Interface** - SimpleVCS now features a gorgeous terminal interface powered by Rich:
8
- - 🎨 **Colored Output** - Color-coded messages for success, warnings, and errors
9
- - 📊 **Beautiful Tables** - Commit history and status displayed in elegant tables
10
- - 📦 **Styled Panels** - Information presented in clean, bordered boxes
11
- - 🌟 **Professional Look** - Modern, easy-to-read formatting throughout
7
+ **Enhanced Visual Experience** - SimpleVCS now features an even more stunning terminal interface:
8
+ - 🎨 **Enhanced Init** - Beautiful header, tree structure, and quick start guide
9
+ - 📜 **Gorgeous Log** - Double-bordered tables with highlighted current commit and legend
10
+ - 💡 **Rich Help** - Custom help interface with examples and organized commands
11
+ - 🌈 **Professional Design** - Centered headers, better spacing, and visual hierarchy
12
+ - ⭐ **Better UX** - Empty state messages, statistics, and helpful tips throughout
12
13
 
13
14
  ## Features
14
15
 
@@ -285,6 +286,16 @@ Project Link: [https://github.com/muhammadsufiyanbaig/simple_vcs](https://github
285
286
 
286
287
  ## Changelog
287
288
 
289
+ ### Version 1.3.0
290
+ - **Enhanced Init Command**: Beautiful header, tree visualization, and quick start guide
291
+ - **Gorgeous Log Display**: Double-bordered tables with current commit highlighting
292
+ - **Custom Help Interface**: Rich-formatted help with organized commands and examples
293
+ - **Better Visual Hierarchy**: Centered headers, improved spacing, and alignment
294
+ - **Enhanced Empty States**: Helpful messages when no commits exist
295
+ - **Statistics Display**: Show total commits, current commit, and filters in log
296
+ - **Legend Support**: Clear explanations of symbols and formatting
297
+ - **Professional Polish**: Refined colors, borders, and overall presentation
298
+
288
299
  ### Version 1.2.0
289
300
  - **Beautiful Terminal Interface**: Complete visual overhaul with Rich library
290
301
  - **Colored Output**: Green for success, yellow for warnings, red for errors
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simple-vcs"
7
- version = "1.2.0"
8
- description = "A beautiful and simple version control system with a modern terminal interface"
7
+ version = "1.3.0"
8
+ description = "A beautiful and simple version control system with a stunning terminal interface"
9
9
  authors = [
10
10
  { name = "Muhammad Sufiyan Baig", email = "send.sufiyan@gmail.com" }
11
11
  ]
@@ -5,10 +5,10 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="simple-vcs",
8
- version="1.2.0",
8
+ version="1.3.0",
9
9
  author="Muhammad Sufiyan Baig",
10
10
  author_email="send.sufiyan@gmail.com",
11
- description="A beautiful and simple version control system with a modern terminal interface",
11
+ description="A beautiful and simple version control system with a stunning terminal interface",
12
12
  long_description=long_description,
13
13
  long_description_content_type="text/markdown",
14
14
  url="https://github.com/muhammadsufiyanbaig/simple_vcs",
@@ -1,17 +1,93 @@
1
1
  import click
2
2
  from .core import SimpleVCS
3
3
  from rich.console import Console
4
+ from rich.panel import Panel
5
+ from rich.text import Text
6
+ from rich import box
7
+ from rich.columns import Columns
4
8
 
5
9
  console = Console()
6
10
 
7
- @click.group()
8
- @click.version_option(version="1.2.0", prog_name="SimpleVCS")
11
+ class RichGroup(click.Group):
12
+ """Custom Click Group that adds Rich formatting to help output"""
13
+
14
+ def format_help(self, ctx, formatter):
15
+ """Override help formatting with Rich output"""
16
+ console = Console()
17
+
18
+ # Beautiful header
19
+ console.print()
20
+ title = Text("SimpleVCS", style="bold cyan", justify="center")
21
+ subtitle = Text("A Beautiful Version Control System", style="dim", justify="center")
22
+ console.print(title)
23
+ console.print(subtitle)
24
+ console.print()
25
+
26
+ # Description panel
27
+ description = Panel(
28
+ "[white]A lightweight, elegant version control system with a modern terminal interface.\n"
29
+ "Track your files, manage versions, and keep your project history organized.[/white]",
30
+ title="[bold cyan]About[/bold cyan]",
31
+ border_style="cyan",
32
+ box=box.ROUNDED,
33
+ padding=(0, 2)
34
+ )
35
+ console.print(description)
36
+ console.print()
37
+
38
+ # Commands section
39
+ console.print("[bold white]Available Commands:[/bold white]")
40
+ console.print()
41
+
42
+ commands_info = [
43
+ ("init", "Initialize a new repository", "cyan"),
44
+ ("add", "Add files to staging area", "green"),
45
+ ("commit", "Create a new commit", "green"),
46
+ ("status", "Show repository status", "yellow"),
47
+ ("log", "View commit history", "blue"),
48
+ ("diff", "Compare commits", "magenta"),
49
+ ("revert", "Revert to previous commit", "red"),
50
+ ("snapshot", "Create backup snapshot", "cyan"),
51
+ ("restore", "Restore from snapshot", "cyan"),
52
+ ("compress", "Optimize storage", "yellow"),
53
+ ]
54
+
55
+ for cmd_name, cmd_desc, color in commands_info:
56
+ console.print(f" [{color}]{cmd_name:12}[/{color}] [dim]{cmd_desc}[/dim]")
57
+
58
+ console.print()
59
+
60
+ # Usage examples
61
+ examples = Panel(
62
+ "[bold]Quick Start:[/bold]\n"
63
+ "[cyan]$[/cyan] svcs init [dim]# Create repository[/dim]\n"
64
+ "[cyan]$[/cyan] svcs add file.txt [dim]# Stage files[/dim]\n"
65
+ "[cyan]$[/cyan] svcs commit -m \"message\" [dim]# Save changes[/dim]\n"
66
+ "[cyan]$[/cyan] svcs log [dim]# View history[/dim]\n\n"
67
+ "[bold]Get Help:[/bold]\n"
68
+ "[cyan]$[/cyan] svcs [yellow]<command>[/yellow] --help [dim]# Help for specific command[/dim]",
69
+ title="[bold green]Examples[/bold green]",
70
+ border_style="green",
71
+ box=box.ROUNDED,
72
+ padding=(0, 2)
73
+ )
74
+ console.print(examples)
75
+ console.print()
76
+
77
+ # Footer
78
+ console.print(
79
+ "[dim]Version 1.2.0 | "
80
+ "More info: [/dim][cyan]https://github.com/muhammadsufiyanbaig/simple_vcs[/cyan]"
81
+ )
82
+ console.print()
83
+
84
+ # Prevent Click from outputting its own help
85
+ ctx.resilient_parsing = True
86
+
87
+ @click.group(cls=RichGroup)
88
+ @click.version_option(version="1.3.0", prog_name="SimpleVCS")
9
89
  def main():
10
- """
11
- SimpleVCS - A beautiful and simple version control system
12
-
13
- A lightweight VCS with an intuitive interface for managing your project versions.
14
- """
90
+ """SimpleVCS - A beautiful and simple version control system"""
15
91
  pass
16
92
 
17
93
  @main.command()
@@ -15,6 +15,9 @@ from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn
15
15
  from rich.syntax import Syntax
16
16
  from rich import box
17
17
  from rich.text import Text
18
+ from rich.columns import Columns
19
+ from rich.tree import Tree
20
+ from rich.align import Align
18
21
 
19
22
  class SimpleVCS:
20
23
  """Simple Version Control System core functionality"""
@@ -36,6 +39,13 @@ class SimpleVCS:
36
39
  self.console.print(f"[yellow]WARNING: Repository already exists at[/yellow] [cyan]{self.repo_path}[/cyan]")
37
40
  return False
38
41
 
42
+ # Print beautiful header
43
+ self.console.print()
44
+ header = Text("SimpleVCS", style="bold cyan", justify="center")
45
+ self.console.print(header)
46
+ self.console.print(Align.center("[dim]A Beautiful Version Control System[/dim]"))
47
+ self.console.print()
48
+
39
49
  self.console.print("[cyan]Initializing repository...[/cyan]")
40
50
 
41
51
  # Create directory structure
@@ -47,18 +57,50 @@ class SimpleVCS:
47
57
  self._write_json(self.staging_file, {})
48
58
  self.head_file.write_text("0") # Start with commit 0
49
59
 
60
+ # Create tree structure visualization
61
+ tree = Tree(
62
+ "[bold cyan].svcs/[/bold cyan] [dim](Repository Root)[/dim]",
63
+ guide_style="cyan"
64
+ )
65
+ tree.add("[green]objects/[/green] [dim]- Stores file content by hash[/dim]")
66
+ tree.add("[green]commits.json[/green] [dim]- Tracks all commits and history[/dim]")
67
+ tree.add("[green]staging.json[/green] [dim]- Lists files ready to commit[/dim]")
68
+ tree.add("[green]HEAD[/green] [dim]- Points to current commit[/dim]")
69
+
70
+ # Create success panel with tree
71
+ panel_content = (
72
+ f"[bold green]SUCCESS![/bold green] Repository initialized\n\n"
73
+ f"[bold]Location:[/bold]\n"
74
+ f"[cyan]{self.repo_path}[/cyan]\n\n"
75
+ f"[bold]Directory Structure:[/bold]"
76
+ )
77
+
50
78
  panel = Panel(
51
- f"[green]SUCCESS[/green] Repository initialized at [cyan]{self.repo_path}[/cyan]\n\n"
52
- "[dim]Structure created:[/dim]\n"
53
- " - .svcs/objects/ - File storage\n"
54
- " - .svcs/commits.json - Commit history\n"
55
- " - .svcs/staging.json - Staged files\n"
56
- " - .svcs/HEAD - Current commit",
57
- title="[bold green]SimpleVCS Repository[/bold green]",
79
+ panel_content,
80
+ title="[bold white on green] Repository Created [/bold white on green]",
58
81
  border_style="green",
59
- box=box.ROUNDED
82
+ box=box.DOUBLE,
83
+ padding=(1, 2)
60
84
  )
61
85
  self.console.print(panel)
86
+ self.console.print(tree)
87
+
88
+ # Quick start guide
89
+ guide_panel = Panel(
90
+ "[bold]Quick Start:[/bold]\n\n"
91
+ "[cyan]1.[/cyan] Add files: [yellow]svcs add <file>[/yellow]\n"
92
+ "[cyan]2.[/cyan] Commit changes: [yellow]svcs commit -m \"message\"[/yellow]\n"
93
+ "[cyan]3.[/cyan] View history: [yellow]svcs log[/yellow]\n"
94
+ "[cyan]4.[/cyan] Check status: [yellow]svcs status[/yellow]",
95
+ title="[bold cyan]Next Steps[/bold cyan]",
96
+ border_style="cyan",
97
+ box=box.ROUNDED,
98
+ padding=(0, 2)
99
+ )
100
+ self.console.print()
101
+ self.console.print(guide_panel)
102
+ self.console.print()
103
+
62
104
  return True
63
105
 
64
106
  def add_file(self, file_path: str) -> bool:
@@ -235,56 +277,102 @@ class SimpleVCS:
235
277
 
236
278
  commits = self._read_json(self.commits_file)
237
279
  if not commits:
238
- self.console.print("[yellow]WARNING: No commits found[/yellow]")
239
- self.console.print("[dim]Tip: Use 'svcs commit -m \"message\"' to create your first commit[/dim]")
280
+ # Create empty state panel
281
+ empty_panel = Panel(
282
+ "[yellow]No commits yet[/yellow]\n\n"
283
+ "[dim]Your repository is ready, but you haven't made any commits.[/dim]\n\n"
284
+ "[bold]Get started:[/bold]\n"
285
+ "[cyan]1.[/cyan] Add files: [yellow]svcs add <file>[/yellow]\n"
286
+ "[cyan]2.[/cyan] Commit: [yellow]svcs commit -m \"First commit\"[/yellow]",
287
+ title="[bold yellow]Empty Repository[/bold yellow]",
288
+ border_style="yellow",
289
+ box=box.ROUNDED,
290
+ padding=(1, 2)
291
+ )
292
+ self.console.print()
293
+ self.console.print(empty_panel)
294
+ self.console.print()
240
295
  return False
241
296
 
242
297
  commits_to_show = commits[-limit:] if limit else commits
243
298
  commits_to_show.reverse() # Show newest first
244
299
 
245
- # Create commits table
300
+ # Print beautiful header
301
+ self.console.print()
302
+ header_text = Text()
303
+ header_text.append("Commit History", style="bold cyan")
304
+ self.console.print(Align.center(header_text))
305
+ self.console.print(Align.center(f"[dim]Repository: {self.repo_path.name}[/dim]"))
306
+ self.console.print()
307
+
308
+ # Create commits table with enhanced styling
246
309
  table = Table(
247
- title="[bold cyan]Commit History[/bold cyan]",
248
- box=box.ROUNDED,
310
+ box=box.DOUBLE_EDGE,
249
311
  show_header=True,
250
- header_style="bold magenta"
312
+ header_style="bold white on blue",
313
+ border_style="cyan",
314
+ padding=(0, 1)
251
315
  )
252
- table.add_column("ID", justify="center", style="cyan", width=6)
253
- table.add_column("Date", style="green", width=19)
254
- table.add_column("Message", style="white")
255
- table.add_column("Files", justify="center", style="yellow", width=7)
256
- table.add_column("Parent", justify="center", style="dim", width=7)
316
+ table.add_column("ID", justify="center", style="bold cyan", width=8)
317
+ table.add_column("Date & Time", style="green", width=19)
318
+ table.add_column("Commit Message", style="white", no_wrap=False)
319
+ table.add_column("Files", justify="center", style="bold yellow", width=7)
320
+ table.add_column("Parent", justify="center", style="dim", width=8)
257
321
 
258
322
  current_commit_id = self._get_current_commit_id()
259
323
 
260
324
  for commit in commits_to_show:
261
325
  commit_id = str(commit['id'])
262
- if commit['id'] == current_commit_id:
263
- commit_id = f"* {commit_id}" # Mark current commit
326
+ is_current = commit['id'] == current_commit_id
327
+
328
+ if is_current:
329
+ commit_id = f"-> {commit_id}" # Mark current commit with arrow
264
330
 
265
331
  date_str = datetime.fromtimestamp(commit['timestamp']).strftime('%Y-%m-%d %H:%M:%S')
266
332
  message = commit['message']
267
- if len(message) > 50:
268
- message = message[:47] + "..."
333
+ if len(message) > 60:
334
+ message = message[:57] + "..."
269
335
  files_count = str(len(commit['files']))
270
- parent = str(commit.get('parent', '-'))
336
+ parent = str(commit.get('parent', 'None'))
271
337
 
272
- # Style current commit differently
273
- if commit['id'] == current_commit_id:
338
+ # Style current commit differently with background
339
+ if is_current:
274
340
  table.add_row(
275
- f"[bold cyan]{commit_id}[/bold cyan]",
276
- date_str,
277
- f"[bold]{message}[/bold]",
278
- files_count,
279
- parent
341
+ f"[bold white on blue]{commit_id}[/bold white on blue]",
342
+ f"[bold]{date_str}[/bold]",
343
+ f"[bold white]{message}[/bold white]",
344
+ f"[bold]{files_count}[/bold]",
345
+ parent,
346
+ style="on blue"
280
347
  )
281
348
  else:
282
349
  table.add_row(commit_id, date_str, message, files_count, parent)
283
350
 
284
351
  self.console.print(table)
285
352
 
353
+ # Statistics footer
354
+ stats_text = (
355
+ f"[dim]Total commits: [/dim][cyan]{len(commits)}[/cyan]"
356
+ )
286
357
  if limit and len(commits) > limit:
287
- self.console.print(f"\n[dim]Showing last {limit} of {len(commits)} commits[/dim]")
358
+ stats_text += f"[dim] | Showing: [/dim][yellow]Last {limit}[/yellow]"
359
+ if current_commit_id:
360
+ stats_text += f"[dim] | Current: [/dim][green]#{current_commit_id}[/green]"
361
+
362
+ self.console.print()
363
+ self.console.print(Align.center(stats_text))
364
+ self.console.print()
365
+
366
+ # Legend
367
+ legend = Panel(
368
+ "[bold white on blue]-> ID[/bold white on blue] = Current commit | "
369
+ "[dim]Parent[/dim] = Previous commit ID",
370
+ border_style="dim",
371
+ box=box.ROUNDED,
372
+ padding=(0, 2)
373
+ )
374
+ self.console.print(legend)
375
+ self.console.print()
288
376
 
289
377
  return True
290
378
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simple-vcs
3
- Version: 1.2.0
4
- Summary: A beautiful and simple version control system with a modern terminal interface
3
+ Version: 1.3.0
4
+ Summary: A beautiful and simple version control system with a stunning terminal interface
5
5
  Home-page: https://github.com/muhammadsufiyanbaig/simple_vcs
6
6
  Author: Muhammad Sufiyan Baig
7
7
  Author-email: Muhammad Sufiyan Baig <send.sufiyan@gmail.com>
@@ -44,13 +44,14 @@ Dynamic: requires-python
44
44
 
45
45
  A simple version control system written in Python that provides basic VCS functionality similar to Git - now with a **beautiful modern terminal interface**!
46
46
 
47
- ## ✨ New in Version 1.2.0
47
+ ## ✨ New in Version 1.3.0
48
48
 
49
- **Stunning Visual Interface** - SimpleVCS now features a gorgeous terminal interface powered by Rich:
50
- - 🎨 **Colored Output** - Color-coded messages for success, warnings, and errors
51
- - 📊 **Beautiful Tables** - Commit history and status displayed in elegant tables
52
- - 📦 **Styled Panels** - Information presented in clean, bordered boxes
53
- - 🌟 **Professional Look** - Modern, easy-to-read formatting throughout
49
+ **Enhanced Visual Experience** - SimpleVCS now features an even more stunning terminal interface:
50
+ - 🎨 **Enhanced Init** - Beautiful header, tree structure, and quick start guide
51
+ - 📜 **Gorgeous Log** - Double-bordered tables with highlighted current commit and legend
52
+ - 💡 **Rich Help** - Custom help interface with examples and organized commands
53
+ - 🌈 **Professional Design** - Centered headers, better spacing, and visual hierarchy
54
+ - ⭐ **Better UX** - Empty state messages, statistics, and helpful tips throughout
54
55
 
55
56
  ## Features
56
57
 
@@ -327,6 +328,16 @@ Project Link: [https://github.com/muhammadsufiyanbaig/simple_vcs](https://github
327
328
 
328
329
  ## Changelog
329
330
 
331
+ ### Version 1.3.0
332
+ - **Enhanced Init Command**: Beautiful header, tree visualization, and quick start guide
333
+ - **Gorgeous Log Display**: Double-bordered tables with current commit highlighting
334
+ - **Custom Help Interface**: Rich-formatted help with organized commands and examples
335
+ - **Better Visual Hierarchy**: Centered headers, improved spacing, and alignment
336
+ - **Enhanced Empty States**: Helpful messages when no commits exist
337
+ - **Statistics Display**: Show total commits, current commit, and filters in log
338
+ - **Legend Support**: Clear explanations of symbols and formatting
339
+ - **Professional Polish**: Refined colors, borders, and overall presentation
340
+
330
341
  ### Version 1.2.0
331
342
  - **Beautiful Terminal Interface**: Complete visual overhaul with Rich library
332
343
  - **Colored Output**: Green for success, yellow for warnings, red for errors
File without changes
File without changes
File without changes
File without changes