Git Product home page Git Product logo

visited's Introduction

Visited-CLI

Securely collect browsing history over browsers.

Getting started

Here is the getting started guide.

Firstly, clone the git, and change to the directory.

$ git clone [repo url] && cd visited 

And install the node packages.

$ npm install 

Next, generate a client program for browser. Run the following.

$ node visited.js --generate
✔ Port number? [default: 5555] …
File generated: ./visited.user.js

Now you have visited.user.js file generated, copy and paste the file content as your new userscript on your favorite userscript manager e.g. tampermonkey

Also note that you can paste the same to your browsers, Chrome profiles, and virtually integrate browsing history at the one place.

Next, start the server. Use -s or --server. Also note that --quiet for background run, --port for specifying the port number.

$ node visited.js --server

Now you're ready. Try go to any website, let's say youtube.com, and reload page (or just visit from the omnibox).

You can see the server detects your visiting and automatically saves the URL, host, date to the database visited.db.

$ node visited.js --server
server started...
message: {"url":"https://www.youtube.com/","host":"www.youtube.com"}

Now you can use a sqlite client such as DB Browser for SQLite, or built-in searching options, just like the following.

$ node visited.js --search --host youtube.com
[
    {
        "id": 1,
        "url": "https://www.youtube.com/",
        "host": "www.youtube.com",
        "date": "6/23/2021, 3:52:02 PM",
        "timestamp": 1624431122
    }
]

The search term is regex compatible. This shows the same result as the above.

$ node visited.js --search --url 'you.*be\.com'

Requirements

git
build-essential
node
sqlite3-pcre (for searching)

Help

$ node visited.js
Usage: visited [options]

Options:
  -s, --server               set command type: server
  -p, --port <port>          (server) specify port number (default: 5555)
  -t, --timezone <timezone>  (server) specify timezone (default: "Asia/Tokyo")
  -q, --quiet                (server) disable log
  -s, --search               set command type: search
  -r, --regex                (search) enable regex extension for search (default: true)
  -u, --url <url>            (search) search by url (default: ".")
  --host <host>              (search) search by host (default: ".")
  --order <order>            (search) set order for search [desc, asc] (default: "desc")
  --limit <number>           (search) set limit for search (default: -1)
  -F, --format <format>      (search) output format [json, url] (default: "json")
  --pcre-path <file>         set sqlite3 pcre file path for search (default: "/usr/lib/sqlite3/pcre.so")
  -d, --database <file>      specify database file for index/search (default: "./visited.db")
  --generate                 generates client side userScript file
  --delete-database          delete database
  -y, --yes                  no confirmation prompt
  -h, --help                 display help for command

visited's People

Contributors

yuis-ice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

visited's Issues

It shows me this on Running "npm i"

npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 1
npm ERR! path /Users/shankaranandjha/visited/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c -- prebuild-install || npm run build-release
npm ERR! > [email protected] build-release
npm ERR! > node-gyp rebuild --release
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (/Users/shankaranandjha/visited/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/Users/shankaranandjha/visited/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/Users/shankaranandjha/visited/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/Users/shankaranandjha/visited/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /Users/shankaranandjha/visited/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /Users/shankaranandjha/visited/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /Users/shankaranandjha/visited/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:199:21)
npm ERR! gyp ERR! System Darwin 22.1.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.0.1/bin/node" "/Users/shankaranandjha/visited/node_modules/.bin/node-gyp" "rebuild" "--release"
npm ERR! gyp ERR! cwd /Users/shankaranandjha/visited/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v19.0.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shankaranandjha/.npm/_logs/2022-11-09T11_29_54_065Z-debug-0.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.