Giter VIP home page Giter VIP logo

safarihistoryclean's Introduction

Safari History Cleaner

This program helps you to clean your macOS Safari history and recent closed tabs for selectable url or regular expressions. Criteria are stored in a seperat text file.

Project is build with maven and Java 1.8. Just create a new maven project and run:

$ mvn clean
$ mvn package

To execute:

$ java -jar SafariHistoryClean-0.7.0-jar-with-dependencies.jar
        -d "/Users/.../Library/Safari/History.db"
        -p "/Users/.../Library/Safari/RecentlyClosedTabs.plist"
        -s "{executionPath}/searchExpressions.txt"

All parameters are optional. If nothing is applied the default values are as listed above.

Search file:

Each line of the search file is read as one regex statement and checked against the saved urls in Safari history. The file should look like this:

www\.google\.com
www\.google.*
.*google.*
^([^\/]*)(\/{0}|\/{2})([^\/]*)google.*$

It is preferred to use the last pattern to match all entries with given domain and not just a key word inside url.

Go to eg. https://regex101.com for evaluation of your regular expressions.

Caution:

In some situations the database can be damaged and Safari isn't able to read the database and quits. For this reason a backup file (History_backup.db) is created. Just delete the database file, rename the backup and restart Safari or complete delete database file if it is not needed. Still investigating the issue and searching for a solution...

Update: It seems, that since Safari 11 the database won't be unreadable anymore. Further observations required! Stay tuned...

Disclaimer:

Use this program at your own risk. I'm not responsible if something goes wrong.

(Code is quite a little bit messy... It will be fixed at ongoing progress.)

External libs:

  • sqlite-jdbc 3.20.1
  • dd-plist 1.16

safarihistoryclean's People

Contributors

txthomas avatar

Stargazers

Benjamin Lupton avatar

Watchers

 avatar

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.