ftagger 0.1.4__tar.gz → 0.1.7__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ftagger
3
- Version: 0.1.4
3
+ Version: 0.1.7
4
4
  Summary: Simple command-line file tagger
5
5
  Author-email: Charlie O'Dwyer <charlieodwyer2289@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ftagger"
3
- version = "0.1.4"
3
+ version = "0.1.7"
4
4
  description = "Simple command-line file tagger"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -22,4 +22,4 @@ build-backend = "setuptools.build_meta"
22
22
 
23
23
 
24
24
  [project.scripts]
25
- fm = "main:main"
25
+ ftagger = "main:main"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ftagger
3
- Version: 0.1.4
3
+ Version: 0.1.7
4
4
  Summary: Simple command-line file tagger
5
5
  Author-email: Charlie O'Dwyer <charlieodwyer2289@gmail.com>
6
6
  License-Expression: MIT
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ftagger = main:main
@@ -0,0 +1,8 @@
1
+ from pathlib import Path
2
+
3
+ FMDATA = Path.home() / ".fmdata"
4
+ FMDEFAULT = f"{Path.home()}/.fmdata/.fmdefault"
5
+ FMALIASES = f"{Path.home()}/.fmdata/.fmaliases"
6
+ FMALIASLOOKUP = f"{Path.home()}/.fmdata/.fmaliaslookup"
7
+ FMUNDOLOOKUP = f"{Path.home()}/.fmdata/.fmundolookup"
8
+ FMPREVIOUSCOMMAND = f"{Path.home()}/.fmdata/.fmpreviouscommand"
@@ -4,10 +4,10 @@ import globals
4
4
  import os
5
5
 
6
6
 
7
- def check_for_first_run():
7
+ def check_for_first_run() -> bool:
8
8
  if not globals.FMDATA.exists():
9
9
  os.mkdir(globals.FMDATA)
10
-
10
+
11
11
  with open(globals.FMALIASLOOKUP, "w") as file:
12
12
  json.dump({}, file, indent=4)
13
13
 
@@ -36,7 +36,7 @@ def check_for_first_run():
36
36
  json.dump(default_data, file, indent=4)
37
37
 
38
38
 
39
- with open(globals.FMUNDOLOOKUP) as file:
39
+ with open(globals.FMUNDOLOOKUP, "w") as file:
40
40
  default_data: dict = {
41
41
  "at": "rt",
42
42
  "rt": "at",
@@ -47,6 +47,8 @@ def check_for_first_run():
47
47
  "tag": "rt"
48
48
  }
49
49
 
50
+ json.dump(default_data, file, indent=4)
51
+
50
52
 
51
53
  with open(globals.FMPREVIOUSCOMMAND, "w") as file:
52
54
  default_data: dict = {
@@ -67,6 +69,8 @@ def check_for_first_run():
67
69
  ]
68
70
  }
69
71
 
72
+ json.dump(default_data, file, indent=4)
73
+
70
74
 
71
75
  def error(text: str) -> None:
72
76
  print(f"{ac.red}{text}{ac.clear}")
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- fm = main:main
@@ -1,8 +0,0 @@
1
- from pathlib import Path
2
-
3
- FMDATA = Path.home() / ".fmdata"
4
- FMDEFAULT = f"{Path.home()}.fmdata/.fmdefault"
5
- FMALIASES = f"{Path.home()}.fmdata/.fmaliases"
6
- FMALIASLOOKUP = f"{Path.home()}.fmdata/.fmaliaslookup"
7
- FMUNDOLOOKUP = f"{Path.home()}.fmdata/.fmundolookup"
8
- FMPREVIOUSCOMMAND = f"{Path.home()}.fmdata/.fmpreviouscommand"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes