summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 03:29:19 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 03:29:19 +0000
commitb028bfaa7af4b4c0ac83ce82b633b412c627ee19 (patch)
tree125c6869f04c5818a1993e3e610788d69dbe703e
parent2439b1b92d447bddcc4625d352d37ae58d3f44b4 (diff)
automatic import of python-browserhistoryopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-browserhistory.spec171
-rw-r--r--sources1
3 files changed, 173 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..643c4a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/browserhistory-0.1.2.tar.gz
diff --git a/python-browserhistory.spec b/python-browserhistory.spec
new file mode 100644
index 0000000..5e1edb5
--- /dev/null
+++ b/python-browserhistory.spec
@@ -0,0 +1,171 @@
+%global _empty_manifest_terminate_build 0
+Name: python-browserhistory
+Version: 0.1.2
+Release: 1
+Summary: A simple module to extract browsers's history.
+License: MIT
+URL: https://github.com/kcp18/browserhistory
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/80/5b/1d634fa9c8a290049da72de1d44121d6f4d2ae56b04bd6a778b3169580f1/browserhistory-0.1.2.tar.gz
+BuildArch: noarch
+
+
+%description
+>>> import browserhistory as bh
+>>> dict_obj = bh.get_browserhistory()
+>>> dict_obj.keys()
+>>> dict_keys(['safari', 'chrome', 'firefox'])
+>>> dict_obj['safari'][0]
+>>> ('https://mail.google.com', 'Mail', '2018-08-14 08:27:26')
+# Write the data to csv files in the current working directory.
+# safari_browserhistory.csv, chrome_browserhistory.csv, and firefox_browerhistory.csv.
+>>> bh.write_browserhistory_csv()
+# Create csv files that contain broswer history
+```
+### The Description of browserhistory
+```
+NAME
+ browserhistory
+FUNCTIONS
+ get_browserhistory() -> dict
+ Get the user's browser history by using sqlite3 module to connect to the dabase.
+ It returns a dictionary: its key is a name of browser in str and its value is a list of
+ tuples, each tuple contains four elements, including url, title, and visited_time.
+ get_database_paths() -> dict
+ Get paths to the database of browsers and store them in a dictionary.
+ It returns a dictionary: its key is the name of browser in str and its value is the path to database in str.
+ get_username() -> str
+ Get username based on their local computers
+ write_browserhistory_csv() -> None
+ It writes csv files that contain the browser history in
+ the current working directory. It will writes csv files base on
+ the name of browsers the program detects.
+```
+### Issue Report
+If you have any questions or find bugs in the module,
+please report the issues/questions at the follwing address.
+- https://github.com/kcp18/browserhistory/issues
+
+%package -n python3-browserhistory
+Summary: A simple module to extract browsers's history.
+Provides: python-browserhistory
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-browserhistory
+>>> import browserhistory as bh
+>>> dict_obj = bh.get_browserhistory()
+>>> dict_obj.keys()
+>>> dict_keys(['safari', 'chrome', 'firefox'])
+>>> dict_obj['safari'][0]
+>>> ('https://mail.google.com', 'Mail', '2018-08-14 08:27:26')
+# Write the data to csv files in the current working directory.
+# safari_browserhistory.csv, chrome_browserhistory.csv, and firefox_browerhistory.csv.
+>>> bh.write_browserhistory_csv()
+# Create csv files that contain broswer history
+```
+### The Description of browserhistory
+```
+NAME
+ browserhistory
+FUNCTIONS
+ get_browserhistory() -> dict
+ Get the user's browser history by using sqlite3 module to connect to the dabase.
+ It returns a dictionary: its key is a name of browser in str and its value is a list of
+ tuples, each tuple contains four elements, including url, title, and visited_time.
+ get_database_paths() -> dict
+ Get paths to the database of browsers and store them in a dictionary.
+ It returns a dictionary: its key is the name of browser in str and its value is the path to database in str.
+ get_username() -> str
+ Get username based on their local computers
+ write_browserhistory_csv() -> None
+ It writes csv files that contain the browser history in
+ the current working directory. It will writes csv files base on
+ the name of browsers the program detects.
+```
+### Issue Report
+If you have any questions or find bugs in the module,
+please report the issues/questions at the follwing address.
+- https://github.com/kcp18/browserhistory/issues
+
+%package help
+Summary: Development documents and examples for browserhistory
+Provides: python3-browserhistory-doc
+%description help
+>>> import browserhistory as bh
+>>> dict_obj = bh.get_browserhistory()
+>>> dict_obj.keys()
+>>> dict_keys(['safari', 'chrome', 'firefox'])
+>>> dict_obj['safari'][0]
+>>> ('https://mail.google.com', 'Mail', '2018-08-14 08:27:26')
+# Write the data to csv files in the current working directory.
+# safari_browserhistory.csv, chrome_browserhistory.csv, and firefox_browerhistory.csv.
+>>> bh.write_browserhistory_csv()
+# Create csv files that contain broswer history
+```
+### The Description of browserhistory
+```
+NAME
+ browserhistory
+FUNCTIONS
+ get_browserhistory() -> dict
+ Get the user's browser history by using sqlite3 module to connect to the dabase.
+ It returns a dictionary: its key is a name of browser in str and its value is a list of
+ tuples, each tuple contains four elements, including url, title, and visited_time.
+ get_database_paths() -> dict
+ Get paths to the database of browsers and store them in a dictionary.
+ It returns a dictionary: its key is the name of browser in str and its value is the path to database in str.
+ get_username() -> str
+ Get username based on their local computers
+ write_browserhistory_csv() -> None
+ It writes csv files that contain the browser history in
+ the current working directory. It will writes csv files base on
+ the name of browsers the program detects.
+```
+### Issue Report
+If you have any questions or find bugs in the module,
+please report the issues/questions at the follwing address.
+- https://github.com/kcp18/browserhistory/issues
+
+%prep
+%autosetup -n browserhistory-0.1.2
+
+%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-browserhistory -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..1002249
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f4a767479d2780270a723b2b6cee9aab browserhistory-0.1.2.tar.gz