readit module¶
Copyright (C) 2017, 2018 projectreadit organization and contributors. This file is part of Readit - Command Line Bookmark Manager Tool.
This project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This project is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with readit. If not, see <http://www.gnu.org/licenses/>.
-
readit.cli.option_yes_no(url)[source]¶ Asks whether to bookmark invalid URLs or Offline URLs to database.
-
readit.cli.tag_option_yes_no(tag_name, tagged_url)[source]¶ Asks whether to tag and bookmark invalid URLs or Offline URLs.
-
readit.cli.update_option_yes_no(url_id, url)[source]¶ Asks whether to update existing bookmark with invalid URLs or Offline URLs
-
class
readit.database.DatabaseConnection[source]¶ Bases:
objectClass to perform database operations.
-
add_url(url)[source]¶ URL will be adding to database.
Parameters: url (str) – A URL to add in database. Returns: A URL inserted in database. Return type: str
-
check_url_db()[source]¶ Checks Whether URL is present in database or not.
Returns: It returns TRUE if URL is present in database else False. Return type: bool
-
delete_all_url()[source]¶ All URLs from database will be deleted.
Returns: All URLs will be removed from database. Return type: null
-
delete_url(url_id)[source]¶ URLs can deleted as per id number provided.
Parameters: urlid (int) – id of url present in database. Returns: A URL deleted from database. Return type: str
-
export_urls()[source]¶ Exporting urls to csv file from database.
Returns: A file containing exported bookmarks records. Return type: csv file
-
init_db(cursor, db)[source]¶ Create database connection. creates or opens file mydatabase with sqlite3 DataBase. get cursor object. create table.
-
db¶ sqlite database connection.
-
cursor¶ sqlite database cursor.
-
Shows list of all available Tags in database.
Returns: It returns all available Tags associated with URLs in database. Return type: list
-
open_url(urlid)[source]¶ Opens the URL in default browser.
Parameters: urlid – id of url present in database. Returns: A URL opened in default browser. Return type: str
-
search_by_tag(tag)[source]¶ Group of URLs displayed with respect to Tag.
Parameters: tag (str) – tag to search URLs. Returns: A table containing bookmarks. Return type: list
-
show_url()[source]¶ All URLs from database displayed to user on screen.
Returns: A table representing all bookmarks. Return type: list
-
tag_url(tag_name, tagged_url)[source]¶ URLs can be added by respective Tags.
Parameters: - tag_name (str) – A comma separated tag to URL.
- tagged_url (str) – A URL to be tagged.
Returns: A URL inserted with tag.
Return type: str
-
-
readit.__init__.main()¶ Readit - Command-line bookmark manager tool.
-
readit.cli.main()¶ Readit - Command-line bookmark manager tool.