summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 05:41:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 05:41:57 +0000
commit0077d95ffab27638651f4188a46c7c51c45dbb91 (patch)
treeb2406b2250fc826c5c2f7873673235a3a3316cde
parent19b5feadd37505c0d5ff87f7739ad2b266997fdb (diff)
automatic import of python-usercheck
-rw-r--r--.gitignore1
-rw-r--r--python-usercheck.spec598
-rw-r--r--sources1
3 files changed, 600 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..39523ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/usercheck-1.0.tar.gz
diff --git a/python-usercheck.spec b/python-usercheck.spec
new file mode 100644
index 0000000..943c745
--- /dev/null
+++ b/python-usercheck.spec
@@ -0,0 +1,598 @@
+%global _empty_manifest_terminate_build 0
+Name: python-usercheck
+Version: 1.0
+Release: 1
+Summary: Check if your username is taken from various sites
+License: MIT
+URL: https://github.com/ethanquix/userchecker
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/43/fc/2f7ba8a9c07067e2b7994f37d6166050b1700b10f6328a5a548ea22c883e/usercheck-1.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+# User Checker
+
+> Check if your username is already taken !
+
+
+## User Checker CLI
+`usage: usercheck [-h] [-f] [-n NUM_THREADS] [-a] [-d] [-c] [-s SAVEDIR] [-j] [-p]
+ usernameOrFilename`
+
+```
+positional arguments:
+ usernameOrFilename Username or filename to check
+
+optional arguments:
+ -h, --help show this help message and exit
+ -f, --file File mode
+ -n NUM_THREADS Max num threads (default=50)
+ --num_threads NUM_THREADS Max num threads (default=50)
+ -a, --async Async
+ -d, --debug Debug messages
+ -c, --complete Dont stop on first false
+ -j, --json Output as JSON
+ -p, --progress Progress bar
+
+```
+
+## Sample
+
+Basic
+```
+$ usercheck ethanquix
+# Output nothing because at least one service return False
+
+$ usercheck random_goodbaguette_croissant
+random_goodbaguette_croissant
+```
+
+Complete
+```
+$ usercheck ethanquix -c
+ethanquix
+ twitter False
+ reddit False
+ github False
+ instagram False
+
+$ usercheck ethanqx -c
+ethanquix
+ twitter False
+ reddit False
+ github True
+ instagram True
+```
+
+File
+```
+$ cat data/samples.txt
+jack
+this_pseudo_dont_existWEEUFHG
+gooogle
+
+$ usercheck data/samples.txt -f
+this_pseudo_dont_existWEEUFHG
+
+$ usercheck data/samples.txt -fc
+jack
+ twitter False
+ reddit False
+ github False
+ instagram False
+this_pseudo_dont_existWEEUFHG
+ twitter True
+ reddit True
+ github True
+ instagram True
+gooogle
+ twitter False
+ reddit False
+ github False
+ instagram False
+```
+
+Json
+```
+$ usercheck ethanquix -cj
+{
+ "ethanquix": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+$ usercheck data/samples.txt -fj
+[
+ "this_pseudo_dont_existWEEUFHG"
+]
+
+$ usercheck data/samples.txt -fcj
+{
+ "jack": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ },
+ "this_pseudo_dont_existWEEUFHG": {
+ "twitter": true,
+ "reddit": true,
+ "github": true,
+ "instagram": true
+ },
+ "gooogle": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+```
+
+Async (work only for file)
+```
+$ cat data/samples_medium.txt | wc -l
+21
+
+$ time `usercheck data/samples_medium.txt -fc > /dev/null`
+real 1m9.380s
+
+$ time `usercheck data/samples_medium.txt -fca > /dev/null`
+real 0m6.827s
+```
+
+Num Threads
+
+The list of username of size `N` is divided in `X` chunks each of size `N / num_threads`.\
+Default is 50
+```
+$ time usercheck data/samples_medium.txt -fcad
+Creating 20 chunks of 1.0 usernames
+[...]
+real 0m6.146s
+
+$ time usercheck data/samples_medium.txt -fcad -n 4
+Creating 4 chunks of 5.0 usernames
+[...]
+real 0m19.618s
+```
+
+Progress
+```
+$ usercheck data/samples_medium.txt -fcap
+ 0%| | 0/20 [00:00<?, ?it/s]
+ 5%|████▏ | 1/20 [00:04<01:31, 4.81s/it]
+ 45%|█████████████████████████████████████▎ | 9/20 [00:05<00:06, 1.77it/s]
+100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00, 3.92it/s
+```
+
+## Services
+- Twitter
+- Reddit
+- Github
+- Instagram
+
+## Use in python
+
+## TODO
+> More services\
+> Random user agent\
+> Move services from __init__ to class\
+> Option to select services\
+> Option to save to file
+
+
+
+%package -n python3-usercheck
+Summary: Check if your username is taken from various sites
+Provides: python-usercheck
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-usercheck
+# User Checker
+
+> Check if your username is already taken !
+
+
+## User Checker CLI
+`usage: usercheck [-h] [-f] [-n NUM_THREADS] [-a] [-d] [-c] [-s SAVEDIR] [-j] [-p]
+ usernameOrFilename`
+
+```
+positional arguments:
+ usernameOrFilename Username or filename to check
+
+optional arguments:
+ -h, --help show this help message and exit
+ -f, --file File mode
+ -n NUM_THREADS Max num threads (default=50)
+ --num_threads NUM_THREADS Max num threads (default=50)
+ -a, --async Async
+ -d, --debug Debug messages
+ -c, --complete Dont stop on first false
+ -j, --json Output as JSON
+ -p, --progress Progress bar
+
+```
+
+## Sample
+
+Basic
+```
+$ usercheck ethanquix
+# Output nothing because at least one service return False
+
+$ usercheck random_goodbaguette_croissant
+random_goodbaguette_croissant
+```
+
+Complete
+```
+$ usercheck ethanquix -c
+ethanquix
+ twitter False
+ reddit False
+ github False
+ instagram False
+
+$ usercheck ethanqx -c
+ethanquix
+ twitter False
+ reddit False
+ github True
+ instagram True
+```
+
+File
+```
+$ cat data/samples.txt
+jack
+this_pseudo_dont_existWEEUFHG
+gooogle
+
+$ usercheck data/samples.txt -f
+this_pseudo_dont_existWEEUFHG
+
+$ usercheck data/samples.txt -fc
+jack
+ twitter False
+ reddit False
+ github False
+ instagram False
+this_pseudo_dont_existWEEUFHG
+ twitter True
+ reddit True
+ github True
+ instagram True
+gooogle
+ twitter False
+ reddit False
+ github False
+ instagram False
+```
+
+Json
+```
+$ usercheck ethanquix -cj
+{
+ "ethanquix": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+$ usercheck data/samples.txt -fj
+[
+ "this_pseudo_dont_existWEEUFHG"
+]
+
+$ usercheck data/samples.txt -fcj
+{
+ "jack": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ },
+ "this_pseudo_dont_existWEEUFHG": {
+ "twitter": true,
+ "reddit": true,
+ "github": true,
+ "instagram": true
+ },
+ "gooogle": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+```
+
+Async (work only for file)
+```
+$ cat data/samples_medium.txt | wc -l
+21
+
+$ time `usercheck data/samples_medium.txt -fc > /dev/null`
+real 1m9.380s
+
+$ time `usercheck data/samples_medium.txt -fca > /dev/null`
+real 0m6.827s
+```
+
+Num Threads
+
+The list of username of size `N` is divided in `X` chunks each of size `N / num_threads`.\
+Default is 50
+```
+$ time usercheck data/samples_medium.txt -fcad
+Creating 20 chunks of 1.0 usernames
+[...]
+real 0m6.146s
+
+$ time usercheck data/samples_medium.txt -fcad -n 4
+Creating 4 chunks of 5.0 usernames
+[...]
+real 0m19.618s
+```
+
+Progress
+```
+$ usercheck data/samples_medium.txt -fcap
+ 0%| | 0/20 [00:00<?, ?it/s]
+ 5%|████▏ | 1/20 [00:04<01:31, 4.81s/it]
+ 45%|█████████████████████████████████████▎ | 9/20 [00:05<00:06, 1.77it/s]
+100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00, 3.92it/s
+```
+
+## Services
+- Twitter
+- Reddit
+- Github
+- Instagram
+
+## Use in python
+
+## TODO
+> More services\
+> Random user agent\
+> Move services from __init__ to class\
+> Option to select services\
+> Option to save to file
+
+
+
+%package help
+Summary: Development documents and examples for usercheck
+Provides: python3-usercheck-doc
+%description help
+# User Checker
+
+> Check if your username is already taken !
+
+
+## User Checker CLI
+`usage: usercheck [-h] [-f] [-n NUM_THREADS] [-a] [-d] [-c] [-s SAVEDIR] [-j] [-p]
+ usernameOrFilename`
+
+```
+positional arguments:
+ usernameOrFilename Username or filename to check
+
+optional arguments:
+ -h, --help show this help message and exit
+ -f, --file File mode
+ -n NUM_THREADS Max num threads (default=50)
+ --num_threads NUM_THREADS Max num threads (default=50)
+ -a, --async Async
+ -d, --debug Debug messages
+ -c, --complete Dont stop on first false
+ -j, --json Output as JSON
+ -p, --progress Progress bar
+
+```
+
+## Sample
+
+Basic
+```
+$ usercheck ethanquix
+# Output nothing because at least one service return False
+
+$ usercheck random_goodbaguette_croissant
+random_goodbaguette_croissant
+```
+
+Complete
+```
+$ usercheck ethanquix -c
+ethanquix
+ twitter False
+ reddit False
+ github False
+ instagram False
+
+$ usercheck ethanqx -c
+ethanquix
+ twitter False
+ reddit False
+ github True
+ instagram True
+```
+
+File
+```
+$ cat data/samples.txt
+jack
+this_pseudo_dont_existWEEUFHG
+gooogle
+
+$ usercheck data/samples.txt -f
+this_pseudo_dont_existWEEUFHG
+
+$ usercheck data/samples.txt -fc
+jack
+ twitter False
+ reddit False
+ github False
+ instagram False
+this_pseudo_dont_existWEEUFHG
+ twitter True
+ reddit True
+ github True
+ instagram True
+gooogle
+ twitter False
+ reddit False
+ github False
+ instagram False
+```
+
+Json
+```
+$ usercheck ethanquix -cj
+{
+ "ethanquix": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+$ usercheck data/samples.txt -fj
+[
+ "this_pseudo_dont_existWEEUFHG"
+]
+
+$ usercheck data/samples.txt -fcj
+{
+ "jack": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ },
+ "this_pseudo_dont_existWEEUFHG": {
+ "twitter": true,
+ "reddit": true,
+ "github": true,
+ "instagram": true
+ },
+ "gooogle": {
+ "twitter": false,
+ "reddit": false,
+ "github": false,
+ "instagram": false
+ }
+}
+
+```
+
+Async (work only for file)
+```
+$ cat data/samples_medium.txt | wc -l
+21
+
+$ time `usercheck data/samples_medium.txt -fc > /dev/null`
+real 1m9.380s
+
+$ time `usercheck data/samples_medium.txt -fca > /dev/null`
+real 0m6.827s
+```
+
+Num Threads
+
+The list of username of size `N` is divided in `X` chunks each of size `N / num_threads`.\
+Default is 50
+```
+$ time usercheck data/samples_medium.txt -fcad
+Creating 20 chunks of 1.0 usernames
+[...]
+real 0m6.146s
+
+$ time usercheck data/samples_medium.txt -fcad -n 4
+Creating 4 chunks of 5.0 usernames
+[...]
+real 0m19.618s
+```
+
+Progress
+```
+$ usercheck data/samples_medium.txt -fcap
+ 0%| | 0/20 [00:00<?, ?it/s]
+ 5%|████▏ | 1/20 [00:04<01:31, 4.81s/it]
+ 45%|█████████████████████████████████████▎ | 9/20 [00:05<00:06, 1.77it/s]
+100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00, 3.92it/s
+```
+
+## Services
+- Twitter
+- Reddit
+- Github
+- Instagram
+
+## Use in python
+
+## TODO
+> More services\
+> Random user agent\
+> Move services from __init__ to class\
+> Option to select services\
+> Option to save to file
+
+
+
+%prep
+%autosetup -n usercheck-1.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-usercheck -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..dd951af
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+6ae8fe777fccef2304dbe226e02cda4a usercheck-1.0.tar.gz