-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Fixed a couple of build issues that were making the build fail. + Added __main__.py to start the program when used on the command line.
- Loading branch information
1 parent
cbd2d6d
commit 103f3d4
Showing
5 changed files
with
49 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (c) 2024 Mordarski Networks | ||
|
||
"""site2filter is a Python program that turns a list of websites into a filter for uBlock Origin.""" | ||
from site2filter import parse_arguments | ||
|
||
|
||
def run_site2filter(): | ||
"""Run site2filter.""" | ||
parse_arguments.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (c) 2024 Mordarski Networks | ||
|
||
"""site2filter is a Python program that turns a list of websites into a filter for uBlock Origin.""" | ||
import site2filter | ||
|
||
site2filter.run_site2filter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (c) 2024 Mordarski Networks | ||
|
||
"""This module allows you to copy a given argument to the clipboard.""" | ||
import platform | ||
import subprocess | ||
|
||
|
||
def copy(string): | ||
"""Copy a given argument to the clipboard. | ||
The argument should be a string. | ||
""" | ||
os_dictionary = {"Windows": "clip", "Linux": "xclip -sel clip", "Darwin": "pbcopy"} | ||
|
||
for keys, vaules in os_dictionary.items(): | ||
if platform.system() == keys: | ||
subprocess.run(vaules, check=False, Shell=False, input=string.encode()) | ||
return True | ||
|
||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright (c) 2024 Mordarski Networks | ||
|
||
"""This module allows you to generate a filter.""" | ||
|
||
|
||
def read_filter(): | ||
"""Read a filter from a file.""" | ||
|
||
|
||
def generate_filter(): | ||
"""Generate a filter.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters